Splash页面

主页底部Tab
This commit is contained in:
BA7LZD 2020-05-18 16:54:02 +08:00
parent 984450858f
commit 993464f056
28 changed files with 939 additions and 49 deletions

View File

@ -2,11 +2,12 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
ndkVersion "21.1.6352462"
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.yuxihan.sdu"
minSdkVersion 21
minSdkVersion 24
targetSdkVersion 29
versionCode 1
versionName "1.0"
@ -20,14 +21,13 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions{
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
@ -43,4 +43,16 @@ dependencies {
implementation 'com.squareup.retrofit2:retrofit:2.7.1'
implementation 'com.squareup.okhttp:okhttp:2.7.5'
implementation 'com.squareup.retrofit2:converter-gson:2.7.1'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'com.shuyu:GSYVideoPlayer:7.1.3'
//
//
implementation 'com.gyf.immersionbar:immersionbar:3.0.0'
// fragment快速实现
implementation 'com.gyf.immersionbar:immersionbar-components:3.0.0'
//
implementation 'com.google.android.material:material:1.1.0'
}

View File

@ -1,29 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.yuxihan.sdu">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:name="com.yuxihan.sdu.comm.SDUApp"
android:allowBackup="true"
android:name=".comm.SDUApp"
android:allowBackup="false"
tools:replace="android:allowBackup"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:maxAspectRatio="2.4"
android:resizeableActivity="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
android:theme="@style/FullTheme"
tools:ignore="UnusedAttribute">
<meta-data
android:name="android.max_aspect"
android:value="2.4" />
<!--适配华为刘海屏-->
<meta-data
android:name="android.notch_support"
android:value="true" />
<!--适配小米刘海屏-->
<meta-data
android:name="notch.config"
android:value="portrait|landscape" />
<activity android:name=".ui.splash.InitializeActivity" />
<activity
android:name=".ui.login.LoginActivity"
android:label="@string/title_activity_login">
android:name=".ui.splash.SplashActivity"
android:theme="@style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainActivity">
</activity>
<activity
android:name=".ui.login.LoginActivity"
android:label="@string/title_activity_login" />
<activity
android:name=".MainActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="fullSensor" />
<activity android:name=".gsv.SimplePlayer" />
<activity android:name=".gsv.SimpleDetailActivityMode2" />
<activity android:name=".comm.BaseActivity" />
</application>
</manifest>

View File

@ -1,12 +1,25 @@
package com.yuxihan.sdu;
import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity {
import android.view.View;
import com.yuxihan.sdu.comm.BaseActivity;
import com.yuxihan.sdu.gsv.SimpleDetailActivityMode2;
public class MainActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
findViewById(R.id.start_local_video).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(MainActivity.this, SimpleDetailActivityMode2.class));
}
});
}
}

View File

@ -0,0 +1,27 @@
package com.yuxihan.sdu.comm;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.gyf.immersionbar.ImmersionBar;
import com.yuxihan.sdu.R;
public class BaseActivity extends AppCompatActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
initImmersionBar();
}
/**
* 初始化沉浸式
* Init immersion bar.
*/
protected void initImmersionBar() {
//设置共同沉浸式样式
ImmersionBar.with(this).navigationBarColor(R.color.colorPrimary).init();
}
}

View File

