|
After Width: | Height: | Size: 912 B |
|
After Width: | Height: | Size: 657 B |
|
After Width: | Height: | Size: 761 B |
|
After Width: | Height: | Size: 636 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
@ -0,0 +1,26 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" |
||||
package="com.fongmi.tv"> |
||||
|
||||
<application |
||||
android:name=".App" |
||||
android:hardwareAccelerated="true" |
||||
android:icon="@mipmap/ic_launcher" |
||||
android:label="@string/app_name" |
||||
android:requestLegacyExternalStorage="true" |
||||
android:supportsRtl="true" |
||||
android:theme="@style/AppTheme" |
||||
android:usesCleartextTraffic="true"> |
||||
|
||||
<activity |
||||
android:name=".ui.activity.SplashActivity" |
||||
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation" |
||||
android:exported="true" |
||||
android:screenOrientation="fullSensor"> |
||||
<intent-filter> |
||||
<action android:name="android.intent.action.MAIN" /> |
||||
<category android:name="android.intent.category.LAUNCHER" /> |
||||
</intent-filter> |
||||
</activity> |
||||
</application> |
||||
</manifest> |
||||
@ -0,0 +1,53 @@ |
||||
package com.fongmi.tv.ui.activity; |
||||
|
||||
import android.animation.Animator; |
||||
import android.animation.AnimatorListenerAdapter; |
||||
import android.annotation.SuppressLint; |
||||
import android.view.View; |
||||
|
||||
import androidx.viewbinding.ViewBinding; |
||||
|
||||
import com.fongmi.tv.ApiConfig; |
||||
import com.fongmi.tv.databinding.ActivitySplashBinding; |
||||
import com.fongmi.tv.net.Callback; |
||||
|
||||
@SuppressLint("CustomSplashScreen") |
||||
public class SplashActivity extends BaseActivity { |
||||
|
||||
private ActivitySplashBinding mBinding; |
||||
|
||||
@Override |
||||
protected ViewBinding getBinding() { |
||||
return mBinding = ActivitySplashBinding.inflate(getLayoutInflater()); |
||||
} |
||||
|
||||
@Override |
||||
protected void initView() { |
||||
mBinding.title.animate().alpha(1).setDuration(2000).setListener(onAnimationEnd()).start(); |
||||
} |
||||
|
||||
private AnimatorListenerAdapter onAnimationEnd() { |
||||
return new AnimatorListenerAdapter() { |
||||
@Override |
||||
public void onAnimationEnd(Animator animation) { |
||||
mBinding.title.setVisibility(View.GONE); |
||||
mBinding.info.animate().alpha(1).setDuration(500).start(); |
||||
loadConfig(); |
||||
} |
||||
}; |
||||
} |
||||
|
||||
private void loadConfig() { |
||||
ApiConfig.get().init().loadConfig(new Callback() { |
||||
@Override |
||||
public void success() { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void error(int resId) { |
||||
|
||||
} |
||||
}); |
||||
} |
||||
} |
||||
|
After Width: | Height: | Size: 16 KiB |
@ -0,0 +1,43 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
xmlns:tools="http://schemas.android.com/tools" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent"> |
||||
|
||||
<TextView |
||||
android:id="@+id/title" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_centerInParent="true" |
||||
android:alpha="0" |
||||
android:shadowColor="@color/grey_700" |
||||
android:shadowDx="2" |
||||
android:shadowDy="2" |
||||
android:shadowRadius="1" |
||||
android:text="@string/app_name" |
||||
android:textColor="@color/white" |
||||
android:textSize="32sp" |
||||
tools:alpha="1" /> |
||||
|
||||
<LinearLayout |
||||
android:id="@+id/info" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_centerInParent="true" |
||||
android:alpha="0" |
||||
android:gravity="center" |
||||
android:orientation="vertical" |
||||
tools:alpha="1"> |
||||
|
||||
<include layout="@layout/view_progress" /> |
||||
|
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="12dp" |
||||
android:text="@string/splash_info" |
||||
android:textColor="@color/white" |
||||
android:textSize="18sp" /> |
||||
|
||||
</LinearLayout> |
||||
</RelativeLayout> |
||||