@@ -11,12 +11,14 @@ import android.view.animation.Animation; | |||||
import android.view.animation.AnimationUtils; | import android.view.animation.AnimationUtils; | ||||
import android.view.animation.AnticipateInterpolator; | import android.view.animation.AnticipateInterpolator; | ||||
import android.widget.ImageView; | import android.widget.ImageView; | ||||
import android.widget.LinearLayout; | |||||
import androidx.annotation.NonNull; | import androidx.annotation.NonNull; | ||||
import androidx.appcompat.app.AppCompatActivity; | import androidx.appcompat.app.AppCompatActivity; | ||||
public class WelcomeActivity extends AppCompatActivity { | public class WelcomeActivity extends AppCompatActivity { | ||||
private ImageView imageView; | private ImageView imageView; | ||||
private LinearLayout llcenter; | |||||
private Handler handler = new Handler() { | private Handler handler = new Handler() { | ||||
@SuppressLint("HandlerLeak") | @SuppressLint("HandlerLeak") | ||||
@@ -42,13 +44,14 @@ public class WelcomeActivity extends AppCompatActivity { | |||||
super.onCreate(savedInstanceState); | super.onCreate(savedInstanceState); | ||||
this.setContentView(R.layout.activity_welcome); | this.setContentView(R.layout.activity_welcome); | ||||
imageView = findViewById(R.id.imageView); | imageView = findViewById(R.id.imageView); | ||||
llcenter = findViewById(R.id.llcenter); | |||||
Animation animation = AnimationUtils.loadAnimation(this, R.anim.img_anim); | Animation animation = AnimationUtils.loadAnimation(this, R.anim.img_anim); | ||||
animation.start(); | animation.start(); | ||||
imageView.animate() | |||||
llcenter.animate() | |||||
.scaleXBy(1.5f) | .scaleXBy(1.5f) | ||||
.scaleYBy(1.5f) | .scaleYBy(1.5f) | ||||
.setInterpolator(new AnticipateInterpolator()) | .setInterpolator(new AnticipateInterpolator()) | ||||
.setDuration(1300) | |||||
.setDuration(1400) | |||||
.setListener(new AnimatorListenerAdapter() { | .setListener(new AnimatorListenerAdapter() { | ||||
@Override | @Override | ||||
public void onAnimationStart(Animator animation) { | public void onAnimationStart(Animator animation) { | ||||
@@ -10,7 +10,9 @@ | |||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:orientation="vertical" | android:orientation="vertical" | ||||
android:layout_centerInParent="true"> | |||||
android:id="@+id/llcenter" | |||||
android:layout_marginTop="170dp" | |||||
android:layout_centerHorizontal="true"> | |||||
<ImageView | <ImageView | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
@@ -18,13 +20,31 @@ | |||||
android:id="@+id/imageView" | android:id="@+id/imageView" | ||||
android:src="@mipmap/ic_launcher" /> | android:src="@mipmap/ic_launcher" /> | ||||
</LinearLayout> | |||||
<LinearLayout | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:orientation="vertical" | |||||
android:layout_alignParentBottom="true" | |||||
android:layout_centerHorizontal="true" | |||||
android:layout_marginBottom="8dp"> | |||||
<TextView | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | |||||
android:layout_gravity="center" | |||||
android:gravity="center" | |||||
android:text="Copyright © 2020 NSGK All Rights Reserved." /> | |||||
<TextView | <TextView | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:layout_gravity="center" | android:layout_gravity="center" | ||||
android:gravity="center" | android:gravity="center" | ||||
android:textStyle="bold" | android:textStyle="bold" | ||||
android:text="农燊高科" /> | |||||
android:text="北京农燊高科信息技术有限公司" /> | |||||
</LinearLayout> | </LinearLayout> | ||||
@@ -1,5 +1,5 @@ | |||||
<resources> | <resources> | ||||
<string name="app_name">nsgk_rural_web</string> | |||||
<string name="app_name">网上家园</string> | |||||
<string name="dummy_button">Dummy Button</string> | <string name="dummy_button">Dummy Button</string> | ||||
<string name="dummy_content">DUMMY\nCONTENT</string> | <string name="dummy_content">DUMMY\nCONTENT</string> | ||||
</resources> | </resources> |