@ -2,7 +2,22 @@ package com.yuxihan.sdu.comm;
import android.app.Application;
import com.yuxihan.sdu.BuildConfig;
import com.yuxihan.sdu.comm.network.LoggingInterceptor;
import java.io.IOException;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class SDUApp extends Application {
private static Retrofit mRetrofit;
@Override
public void onCreate() {
super.onCreate();
@ -10,8 +25,42 @@ public class SDUApp extends Application {
}
private void initApp() {
initRetrofit();
}
public static Retrofit getRetrofit() {
if (mRetrofit == null) {
initRetrofit();
}
return mRetrofit;
}
private static void initRetrofit() {
OkHttpClient.Builder httpClientBuilder = new OkHttpClient.Builder();
//DEBUG模式下 添加日志拦截器
if (BuildConfig.DEBUG) {
httpClientBuilder.addInterceptor(new LoggingInterceptor());
}
//添加一个设置header拦截器
//header User-Agent 设备系统/app版本号(设备的系统版本号;设备型号)
httpClientBuilder.addInterceptor(new Interceptor() {
@Override
public Response intercept(Interceptor.Chain chain) throws IOException {
Request mRequest = chain.request().newBuilder()
.header("User-Agent", "android/" /* +
App.VERSIONNAME + "(" +
DeviceUtils.getSDKVersion() + ";" +
DeviceUtils.getModel() + ")"*/)
.build();
return chain.proceed(mRequest);
}
});
mRetrofit = new Retrofit.Builder()
.client(httpClientBuilder.build())
.baseUrl(Constant.BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.build();
}
}

View File

@ -0,0 +1,268 @@
package com.yuxihan.sdu.comm;
/**
* Created by mContext
*/
public class Urls {
public static String[] videoUrlList =
{
"http://jzvd.nathen.cn/c494b340ff704015bb6682ffde3cd302/64929c369124497593205a4190d7d128-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/63f3f73712544394be981d9e4f56b612/69c5767bb9e54156b5b60a1b6edeb3b5-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/b201be3093814908bf987320361c5a73/2f6d913ea25941ffa78cc53a59025383-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/d2438fd1c37c4618a704513ad38d68c5/68626a9d53ca421c896ac8010f172b68-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/25a8d119cfa94b49a7a4117257d8ebd7/f733e65a22394abeab963908f3c336db-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/7512edd1ad834d40bb5b978402274b1a/9691c7f2d7b74b5e811965350a0e5772-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/c6e3dc12a1154626b3476d9bf3bd7266/6b56c5f0dc31428083757a45764763b0-5287d2089db37e62345123a1be272f8b.mp4"
};
public static String[] videoPosterList =
{
"http://jzvd-pic.nathen.cn/jzvd-pic/00b026e7-b830-4994-bc87-38f4033806a6.jpg",
"http://jzvd-pic.nathen.cn/jzvd-pic/1d935cc5-a1e7-4779-bdfa-20fd7a60724c.jpg",
"http://jzvd-pic.nathen.cn/jzvd-pic/a019ffc1-556c-4a85-b70c-b1b49811d577.jpg",
"http://jzvd-pic.nathen.cn/jzvd-pic/6fc2ae91-36e2-44c5-bb10-29ae5d5c678c.png",
"http://jzvd-pic.nathen.cn/jzvd-pic/f03cee95-9b78-4dd5-986f-d162c06c385c.png",
"http://jzvd-pic.nathen.cn/jzvd-pic/e7ea659f-c3d2-4979-9ea5-f993b05e5930.png",
""
};
public static String[][] videoUrls =
{
{
"http://jzvd.nathen.cn/6ea7357bc3fa4658b29b7933ba575008/fbbba953374248eb913cb1408dc61d85-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/35b3dc97fbc240219961bd1fccc6400b/8d9b76ab5a584bce84a8afce012b72d3-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/df6096e7878541cbbea3f7298683fbed/ef76450342914427beafe9368a4e0397-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/384d341e000145fb82295bdc54ecef88/103eab5afca34baebc970378dd484942-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/f55530ba8a59403da0621cbf4faef15e/adae4f2e3ecf4ea780beb057e7bce84c-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/6340efd1962946ad80eeffd19b3be89c/65b499c0f16e4dd8900497e51ffa0949-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/f07fa9fddd1e45a6ae1570c7fe7967c1/c6db82685b894e25b523b1cb28d79f2e-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/d2e969f2ec734520b46ab0965d2b68bd/f124edfef6c24be8b1a7b7f996ccc5e0-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/4f965ad507ef4194a60a943a34cfe147/32af151ea132471f92c9ced2cff785ea-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
},
{
"http://jzvd.nathen.cn/623f75c3beea4b1781ea37940e70bbe4/b9cee3fd1a09487ca99ef789cdc41312-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/d8c137ceba9849f8b2f454a55a96266f/910c8381ff894905b5bc272f8194382a-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/b8a589e5f12c45fdad96674d08affd31/f1d7229f553f414283033af3e292c6c9-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/8abcdf98ec6a418b945a70fe9dd6fc7f/5cb36416a23a4da8b15d3eaa5e19a1e6-5287d2089db37e62345123a1be272f8b.mp4"
},
{
"http://jzvd.nathen.cn/1b61da23555d4ce28c805ea303711aa5/7a33ac2af276441bb4b9838f32d8d710-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/d525f756aabf4b0588c2152fb94e07f5/d9f59bef829a472a9ca066620d9b871a-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/6e2fdec45dfa44a6802e95f8e4bc3280/a6a5273ac4244333923991be0583ffc7-5287d2089db37e62345123a1be272f8b.mp4",
"http://jzvd.nathen.cn/22b4de0e2b1245959c5baa77fe0bf14e/896a137559084b7eb879f5441faff20d-5287d2089db37e62345123a1be272f8b.mp4"
},
{//tiktok
"http://jzvd.nathen.cn/video/1137e480-170bac9c523-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/e0bd348-170bac9c3b8-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/7bf938c-170bac9c18a-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/2f03c005-170bac9abac-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/47788f38-170bac9ab8a-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/2d6ffe8f-170bac9ab87-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/633e0ce-170bac9ab65-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/2d6ffe8f-170bac9ab87-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/51f7552c-170bac98718-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/2a101070-170bad88892-0007-1823-c86-de200.mp4"
}
};
public static String[] ssVideos = {
//0
"http://jzvd.nathen.cn/video/4542c17b-170c25a8e14-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/5ab693c5-170c25a8e2b-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/375dd5c6-170c25a8e44-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/51e8b629-170c25a8e61-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/1fbd7323-170c25a8e7c-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/3697e6a5-170c5a17543-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/3697e6a5-170c5a17543-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/23755490-170c5a23aa2-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/3485af57-170c5a23b57-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/4c40d283-170c5a23bbe-0007-1823-c86-de200.mp4",
//1
"http://jzvd.nathen.cn/video/33a3d257-170c5a23c2b-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/2aa00271-170c0924702-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/544973c7-170c092471a-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/4da19896-170c092473b-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/3e6b7f3a-170c0924763-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/8c1d8d9-170c0924776-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/3ed29468-170c099b43f-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/3f52bb8f-170c099f9ab-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/1248915c-170c09a1ce6-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/1c6529ed-170c09a2468-0007-1823-c86-de200.mp4",
//2
"http://jzvd.nathen.cn/video/53e65db2-170c09a6c1d-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/11131240-170c5b076c4-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/5d6f2372-170c09b3ae0-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/5cc9b365-170c5b076d8-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/13ef1d98-170c09b3b9a-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/2f795df7-170c09b3bed-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/4b76aaac-170c09b3c8f-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/3bad72f7-170c09dc89f-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/581fbe-170c09dee3f-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/2aed5c6f-170c09dfbc3-0007-1823-c86-de200.mp4",
//3
"http://jzvd.nathen.cn/video/3c0038bd-170c0a06ca0-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/15cace49-170c0a075f7-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/ed1d3ef-170c0a078cd-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/1fe7adc2-170c0afd71a-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/2c1d36cc-170c0afd12c-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/2083feba-170c0afd719-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/39105916-170c0afd718-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/2bc8f057-170c0afd716-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/2b8e9a15-170c0afd71c-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/43a91267-170c0afd719-0007-1823-c86-de200.mp4",
//4
"http://jzvd.nathen.cn/video/33d5835a-170c0afd717-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/259ea2dd-170c0b41b5d-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/4e82a1ea-170c5bc6941-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/460bad24-170c5bc6956-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/5a2bc514-170c261eff0-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/11b3c81-170c261eff3-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/47d75a32-170c0b41c2b-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/10a5d0f8-170c261f25b-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/52cb5649-170c261f720-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/31f18965-170c2621a73-0007-1823-c86-de200.mp4",
//5
"http://jzvd.nathen.cn/video/4a7b4838-170c267601a-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/554fe55-170c26772b4-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/31dbfe8e-170c2677478-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/30ab99b5-170c2677ca8-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/3acdb082-170c26793c3-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/4bf014a5-170c26aed4b-0007-1823-c86-de200.mp4",
"http://jzvd.nathen.cn/video/2f74432d-170c26afad2-0007-1823-c86-de200.mp4"
};
public static String[] ssPoster = {
"http://jzvd.nathen.cn/snapshot/f402a0e012b14d41ad07939746844c5e00005.jpg",
"http://jzvd.nathen.cn/snapshot/4105cf36b9b8463ea9151c6ad73717d900005.jpg",
"http://jzvd.nathen.cn/snapshot/1ae064966b8b423887af71c3eba3bca100005.jpg",
"http://jzvd.nathen.cn/snapshot/4061ba7b7005452e81b643580eb4d30200005.jpg",
"http://jzvd.nathen.cn/snapshot/d7505ea52bca48828807bcf96161a9f500005.jpg",
"http://jzvd.nathen.cn/snapshot/9787cbe40b7848e9b82d2cc12d1c943500005.jpg",
"http://jzvd.nathen.cn/snapshot/9787cbe40b7848e9b82d2cc12d1c943500005.jpg",
"http://jzvd.nathen.cn/snapshot/1a78739a54de4575b7cec1d77a8df4a000005.jpg",
"http://jzvd.nathen.cn/snapshot/ef29b1922ea64780a8e77a5676cad95700005.jpg",
"http://jzvd.nathen.cn/snapshot/dabe6ca3c71942fd926a86c8996d750f00005.jpg",
//1
"http://jzvd.nathen.cn/snapshot/14e8861d87c248ad83704dbe99b969f300005.jpg",
"http://jzvd.nathen.cn/snapshot/8bd6d06878fc4676a62290cbe8b5511f00005.jpg",
"http://jzvd.nathen.cn/snapshot/7254150df078451585464d804d42c71a00005.jpg",
"http://jzvd.nathen.cn/snapshot/c1ff75fcfd0042c4b7ecb762c13884eb00005.jpg",
"http://jzvd.nathen.cn/snapshot/4a5e4b468bce4179a9d97b4b40a80e0f00005.jpg",
"http://jzvd.nathen.cn/snapshot/bbe6f26a9af34ff4aa5d0e7919bd1e2f00005.jpg",
"http://jzvd.nathen.cn/snapshot/2a09ede3702c462db4f0fc8eb56821b700005.jpg",
"http://jzvd.nathen.cn/snapshot/ba84ad1beddf4d699596537b5bbbdd4900005.jpg",
"http://jzvd.nathen.cn/snapshot/9f9f5372013d4494a9fabb1c7df770ba00005.jpg",
"http://jzvd.nathen.cn/snapshot/732eb57fc0d447909eccc1adb60822c700005.jpg",
//2
"http://jzvd.nathen.cn/snapshot/371ddcdf7bbe46b682913f3d3353192000005.jpg",
"http://jzvd.nathen.cn/snapshot/b0eae85eab344427b77a162a1f7c46ae00005.jpg",
"http://jzvd.nathen.cn/snapshot/99bac3c2114545cf81cf66646c1e93af00005.jpg",
"http://jzvd.nathen.cn/snapshot/b538b1feda4943ffbd84e84cab0a2fce00005.jpg",
"http://jzvd.nathen.cn/snapshot/001ffec854be4c70a2baf3e9219705b100005.jpg",
"http://jzvd.nathen.cn/snapshot/eed4cbff7dce42a9ae2a54606be2573e00005.jpg",
"http://jzvd.nathen.cn/snapshot/b9bf3204fd75493aacdb83ecb9cef71300005.jpg",
"http://jzvd.nathen.cn/snapshot/43b2946bc6f24451b7118dd3861378ab00005.jpg",
"http://jzvd.nathen.cn/snapshot/43b2946bc6f24451b7118dd3861378ab00005.jpg",
"http://jzvd.nathen.cn/snapshot/3fc3f273ea394ec7bb79b668360160f700005.jpg",
"http://jzvd.nathen.cn/snapshot/edac56544e2f43bb827bd0e819db381000005.jpg",
//3
"http://jzvd.nathen.cn/snapshot/1d32b21e058b4959ba759e7385eb4c7000005.jpg",
"http://jzvd.nathen.cn/snapshot/6625cbf8306843dfb4fd636cf5b237a900005.jpg",
"http://jzvd.nathen.cn/snapshot/04cd0101be0c4b3f8f4f9b1f07b8a6bc00005.jpg",
"http://jzvd.nathen.cn/snapshot/531f1e488eb84b898ae9ca7f6ba758ed00005.jpg",
"http://jzvd.nathen.cn/snapshot/ca387d7d2ea8407aa371c3ce2d346a6d00005.jpg",
"http://jzvd.nathen.cn/snapshot/858001d1e47f416b996eb04b60a4579700005.jpg",
"http://jzvd.nathen.cn/snapshot/397923c6af5a48fd981ee23fafe7095800005.jpg",
"http://jzvd.nathen.cn/snapshot/454c647c597340dc93a361f5bebfad4800005.jpg",
"http://jzvd.nathen.cn/snapshot/b3c23f24c04640aaa5a15b0ad6477e4700005.jpg",
"http://jzvd.nathen.cn/snapshot/7aafec2b6ce74b658cc6ea4268c492c500005.jpg",
//4
"http://jzvd.nathen.cn/snapshot/48d7a9f34254467bb6a1bdc830a2469300005.jpg",
"http://jzvd.nathen.cn/snapshot/5ecbb98fda1347cd921c0534bbf5d0d300005.jpg",
"http://jzvd.nathen.cn/snapshot/c6bf92f63bea42d687b3a61d2c880d3200005.jpg",
"http://jzvd.nathen.cn/snapshot/ad0331e78393457d88ded2257d9e47c800005.jpg",
"http://jzvd.nathen.cn/snapshot/1f8acb2de146490e867b35f381f26f2900005.jpg",
"http://jzvd.nathen.cn/snapshot/0da5ed87cc1f4f4f9742b6fde232128d00005.jpg",
"http://jzvd.nathen.cn/snapshot/2cf5412fe161439a835371ce0b42f64f00005.jpg",
"http://jzvd.nathen.cn/snapshot/6ae53110f7fd470683587746f027698400005.jpg",
"http://jzvd.nathen.cn/snapshot/39cfa0b8eb0e4875ac0665448a09a9fa00005.jpg",
"http://jzvd.nathen.cn/snapshot/f7622efa12d74d1f955bf4d8d6e8c5a400005.jpg",
//5
"http://jzvd.nathen.cn/snapshot/ef384b95897b470c80a4aca4dd1112a500005.jpg",
"http://jzvd.nathen.cn/snapshot/8715f1267152404199f900fc72c6521700005.jpg",
"http://jzvd.nathen.cn/snapshot/86a055d08b514c9ca1e76e76862105ec00005.jpg",
"http://jzvd.nathen.cn/snapshot/58c16ac1e01e4a12b7970ecc8d6e789100005.jpg",
"http://jzvd.nathen.cn/snapshot/abd73471be8745d5b90c8fec34f95a7600005.jpg",
"http://jzvd.nathen.cn/snapshot/c9a2dbd1b997417687312741d2efe62300005.jpg",
"http://jzvd.nathen.cn/snapshot/f92487e92d6a4d3faad2d60375416c5200005.jpg"
};
public static String[][] videoPosters =
{
{
"http://jzvd-pic.nathen.cn/jzvd-pic/bd7ffc84-8407-4037-a078-7d922ce0fb0f.jpg",
"http://jzvd-pic.nathen.cn/jzvd-pic/f2dbd12e-b1cb-4daf-aff1-8c6be2f64d1a.jpg",
"http://jzvd-pic.nathen.cn/jzvd-pic/ccd86ca1-66c7-4331-9450-a3b7f765424a.png",
"http://jzvd-pic.nathen.cn/jzvd-pic/2adde364-9be1-4864-b4b9-0b0bcc81ef2e.jpg",
"http://jzvd-pic.nathen.cn/jzvd-pic/2a877211-4b68-4e3a-87be-6d2730faef27.png",
"http://jzvd-pic.nathen.cn/jzvd-pic/aaeb5da9-ac50-4712-a28d-863fe40f1fc6.png",
"http://jzvd-pic.nathen.cn/jzvd-pic/e565f9cc-eedc-45f0-99f8-5b0fa3aed567%281%29.jpg",
"http://jzvd-pic.nathen.cn/jzvd-pic/3430ec64-e6a7-4d8e-b044-9d408e075b7c.jpg",
"http://jzvd-pic.nathen.cn/jzvd-pic/2204a578-609b-440e-8af7-a0ee17ff3aee.jpg",
"http://jzvd-pic.nathen.cn/jzvd-pic/1bb2ebbe-140d-4e2e-abd2-9e7e564f71ac.png"
},
{
"http://jzvd-pic.nathen.cn/jzvd-pic/f18ee453-6aec-40a5-a046-3203111dd303.jpg",
"http://jzvd-pic.nathen.cn/jzvd-pic/00f5a243-1e9f-426c-94f4-888971987edb.jpg",
"http://jzvd-pic.nathen.cn/jzvd-pic/7df34ee9-1e4f-48f4-8acd-748c52368298.jpg",
"http://jzvd-pic.nathen.cn/jzvd-pic/ef46e139-e378-4298-8441-144888294f1f.png"
},
{
"http://jzvd-pic.nathen.cn/jzvd-pic/0e58101d-5b47-4100-8fb3-0cce057fd622.jpg",
"http://jzvd-pic.nathen.cn/jzvd-pic/d6d3a520-b183-4867-8746-5b6aba6c1724.png",
"http://jzvd-pic.nathen.cn/jzvd-pic/caa3dade-5744-486d-a1b7-9780aebb9eb5.jpg",
"http://jzvd-pic.nathen.cn/jzvd-pic/2c3e62bb-6a32-4fb0-a1d5-d1260ad436a4.png"
},
{
"http://jzvd.nathen.cn/snapshot/5f1bf07d953d4e50989e99cb45ba6b5d00002.jpg",
"http://jzvd.nathen.cn/snapshot/c0d873f60f664bf6a90c9a69bdf52be900002.jpg",
"http://jzvd.nathen.cn/snapshot/c8598fcf365542a28be332c19d666ec600002.jpg",
"http://jzvd.nathen.cn/snapshot/f2e9d9cb796f420faa0903a28800660e00001.jpg",
"http://jzvd.nathen.cn/snapshot/b3bb3dd69c804993bbd155225b873bdf00002.jpg",
"http://jzvd.nathen.cn/snapshot/43902ca792e84b1b8bee65e28a75177200001.jpg",
"http://jzvd.nathen.cn/snapshot/e027c24371d84a6296d824dc7a7d0aa600002.jpg",
"http://jzvd.nathen.cn/snapshot/c904a0e5627f4a48982c7d09c5dc79ec00001.jpg",
"http://jzvd.nathen.cn/snapshot/b6eacc0aae6049afbcf7cb9365c7694200002.jpg",
"http://jzvd.nathen.cn/snapshot/717f9195bac04ea589692a3143aa04b400002.jpg"
}
};
public static String[][] videoTitles =
{
{
"饺子出来",
"饺子溢出",
"饺子我姓王",
"饺子趴好了",
"饺子很渴",
"饺子这样不好",
"饺子别笑",
"饺子坐火车",
"饺子打游戏",
"饺子快长大"
},
{
"饺子堵车了",
"饺子喝点",
"饺子快走",
"饺子别这样"
},
{
"饺子想偷",
"饺子害羞了",
"饺子淡定",
"饺子好喜欢"
}
};
}

View File

@ -7,9 +7,11 @@ import java.io.IOException;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.internal.annotations.EverythingIsNonNull;
class LoggingInterceptor implements Interceptor {
public static final String TAG = "LoggingInterceptor";
@EverythingIsNonNull
public class LoggingInterceptor implements Interceptor {
private static final String TAG = "LoggingInterceptor";
@Override
public Response intercept(Interceptor.Chain chain) throws IOException {

View File

@ -3,6 +3,7 @@ package com.yuxihan.sdu.data;
import android.util.Log;
import com.yuxihan.sdu.comm.Constant;
import com.yuxihan.sdu.comm.SDUApp;
import com.yuxihan.sdu.data.model.DataBean;
import com.yuxihan.sdu.data.model.LoggedInUser;
@ -23,24 +24,24 @@ public class LoginDataSource {
.baseUrl(Constant.BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.build();
UpdateService updateService = retrofit.create(UpdateService.class);
Call<DataBean> call = updateService.login(username,password);
UpdateService updateService = SDUApp.getRetrofit().create(UpdateService.class);
Call<DataBean> call = updateService.login(username, password);
call.enqueue(new Callback<DataBean>() {
@Override
public void onResponse(Call<DataBean> call, Response<DataBean> response) {
//请求成功返回是一个封装为DataBean的响应
String result = response.body().toString();
Log.e("TAG","Url ===== "+result);
Log.e("TAG", "Url ===== " + result);
}
@Override
public void onFailure(Call<DataBean> call, Throwable t) {
//请求失败
Log.e("TAG","请求失败");
Log.e("TAG", "请求失败");
}
});
return new Result.Success<>(new LoggedInUser(username,username));
return new Result.Success<>(new LoggedInUser(username, username));
/*try {
// TODO: handle loggedInUser authentication

View File

@ -0,0 +1,65 @@
/*
package com.yuxihan.sdu.gsv;
import android.Manifest;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.view.View;
import android.widget.Toast;
import com.example.gsyvideoplayer.R;
import butterknife.ButterKnife;
import butterknife.OnClick;
import permissions.dispatcher.PermissionUtils;
public class SimpleActivity extends AppCompatActivity {
final String[] permissions = {Manifest.permission.WRITE_EXTERNAL_STORAGE};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_simple);
ButterKnife.bind(this);
boolean hadPermission = PermissionUtils.hasSelfPermissions(this, permissions);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !hadPermission) {
String[] permissions = {Manifest.permission.WRITE_EXTERNAL_STORAGE};
requestPermissions(permissions, 1110);
}
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
boolean sdPermissionResult = PermissionUtils.verifyPermissions(grantResults);
if (!sdPermissionResult) {
Toast.makeText(this, "没获取到sd卡权限无法播放本地视频哦", Toast.LENGTH_LONG).show();
}
}
@OnClick({R.id.simple_list_1, R.id.simple_list_2, R.id.simple_detail_1, R.id.simple_detail_2, R.id.simple_player})
public void onClick(View view) {
switch (view.getId()) {
case R.id.simple_player:
startActivity(new Intent(this, SimplePlayer.class));
break;
case R.id.simple_list_1:
startActivity(new Intent(this, SimpleListVideoActivityMode1.class));
break;
case R.id.simple_list_2:
startActivity(new Intent(this, SimpleListVideoActivityMode2.class));
break;
case R.id.simple_detail_1:
startActivity(new Intent(this, SimpleDetailActivityMode1.class));
break;
case R.id.simple_detail_2:
startActivity(new Intent(this, SimpleDetailActivityMode2.class));
break;
}
}
}
*/

View File

@ -0,0 +1,148 @@
package com.yuxihan.sdu.gsv;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity;
import com.shuyu.gsyvideoplayer.GSYVideoManager;
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder;
import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack;
import com.shuyu.gsyvideoplayer.listener.LockClickListener;
import com.shuyu.gsyvideoplayer.utils.OrientationUtils;
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer;
import com.yuxihan.sdu.R;
/**
* 简单详情实现模式2
*/
public class SimpleDetailActivityMode2 extends AppCompatActivity {
StandardGSYVideoPlayer detailPlayer;
private boolean isPlay;
private boolean isPause;
private OrientationUtils orientationUtils;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_simple_detail_player);
detailPlayer = (StandardGSYVideoPlayer) findViewById(R.id.detail_player);
String url = "http://9890.vod.myqcloud.com/9890_4e292f9a3dd011e6b4078980237cc3d3.f20.mp4";
//增加封面
ImageView imageView = new ImageView(this);
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
imageView.setImageResource(R.mipmap.xxx1);
//增加title
detailPlayer.getTitleTextView().setVisibility(View.GONE);
detailPlayer.getBackButton().setVisibility(View.GONE);
//外部辅助的旋转帮助全屏
orientationUtils = new OrientationUtils(this, detailPlayer);
//初始化不打开外部的旋转
orientationUtils.setEnable(false);
GSYVideoOptionBuilder gsyVideoOption = new GSYVideoOptionBuilder();
gsyVideoOption.setThumbImageView(imageView)
.setIsTouchWiget(true)
.setRotateViewAuto(false)
.setLockLand(false)
.setAutoFullWithSize(false)
.setShowFullAnimation(false)
.setNeedLockFull(true)
.setUrl(url)
.setCacheWithPlay(false)
.setVideoTitle("测试视频")
.setVideoAllCallBack(new GSYSampleCallBack() {
@Override
public void onPrepared(String url, Object... objects) {
super.onPrepared(url, objects);
//开始播放了才能旋转和全屏
orientationUtils.setEnable(true);
isPlay = true;
}
@Override
public void onQuitFullscreen(String url, Object... objects) {
super.onQuitFullscreen(url, objects);
if (orientationUtils != null) {
orientationUtils.backToProtVideo();
}
}
}).setLockClickListener(new LockClickListener() {
@Override
public void onClick(View view, boolean lock) {
if (orientationUtils != null) {
//配合下方的onConfigurationChanged
orientationUtils.setEnable(!lock);
}
}
}).build(detailPlayer);
detailPlayer.getFullscreenButton().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//直接横屏
orientationUtils.resolveByClick();
//第一个true是否需要隐藏actionbar第二个true是否需要隐藏statusbar
detailPlayer.startWindowFullscreen(SimpleDetailActivityMode2.this, true, true);
}
});
}
@Override
public void onBackPressed() {
if (orientationUtils != null) {
orientationUtils.backToProtVideo();
}
if (GSYVideoManager.backFromWindowFull(this)) {
return;
}
super.onBackPressed();
}
@Override
protected void onPause() {
detailPlayer.getCurrentPlayer().onVideoPause();
super.onPause();
isPause = true;
}
@Override
protected void onResume() {
detailPlayer.getCurrentPlayer().onVideoResume(false);
super.onResume();
isPause = false;
}
@Override
protected void onDestroy() {
super.onDestroy();
if (isPlay) {
detailPlayer.getCurrentPlayer().release();
}
if (orientationUtils != null)
orientationUtils.releaseListener();
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
//如果旋转了就全屏
if (isPlay && !isPause) {
detailPlayer.onConfigurationChanged(this, newConfig, orientationUtils, true, true);
}
}
}

View File

@ -0,0 +1,104 @@
package com.yuxihan.sdu.gsv;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity;
import com.bumptech.glide.Glide;
import com.shuyu.gsyvideoplayer.GSYVideoManager;
import com.shuyu.gsyvideoplayer.utils.OrientationUtils;
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer;
import com.yuxihan.sdu.R;
import com.yuxihan.sdu.comm.Urls;
public class SimplePlayer extends AppCompatActivity {
StandardGSYVideoPlayer videoPlayer;
OrientationUtils orientationUtils;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_simple_play);
init();
}
private void init() {
videoPlayer = (StandardGSYVideoPlayer) findViewById(R.id.video_player);
String source1 = "http://9890.vod.myqcloud.com/9890_4e292f9a3dd011e6b4078980237cc3d3.f20.mp4";
source1 = "http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4";
source1 = Urls.ssVideos[1];
source1 = "https://yuxihan-1300518338.cos.ap-beijing.myqcloud.com/big_buck_bunny.mp4";
source1 = "https://cos.yuxihan.com/big_buck_bunny.mp4";
videoPlayer.setUp(source1, true, "测试视频");
//增加封面
ImageView imageView = new ImageView(this);
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
Glide.with(this).load("http://jzvd-pic.nathen.cn/jzvd-pic/1bb2ebbe-140d-4e2e-abd2-9e7e564f71ac.png").into(imageView);
//imageView.setImageResource(R.mipmap.xxx1);
videoPlayer.setThumbImageView(imageView);
//增加title
videoPlayer.getTitleTextView().setVisibility(View.VISIBLE);
//设置返回键
videoPlayer.getBackButton().setVisibility(View.VISIBLE);
//设置旋转
orientationUtils = new OrientationUtils(this, videoPlayer);
//设置全屏按键功能,这是使用的是选择屏幕而不是全屏
videoPlayer.getFullscreenButton().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
orientationUtils.resolveByClick();
}
});
//是否可以滑动调整
videoPlayer.setIsTouchWiget(true);
//设置返回按键功能
videoPlayer.getBackButton().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onBackPressed();
}
});
videoPlayer.startPlayLogic();
}
@Override
protected void onPause() {
super.onPause();
videoPlayer.onVideoPause();
}
@Override
protected void onResume() {
super.onResume();
videoPlayer.onVideoResume();
}
@Override
protected void onDestroy() {
super.onDestroy();
GSYVideoManager.releaseAllVideos();
if (orientationUtils != null)
orientationUtils.releaseListener();
}
@Override
public void onBackPressed() {
//先返回正常状态
if (orientationUtils.getScreenType() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
videoPlayer.getFullscreenButton().performClick();
return;
}
//释放所有
videoPlayer.setVideoAllCallBack(null);
super.onBackPressed();
}
}

