Skip to content

Commit

Permalink
update splash
Browse files Browse the repository at this point in the history
  • Loading branch information
Omiknight committed Mar 4, 2017
1 parent 27ca7f4 commit 67d7d04
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 64 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ apply plugin: 'org.greenrobot.greendao'

android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
buildToolsVersion '24.0.2'
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,15 @@ public class SplashActivity extends AppCompatActivity {

@BindView(R.id.iv_splash)
ImageView mIvSplash;
@BindView(R.id.tv_author)
TextView mTvAuthor;

@BindView(R.id.splash_app_name)
TextView mSplashAppName;
@BindView(R.id.splash_slogan)
TextView mSplashSlogan;
@BindView(R.id.splash_version_name)
TextView mSplashVersionName;
@BindView(R.id.splash_copyright)
TextView mSplashCopyright;

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
Expand All @@ -68,6 +75,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
mIvSplash.setImageResource(SPLASH_ARRAY[r.nextInt(SPLASH_ARRAY.length)]);
animateImage();
}

private void animateImage() {
ObjectAnimator animatorX = ObjectAnimator.ofFloat(mIvSplash, "scaleX", 1f, SCALE_END);
ObjectAnimator animatorY = ObjectAnimator.ofFloat(mIvSplash, "scaleY", 1f, SCALE_END);
Expand Down
35 changes: 0 additions & 35 deletions app/src/main/res/layout/activity_splash.xml

This file was deleted.

67 changes: 43 additions & 24 deletions app/src/main/res/layout/activity_splash1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,56 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/ban_shadow"/>
<!--
<TextView
android:layout_width="match_parent"
android:id="@+id/splash_app_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textSize="50sp"
android:textStyle="bold"
android:textColor="@android:color/white"
android:gravity="center"
android:textSize="48sp"
android:id="@+id/tv_title"
android:layout_centerInParent="true"
android:text="Daily"
tools:ignore="HardcodedText"/>
-->
android:layout_centerHorizontal="true"
android:layout_alignParentTop="true"
android:layout_marginTop="@dimen/splash_top_margin"/>

<TextView
android:id="@+id/splash_slogan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/splash_slogan"
android:textSize="@dimen/small"
android:textColor="@color/alpha_90_white"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/splash_middle_top_margin"
android:layout_below="@id/splash_app_name"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:orientation="vertical"
android:gravity="center"
android:textSize="23sp"
android:background="@color/alpha_10_white"
android:layout_alignParentBottom="true"
android:layout_marginBottom="40dp"
android:text="Daily"
tools:ignore="HardcodedText"/>
android:padding="@dimen/splash_bottom_padding"
android:layout_marginBottom="@dimen/splash_bottom_margin">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:id="@+id/tv_author"
android:layout_alignParentBottom="true"
android:gravity="center"
android:layout_marginBottom="8dp"
android:text="wwww"
tools:ignore="HardcodedText"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:textSize="15sp"
android:gravity="center"
android:id="@+id/splash_version_name"
android:text="@string/splash_version"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:textSize="12sp"
android:gravity="center"
android:lineSpacingExtra="2dp"
android:id="@+id/splash_copyright"
android:layout_marginTop="@dimen/splash_middle_top_margin"
android:text="@string/splash_copyright"/>
</LinearLayout>
</RelativeLayout>
5 changes: 5 additions & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@

<dimen name="item_margin">8dp</dimen>
<dimen name="title_margin">24dp</dimen>

<dimen name="splash_bottom_padding">10dp</dimen>
<dimen name="splash_middle_top_margin">10dp</dimen>
<dimen name="splash_bottom_margin">40dp</dimen>
<dimen name="splash_top_margin">130dp</dimen>
</resources>
4 changes: 4 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,8 @@

<string name="copied_to_clipboard">复制成功</string>
<string name="copied_to_clipboard_failed">复制失败</string>

<string name="splash_slogan">Go through the every bit of life</string>
<string name="splash_version">V 1.0.0</string>
<string name="splash_copyright">Copyright &#169; 2017 iDaily All Rights Reserved\nPowered by Eric Jin</string>
</resources>
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Dec 28 10:00:20 PST 2015
#Sat Mar 04 18:12:15 CST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

0 comments on commit 67d7d04

Please sign in to comment.