View File

@ -1,16 +1,8 @@
package com.yuxihan.sdu.ui.login;
import android.app.Activity;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProviders;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AppCompatActivity;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.KeyEvent;
@ -22,11 +14,16 @@ import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import com.yuxihan.sdu.R;
import com.yuxihan.sdu.ui.login.LoginViewModel;
import com.yuxihan.sdu.ui.login.LoginViewModelFactory;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProviders;
public class LoginActivity extends AppCompatActivity {
import com.yuxihan.sdu.R;
import com.yuxihan.sdu.comm.BaseActivity;
import com.yuxihan.sdu.gsv.SimpleDetailActivityMode2;
public class LoginActivity extends BaseActivity {
private LoginViewModel loginViewModel;
@ -34,6 +31,7 @@ public class LoginActivity extends AppCompatActivity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
loginViewModel = ViewModelProviders.of(this, new LoginViewModelFactory())
.get(LoginViewModel.class);
@ -123,9 +121,20 @@ public class LoginActivity extends AppCompatActivity {
String welcome = getString(R.string.welcome) + model.getDisplayName();
// TODO : initiate successful logged in experience
Toast.makeText(getApplicationContext(), welcome, Toast.LENGTH_LONG).show();
startActivity(new Intent(getApplicationContext(), SimpleDetailActivityMode2.class));
}
private void showLoginFailed(@StringRes Integer errorString) {
Toast.makeText(getApplicationContext(), errorString, Toast.LENGTH_SHORT).show();
}
@Override
public void onBackPressed() {
super.onBackPressed();
}
@Override
protected void onPause() {
super.onPause();
}
}

View File

@ -0,0 +1,19 @@
package com.yuxihan.sdu.ui.splash;
import android.content.Intent;
import android.os.Bundle;
import com.yuxihan.sdu.MainActivity;
import com.yuxihan.sdu.R;
import com.yuxihan.sdu.comm.BaseActivity;
public class InitializeActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_initialize);
startActivity(new Intent(this, MainActivity.class));
finish();
}
}

View File

@ -0,0 +1,17 @@
package com.yuxihan.sdu.ui.splash;
import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
public class SplashActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
startActivity(new Intent(this, InitializeActivity.class));
finish();
// setContentView(R.layout.activity_splash);
}
}

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/white" />
<item>
<bitmap
android:gravity="center"
android:src="@drawable/wel_icon" />
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
tools:context=".ui.splash.InitializeActivity">
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -7,12 +7,24 @@
tools:context=".MainActivity">
<TextView
android:id="@+id/start_local_video"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
android:text="@string/yuxi"
android:textSize="40sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.bottomnavigation.BottomNavigationView
app:layout_constraintBottom_toBottomOf="parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/bottomNavigationView"
app:itemBackground="@color/gray"
app:itemIconTint="@color/bottom_container_bg"
app:itemTextColor="@color/bottom_container_bg"
app:menu="@menu/menu_bottom_navigation_view" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/activity_detail_player"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.core.widget.NestedScrollView
android:id="@+id/post_detail_nested_scroll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="200dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/detail_text"
android:textSize="16sp" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
android:id="@+id/detail_player"
android:layout_width="match_parent"
android:layout_height="200dp" />
</RelativeLayout>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/activity_play"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000">
<com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
android:id="@+id/video_player"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true" />
</RelativeLayout>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
tools:context=".ui.splash.SplashActivity">
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/item_bottom_1"
android:enabled="true"
android:icon="@drawable/wel_icon"
android:title="选项一"
app:showAsAction="ifRoom" />
<item
android:id="@+id/item_bottom_2"
android:enabled="true"
android:icon="@drawable/wel_icon"
android:title="选项二"
app:showAsAction="ifRoom" />
<item
android:id="@+id/item_bottom_3"
android:enabled="true"
android:icon="@drawable/wel_icon"
android:title="选项三"
app:showAsAction="ifRoom" />
</menu>

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

View File

@ -3,4 +3,6 @@
<color name="colorPrimary">#6200EE</color>
<color name="colorPrimaryDark">#3700B3</color>
<color name="colorAccent">#03DAC5</color>
<color name="white">#FFFFFF</color>
<color name="gray">#FF00FF</color>
</resources>

View File

@ -1,12 +1,14 @@
<resources>
<string name="app_name">SDU</string>
<string name="title_activity_login">Sign in</string>
<string name="prompt_email">Email</string>
<string name="prompt_password">Password</string>
<string name="action_sign_in">Sign in or register</string>
<string name="action_sign_in_short">Sign in</string>
<string name="welcome">"Welcome !"</string>
<string name="invalid_username">Not a valid username</string>
<string name="invalid_password">Password must be >5 characters</string>
<string name="login_failed">"Login failed"</string>
<string name="app_name">雨曦成长记录</string>
<string name="title_activity_login">登录</string>
<string name="prompt_email">邮箱</string>
<string name="prompt_password">密码</string>
<string name="action_sign_in">登录/注册</string>
<string name="action_sign_in_short">登录</string>
<string name="welcome">"欢迎 !"</string>
<string name="invalid_username">用户名无效</string>
<string name="invalid_password">密码必须大于五个字符</string>
<string name="login_failed">"登录失败"</string>
<string name="detail_text">简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介简介</string>
<string name="yuxi">雨曦</string>
</resources>

View File

@ -6,6 +6,18 @@
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowBackground">@android:color/white</item>
</style>
<style name="FullTheme" parent="AppTheme">
<item name="android:windowFullscreen">true</item>
</style>
<style name="SplashTheme" parent="AppTheme">
<item name="android:windowBackground">@drawable/splash</item>
<item name="android:windowFullscreen">true</item>
</style>
</resources>

View File

@ -4,6 +4,7 @@ buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/google' }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
@ -17,6 +18,7 @@ allprojects {
repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/google' }
google()
}
}