version:1.0.0
bugfixes: update:主页完成
@@ -9,7 +9,7 @@ static def releaseTime() {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion "30.0.3"
|
||||
|
||||
defaultConfig {
|
||||
@@ -17,7 +17,7 @@ android {
|
||||
|
||||
//There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 28
|
||||
targetSdkVersion 29
|
||||
versionCode 1
|
||||
versionName "1.0.0"
|
||||
|
||||
@@ -127,7 +127,8 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
// implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
compileOnly files('libs/framework.jar')
|
||||
|
||||
implementation project(path: ':FlycoTabLayoutZ_Lib')
|
||||
implementation project(path: ':JZVideo')
|
||||
@@ -199,7 +200,7 @@ dependencies {
|
||||
// implementation 'com.github.wuao:FlycoTabLayout2:Tag1.1.3'
|
||||
//autosize会改变第三方view的大小
|
||||
//https://github.com/JessYanCoding/AndroidAutoSize
|
||||
//implementation 'me.jessyan:autosize:1.2.1'
|
||||
implementation 'me.jessyan:autosize:1.2.1'
|
||||
// 权限请求框架:https://github.com/getActivity/XXPermissions
|
||||
implementation 'com.github.getActivity:XXPermissions:20.0'
|
||||
}
|
||||
|
||||
BIN
app/libs/framework.jar
Normal file
@@ -15,31 +15,24 @@
|
||||
android:theme="@style/AppTheme">
|
||||
|
||||
<activity
|
||||
android:name=".activity.splash.SplashActivity"
|
||||
android:name=".activity.main.MainActivity"
|
||||
android:clearTaskOnLaunch="true"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppSplashTheme">
|
||||
android:stateNotNeeded="true">
|
||||
<intent-filter>
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.HOME" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".activity.main.MainActivity"
|
||||
android:name=".activity.category.CategoryActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="portrait">
|
||||
<!-- <intent-filter>-->
|
||||
<!-- <category android:name="android.intent.category.DEFAULT" />-->
|
||||
<!-- <action android:name="android.intent.action.MAIN" />-->
|
||||
|
||||
<!-- <category android:name="android.intent.category.LAUNCHER" />-->
|
||||
<!-- </intent-filter>-->
|
||||
</activity>
|
||||
android:launchMode="singleTask" />
|
||||
<activity
|
||||
android:name=".activity.video.VideoActivity"
|
||||
android:exported="true"
|
||||
@@ -88,6 +81,7 @@
|
||||
<meta-data
|
||||
android:name="design_height_in_dp"
|
||||
android:value="640" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.hainaos.vc.activity.category;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.recyclerview.widget.DefaultItemAnimator;
|
||||
|
||||
import com.hainaos.vc.R;
|
||||
import com.hainaos.vc.adapter.VideoAdapter;
|
||||
import com.hainaos.vc.base.mvvm.BaseMvvmActivity;
|
||||
import com.hainaos.vc.bean.LocalVideoInfo;
|
||||
import com.hainaos.vc.databinding.ActivityCategoryBinding;
|
||||
import com.hainaos.vc.utils.ScreenUtils;
|
||||
import com.hainaos.vc.utils.VideoUtils;
|
||||
import com.hainaos.vc.view.CustomDialog;
|
||||
import com.hainaos.vc.view.EquallyDividedItemDecoration;
|
||||
import com.hainaos.vc.view.RecycleGridLayoutManager;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class CategoryActivity extends BaseMvvmActivity<CategoryViewModel, ActivityCategoryBinding> {
|
||||
|
||||
private static final String TAG = "CategoryActivity";
|
||||
private String mTitle;
|
||||
|
||||
private VideoAdapter mVideoAdapter;
|
||||
|
||||
private static final int SPAN_COUNT = 3;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_category;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initDataBinding() {
|
||||
mViewModel.setCtx(this);
|
||||
mViewModel.setVDBinding(mViewDataBinding);
|
||||
mViewModel.setLifecycle(getLifecycleSubject());
|
||||
mViewDataBinding.setClick(new BtnClick());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
RecycleGridLayoutManager manager = new RecycleGridLayoutManager(CategoryActivity.this, SPAN_COUNT);
|
||||
mViewDataBinding.rvVideo.setLayoutManager(manager);
|
||||
|
||||
EquallyDividedItemDecoration equallyDividedItemDecoration = new EquallyDividedItemDecoration(SPAN_COUNT, ScreenUtils.dip2px(CategoryActivity.this, 1));
|
||||
mViewDataBinding.rvVideo.addItemDecoration(equallyDividedItemDecoration);
|
||||
mViewDataBinding.rvVideo.setNestedScrollingEnabled(false);
|
||||
|
||||
((DefaultItemAnimator) mViewDataBinding.rvVideo.getItemAnimator()).setSupportsChangeAnimations(false);
|
||||
mVideoAdapter = new VideoAdapter(CategoryActivity.this);
|
||||
mVideoAdapter.setOnLongClickListener(new VideoAdapter.onItemLongClickListener() {
|
||||
@Override
|
||||
public void onItemLongClick(String path, int position) {
|
||||
showDialog(path, position);
|
||||
}
|
||||
});
|
||||
mViewDataBinding.rvVideo.setAdapter(mVideoAdapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
Intent intent = getIntent();
|
||||
mTitle = intent.getStringExtra("title");
|
||||
mViewDataBinding.setTitle(mTitle);
|
||||
|
||||
|
||||
mViewModel.mLocalVideoInfosData.observe(this, new Observer<ArrayList<LocalVideoInfo>>() {
|
||||
@Override
|
||||
public void onChanged(ArrayList<LocalVideoInfo> localVideoInfos) {
|
||||
mVideoAdapter.setData(localVideoInfos);
|
||||
}
|
||||
});
|
||||
mViewModel.getViedoList();
|
||||
|
||||
}
|
||||
|
||||
private void showDialog(String path, int position) {
|
||||
CustomDialog dialog = new CustomDialog(CategoryActivity.this);
|
||||
dialog.setTitle("删除文件")
|
||||
.setMessage("确定要删除文件 " + VideoUtils.getFileNameWithoutExtension(path) + "吗")
|
||||
.setPositive("确定")
|
||||
.setNegtive("取消")
|
||||
.setOnClickBottomListener(new CustomDialog.OnClickBottomListener() {
|
||||
@Override
|
||||
public void onPositiveClick() {
|
||||
dialog.dismiss();
|
||||
File file = new File(path);
|
||||
// if (file.delete()) {
|
||||
// mVideoAdapter.removeItem(position);
|
||||
// ToastUtil.show("删除成功");
|
||||
// } else {
|
||||
// ToastUtil.show("删除失败,检查权限是否开启");
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNegtiveClick() {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
public class BtnClick {
|
||||
public void exit(View view) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.hainaos.vc.activity.category;
|
||||
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.hainaos.vc.base.mvvm.BaseViewModel;
|
||||
import com.hainaos.vc.bean.LocalVideoInfo;
|
||||
import com.hainaos.vc.databinding.ActivityCategoryBinding;
|
||||
import com.trello.rxlifecycle4.android.ActivityEvent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class CategoryViewModel extends BaseViewModel<ActivityCategoryBinding, ActivityEvent> {
|
||||
|
||||
@Override
|
||||
public ActivityCategoryBinding getVDBinding() {
|
||||
return binding;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
|
||||
}
|
||||
|
||||
public MutableLiveData<ArrayList<LocalVideoInfo>> mLocalVideoInfosData = new MutableLiveData<>();
|
||||
|
||||
public void getViedoList() {
|
||||
LocalVideoInfo localVideoInfo = new LocalVideoInfo();
|
||||
localVideoInfo.setFile_name("test_video_1");
|
||||
localVideoInfo.setLocalPath("/storage/emulated/0/Movies/test_video_1.mp4");
|
||||
ArrayList<LocalVideoInfo> localVideoInfos = new ArrayList<>();
|
||||
localVideoInfos.add(localVideoInfo);
|
||||
localVideoInfos.add(localVideoInfo);
|
||||
localVideoInfos.add(localVideoInfo);
|
||||
localVideoInfos.add(localVideoInfo);
|
||||
localVideoInfos.add(localVideoInfo);
|
||||
localVideoInfos.add(localVideoInfo);
|
||||
localVideoInfos.add(localVideoInfo);
|
||||
localVideoInfos.add(localVideoInfo);
|
||||
localVideoInfos.add(localVideoInfo);
|
||||
localVideoInfos.add(localVideoInfo);
|
||||
|
||||
mLocalVideoInfosData.setValue(localVideoInfos);
|
||||
}
|
||||
}
|
||||
@@ -8,29 +8,28 @@ import android.graphics.BitmapFactory;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.hainaos.vc.BuildConfig;
|
||||
import com.hainaos.vc.R;
|
||||
import com.hainaos.vc.activity.vip.VipActivity;
|
||||
import com.hainaos.vc.base.BaseFragmentPagerAdapter;
|
||||
import com.hainaos.vc.activity.category.CategoryActivity;
|
||||
import com.hainaos.vc.base.mvvm.BaseMvvmActivity;
|
||||
import com.hainaos.vc.config.CommonConfig;
|
||||
import com.hainaos.vc.databinding.ActivityMainBinding;
|
||||
import com.hainaos.vc.dialog.PermissionsDialog;
|
||||
import com.hainaos.vc.fragment.pic.PictureFragment;
|
||||
import com.hainaos.vc.fragment.video.VideoFragment;
|
||||
import com.hainaos.vc.dialog.PrivacyPolicyDialog;
|
||||
import com.hainaos.vc.utils.JgyUtils;
|
||||
import com.hainaos.vc.utils.ToastUtil;
|
||||
import com.hainaos.vc.utils.Utils;
|
||||
import com.hainaos.vc.utils.VideoUtils;
|
||||
import com.hjq.permissions.OnPermissionCallback;
|
||||
import com.hjq.permissions.XXPermissions;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@@ -44,29 +43,23 @@ import io.reactivex.rxjava3.annotations.NonNull;
|
||||
public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBinding> {
|
||||
private static final String TAG = "MainActivity";
|
||||
|
||||
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||
|
||||
private static final int REQUEST_PERMISSION_CODE = 200;
|
||||
|
||||
private String[] title = new String[]{"视频", "照片"};
|
||||
|
||||
private BaseFragmentPagerAdapter mPagerAdapter;
|
||||
private FragmentManager mFragmentManager;
|
||||
private List<Fragment> mFragments;
|
||||
private PictureFragment mPictureFragment;
|
||||
private VideoFragment mVideoFragment;
|
||||
|
||||
String[] permissions = new String[]{
|
||||
Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||
Manifest.permission.WRITE_EXTERNAL_STORAGE
|
||||
};
|
||||
|
||||
@Override
|
||||
public int getLayoutId() {
|
||||
return R.layout.activity_main;
|
||||
public boolean setNightMode() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setNightMode() {
|
||||
return false;
|
||||
public int getLayoutId() {
|
||||
return R.layout.activity_main;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -74,37 +67,33 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
||||
mViewModel.setCtx(this);
|
||||
mViewModel.setVDBinding(mViewDataBinding);
|
||||
mViewModel.setLifecycle(getLifecycleSubject());
|
||||
mViewDataBinding.setClick(new Click());
|
||||
mViewDataBinding.setClick(new BtnClick());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initView() {
|
||||
mViewDataBinding.tvVersion.setText("V" + BuildConfig.VERSION_NAME);
|
||||
mFragments = new ArrayList<>();
|
||||
if (mVideoFragment == null) {
|
||||
mVideoFragment = new VideoFragment();
|
||||
}
|
||||
if (mPictureFragment == null) {
|
||||
mPictureFragment = new PictureFragment();
|
||||
}
|
||||
mFragments.add(mVideoFragment);
|
||||
mFragments.add(mPictureFragment);
|
||||
mFragmentManager = getSupportFragmentManager();
|
||||
mPagerAdapter = new BaseFragmentPagerAdapter(mFragmentManager, mFragments);
|
||||
mViewDataBinding.viewPager.setAdapter(mPagerAdapter);
|
||||
mViewDataBinding.mainSlidingTabLayout.setViewPager(mViewDataBinding.viewPager, title);
|
||||
Log.e(TAG, "initView: getSerial = " + Utils.getSerial());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
|
||||
}
|
||||
|
||||
private void initDatas() {
|
||||
Log.e(TAG, "initDatas: ");
|
||||
|
||||
JgyUtils.getInstance().setDefaultDesktop(getPackageName(), getClass().getCanonicalName());
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
checkSelfPermission();
|
||||
Log.e(TAG, "onResume: ");
|
||||
checkEULA();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -129,6 +118,59 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
||||
}
|
||||
}
|
||||
|
||||
private void checkEULA() {
|
||||
boolean agree = mMMKV.decodeBool(CommonConfig.AGREED_THE_PRIVACY_AGREEMENT, false);
|
||||
Log.e(TAG, "initView: agree = " + agree);
|
||||
if (agree) {
|
||||
checkSelfPermission();
|
||||
} else {
|
||||
showPolicyDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private PrivacyPolicyDialog mPrivacyPolicyDialog;
|
||||
|
||||
private void showPolicyDialog() {
|
||||
if (mPrivacyPolicyDialog == null) {
|
||||
mPrivacyPolicyDialog = new PrivacyPolicyDialog(this);
|
||||
mPrivacyPolicyDialog.setCancelable(false);
|
||||
mPrivacyPolicyDialog.setPrivacyPolicyCallback(new PrivacyPolicyDialog.PrivacyPolicyCallback() {
|
||||
@Override
|
||||
public void onCancel() {
|
||||
mPrivacyPolicyDialog.dismiss();
|
||||
mPrivacyPolicyDialog = null;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
finishAndRemoveTask();
|
||||
} else {
|
||||
finishAffinity();
|
||||
}
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirm() {
|
||||
mMMKV.encode(CommonConfig.AGREED_THE_PRIVACY_AGREEMENT, true);
|
||||
mPrivacyPolicyDialog.dismiss();
|
||||
mPrivacyPolicyDialog = null;
|
||||
checkSelfPermission();
|
||||
}
|
||||
});
|
||||
}
|
||||
if (!mPrivacyPolicyDialog.isShowing()) {
|
||||
mPrivacyPolicyDialog.show();
|
||||
}
|
||||
}
|
||||
|
||||
private void checkSelfPermission() {
|
||||
if (XXPermissions.isGranted(MainActivity.this, permissions)) {
|
||||
initDatas();
|
||||
} else {
|
||||
showPermissionsDialog();
|
||||
// ActivityCompat.requestPermissions(this, permissions, REQUEST_PERMISSION_CODE);
|
||||
}
|
||||
}
|
||||
|
||||
private PermissionsDialog mPermissionsDialog;
|
||||
|
||||
private void showPermissionsDialog() {
|
||||
@@ -177,14 +219,6 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
||||
mPermissionsDialog.show();
|
||||
}
|
||||
|
||||
private void checkSelfPermission() {
|
||||
if (XXPermissions.isGranted(MainActivity.this, permissions)) {
|
||||
} else {
|
||||
showPermissionsDialog();
|
||||
// ActivityCompat.requestPermissions(this, permissions, REQUEST_PERMISSION_CODE);
|
||||
}
|
||||
}
|
||||
|
||||
private void getThumbnail() {
|
||||
long s1 = System.currentTimeMillis();
|
||||
List<String> picFileList = new ArrayList<>();
|
||||
@@ -282,13 +316,63 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
||||
}
|
||||
}
|
||||
|
||||
public class Click {
|
||||
private void openCategory(String title) {
|
||||
Intent intent = new Intent(MainActivity.this, CategoryActivity.class);
|
||||
intent.putExtra("title", title);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public class BtnClick {
|
||||
public void exit(View view) {
|
||||
lazyExit();
|
||||
}
|
||||
|
||||
public void toVip(View view) {
|
||||
startActivity(new Intent(MainActivity.this, VipActivity.class));
|
||||
public void open1(View view) {
|
||||
openCategory("发型设计");
|
||||
}
|
||||
|
||||
public void open2(View view) {
|
||||
openCategory("化妆基础");
|
||||
}
|
||||
|
||||
public void open3(View view) {
|
||||
openCategory("美甲技巧");
|
||||
}
|
||||
|
||||
public void open4(View view) {
|
||||
openCategory("皮肤管理");
|
||||
}
|
||||
|
||||
public void open5(View view) {
|
||||
openCategory("纹绣入门");
|
||||
}
|
||||
|
||||
public void open6(View view) {
|
||||
openCategory("美睫教程");
|
||||
}
|
||||
|
||||
public void open7(View view) {
|
||||
openCategory("形象穿搭");
|
||||
}
|
||||
|
||||
public void open8(View view) {
|
||||
openCategory("门店营销");
|
||||
}
|
||||
|
||||
public void open9(View view) {
|
||||
openCategory("色彩搭配");
|
||||
}
|
||||
|
||||
public void open10(View view) {
|
||||
openCategory("工具消毒");
|
||||
}
|
||||
|
||||
public void open11(View view) {
|
||||
|
||||
}
|
||||
|
||||
public void open12(View view) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,11 +28,9 @@ public class SplashActivity extends BaseDataBindingActivity {
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
boolean showed = mMMKV.decodeBool(CommonConfig.SHOW_SPLASH_KEY, false);
|
||||
Log.e(TAG, "initView: showed = " + showed);
|
||||
boolean agree = mMMKV.decodeBool(CommonConfig.AGREED_THE_PRIVACY_AGREEMENT, false);
|
||||
Log.e(TAG, "initView: agree = " + agree);
|
||||
if (showed && agree) {
|
||||
if (agree) {
|
||||
openMain();
|
||||
} else {
|
||||
showPolicyDialog();
|
||||
@@ -66,7 +64,6 @@ public class SplashActivity extends BaseDataBindingActivity {
|
||||
|
||||
@Override
|
||||
public void onConfirm() {
|
||||
mMMKV.encode(CommonConfig.SHOW_SPLASH_KEY, true);
|
||||
mMMKV.encode(CommonConfig.AGREED_THE_PRIVACY_AGREEMENT, true);
|
||||
mPrivacyPolicyDialog.dismiss();
|
||||
mPrivacyPolicyDialog = null;
|
||||
|
||||
@@ -75,7 +75,7 @@ public class VideoAdapter extends RecyclerView.Adapter<VideoAdapter.VideoHolder>
|
||||
@NonNull
|
||||
@Override
|
||||
public VideoHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
VideoHolder holder = new VideoHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_videofile, parent, false));
|
||||
VideoHolder holder = new VideoHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_video_file, parent, false));
|
||||
return holder;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@ public class CommonConfig {
|
||||
public static final String MMKV_ID = "InterProcessKV";
|
||||
|
||||
|
||||
/*是否进入主页*/
|
||||
public static final String SHOW_SPLASH_KEY = "show_splash";
|
||||
/*是否同意隐私协议*/
|
||||
public static final String AGREED_THE_PRIVACY_AGREEMENT = "agreed_the_privacy_agreement";
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@ public class VideoFragment extends BaseMvvmFragment<VideoViewModel, FragmentVide
|
||||
|
||||
private Activity mContext;
|
||||
|
||||
private RecycleGridLayoutManager mManager;
|
||||
private VideoAdapter mVideoAdapter;
|
||||
private static final int SPAN_COUNT = 2;
|
||||
|
||||
@@ -109,8 +108,8 @@ public class VideoFragment extends BaseMvvmFragment<VideoViewModel, FragmentVide
|
||||
mViewDataBinding.swipeRefreshLayout.setRefreshing(true);
|
||||
}
|
||||
});
|
||||
mManager = new RecycleGridLayoutManager(mContext, SPAN_COUNT);
|
||||
mViewDataBinding.recyclerView.setLayoutManager(mManager);
|
||||
RecycleGridLayoutManager manager = new RecycleGridLayoutManager(mContext, SPAN_COUNT);
|
||||
mViewDataBinding.recyclerView.setLayoutManager(manager);
|
||||
|
||||
EquallyDividedItemDecoration equallyDividedItemDecoration = new EquallyDividedItemDecoration(SPAN_COUNT, ScreenUtils.dip2px(mContext, 1));
|
||||
mViewDataBinding.recyclerView.addItemDecoration(equallyDividedItemDecoration);
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
package com.hainaos.vc.utils;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.role.RoleManager;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.os.Build;
|
||||
import android.os.Environment;
|
||||
import android.os.Process;
|
||||
import android.os.UserHandle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -12,6 +21,9 @@ import com.arialyy.aria.core.Aria;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class JgyUtils {
|
||||
private static final String TAG = "JGYUtils";
|
||||
@@ -101,4 +113,73 @@ public class JgyUtils {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void setDefaultDesktop(String pkg, String className) {
|
||||
Log.e(TAG, "setDefaultDesktop: pkg=" + pkg + " className=" + className);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
setRoleHolderAsUser(mContext, pkg);
|
||||
Log.e(TAG, "setDefaultDesktop: setRoleHolderAsUser");
|
||||
} else if (Build.VERSION.SDK_INT >= 31) {
|
||||
setDefaultLauncher(mContext, pkg, className);
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setRoleHolderAsUser(Context context, String packageName) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
String roleName = "android.app.role.HOME";
|
||||
boolean add = true;
|
||||
int flags = 0;
|
||||
UserHandle user = Process.myUserHandle();
|
||||
Log.i("setRoleHolderAsUser", (add ? "Adding" : "Removing") + " package as role holder, role: "
|
||||
+ roleName + ", package: " + packageName);
|
||||
RoleManager roleManager = context.getSystemService(RoleManager.class);
|
||||
Executor executor = context.getMainExecutor();
|
||||
Consumer<Boolean> callback = successful -> {
|
||||
if (successful) {
|
||||
Log.d("setRoleHolderAsUser", "Package " + (add ? "added" : "removed")
|
||||
+ " as role holder, role: " + roleName + ", package: " + packageName);
|
||||
} else {
|
||||
Log.d("setRoleHolderAsUser", "Failed to " + (add ? "add" : "remove")
|
||||
+ " package as role holder, role: " + roleName + ", package: "
|
||||
+ packageName);
|
||||
}
|
||||
};
|
||||
roleManager.addRoleHolderAsUser(roleName, packageName, flags, user, executor, callback);
|
||||
Log.i("setRoleHolderAsUser", "addRoleHolderAsUser done");
|
||||
}
|
||||
}
|
||||
|
||||
public void setDefaultLauncher(Context context, String defPackageName, String defClassName) {
|
||||
try {
|
||||
if (!TextUtils.isEmpty(defPackageName) && !TextUtils.isEmpty(defClassName)) {
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.addAction("android.intent.action.MAIN");
|
||||
filter.addCategory("android.intent.category.HOME");
|
||||
filter.addCategory("android.intent.category.DEFAULT");
|
||||
Intent intent = new Intent(Intent.ACTION_MAIN);
|
||||
intent.addCategory(Intent.CATEGORY_HOME);
|
||||
// 返回给定条件的所有ResolveInfo对象(本质上是Activity)
|
||||
List<ResolveInfo> list = context.getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
|
||||
int bestMatch = 0;
|
||||
final int size = list.size();
|
||||
ComponentName[] set = new ComponentName[size];
|
||||
for (int i = 0; i < size; i++) {
|
||||
ResolveInfo ri = list.get(i);
|
||||
set[i] = new ComponentName(ri.activityInfo.packageName, ri.activityInfo.name);
|
||||
if (ri.match > bestMatch) {
|
||||
bestMatch = ri.match;
|
||||
}
|
||||
}
|
||||
ComponentName preActivity = new ComponentName(defPackageName, defClassName);
|
||||
context.getPackageManager().addPreferredActivity(filter, bestMatch, set, preActivity);
|
||||
}
|
||||
} catch (java.lang.SecurityException e) {
|
||||
e.printStackTrace();
|
||||
Log.e(TAG, "setDefaultLauncher: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/drawable-hdpi/icon_avatar_female.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
app/src/main/res/drawable-hdpi/icon_avatar_male.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 794 B After Width: | Height: | Size: 794 B |
BIN
app/src/main/res/drawable-hdpi/icon_main_card_bg1.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
app/src/main/res/drawable-hdpi/icon_main_card_bg2.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
app/src/main/res/drawable-hdpi/icon_main_card_bg3.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
app/src/main/res/drawable-hdpi/icon_main_login.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
7
app/src/main/res/drawable/bg_main.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:endColor="#ffffff"
|
||||
android:startColor="#FDD2DA" />
|
||||
</shape>
|
||||
12
app/src/main/res/drawable/bg_main_login.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#80FFFFFF" />
|
||||
|
||||
<corners android:radius="8dp" />
|
||||
|
||||
<!-- <padding-->
|
||||
<!-- android:bottom="10dp"-->
|
||||
<!-- android:left="10dp"-->
|
||||
<!-- android:right="10dp"-->
|
||||
<!-- android:top="10dp" />-->
|
||||
</shape>
|
||||
15
app/src/main/res/drawable/ic_beauty_industry.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="200dp"
|
||||
android:height="200dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M117.92,263.36c8.64,0 16.8,2.88 23.04,9.6 5.76,6.72 9.6,15.36 9.6,24 -1.44,12.48 4.32,25.44 15.36,31.68 11.04,6.72 24.48,6.72 35.52,0 11.04,-6.72 16.8,-18.72 15.36,-31.68 0,-18.24 15.36,-33.12 33.12,-33.12 18.72,-0.96 33.12,-15.84 32.64,-34.56 -0.96,-18.24 -15.36,-31.68 -32.64,-32.64 -9.6,0 -17.28,-2.88 -24,-9.6s-10.08,-15.36 -10.08,-24c1.44,-12.48 -4.32,-24.48 -15.36,-31.68 -11.04,-6.72 -24.48,-6.72 -35.52,0 -11.04,6.72 -16.8,18.72 -15.36,31.68 0,18.24 -15.36,33.12 -33.12,33.12 -18.72,0.96 -33.12,15.84 -31.2,34.56 0.96,18.24 15.36,32.16 32.64,32.64zM984.8,604.64c-3.84,-4.32 -9.6,-6.72 -15.36,-6.72s-11.52,-2.4 -15.84,-6.72 -6.72,-10.08 -6.72,-15.84c-1.44,-12.48 -12.96,-21.12 -25.44,-19.68 -10.08,1.44 -18.24,9.6 -19.68,19.68 0,5.76 -2.4,11.52 -6.72,15.84s-10.08,6.72 -15.84,6.72c-12.48,1.44 -21.12,12.96 -19.68,25.44 1.44,10.08 9.6,18.24 19.68,19.68 5.76,0 11.52,2.4 15.84,6.72s6.72,10.08 6.72,15.84 2.4,11.52 6.72,15.84c8.64,8.64 23.04,8.64 31.68,0 4.32,-4.32 6.72,-10.08 6.72,-15.84s2.4,-11.52 6.72,-15.84 10.08,-6.72 15.84,-6.72 11.52,-2.4 15.84,-6.72c9.12,-8.16 9.12,-22.56 -0.48,-31.68z"
|
||||
android:fillColor="#ffffff" />
|
||||
<path
|
||||
android:pathData="M816.32,464.48c0,-94.56 -37.44,-185.76 -104.16,-253.44 -66.72,-67.2 -156.96,-104.64 -251.04,-104.64 -64.32,0 -126.72,17.28 -181.44,50.88 39.84,16.8 59.52,62.4 42.72,102.24 -11.04,25.92 -34.08,44.16 -61.44,47.52 -3.84,30.24 -24.48,56.64 -54.24,65.28s-61.44,-0.96 -81.12,-24c-12.96,37.44 -19.68,76.8 -19.68,116.64v154.08c0,61.44 -25.44,120 -69.6,162.24C119.36,871.04 278.24,932 459.68,932c182.4,0 339.84,-60.96 425.28,-151.2 -44.16,-41.76 -68.64,-100.8 -68.64,-161.28V464.48zM459.68,844.16c-60,-0.96 -117.12,-25.92 -159.36,-69.6s-64.8,-101.76 -63.36,-162.24v-59.04h22.56c154.08,0 303.36,-53.76 420.96,-152.16l1.44,210.72c1.92,125.28 -96.96,229.44 -222.24,232.32z"
|
||||
android:fillColor="#ffffff" />
|
||||
<path
|
||||
android:pathData="M523.52,693.92c-4.32,-4.32 -10.08,-6.72 -15.84,-6.72s-11.04,2.4 -15.36,6.72c-15.36,18.24 -42.72,21.12 -60.96,5.76 -2.4,-1.44 -4.32,-3.84 -5.76,-5.76 -4.32,-4.32 -9.6,-6.72 -15.36,-6.72s-11.52,2.4 -15.84,6.72 -6.72,10.08 -6.72,15.84 2.88,11.52 6.72,15.84c32.64,36 87.36,38.88 122.88,7.2 2.88,-2.4 5.28,-5.28 7.2,-7.2 3.84,-4.32 6.72,-10.08 5.28,-15.84 0,-5.76 -1.92,-11.52 -6.24,-15.84z"
|
||||
android:fillColor="#ffffff" />
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/ic_download_manager.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="214.25781dp"
|
||||
android:height="200dp"
|
||||
android:viewportWidth="1097"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:pathData="M533.8,0a512,512 0,1 1,0 1024,512 512,0 0,1 0,-1024zM643.51,512h-219.43a36.57,36.57 0,0 0,-36.57 36.57,36.57 36.57,0 0,1 -36.57,36.57h-36.57a30.28,30.28 0,0 0,-21.43 51.71l215.04,215.04a36.57,36.57 0,0 0,51.64 0l215.04,-215.04A30.28,30.28 0,0 0,753.23 585.14h-36.57a36.57,36.57 0,0 1,-36.57 -36.57,36.57 36.57,0 0,0 -36.57,-36.57zM643.51,365.71h-219.43a36.57,36.57 0,0 0,0 73.14h219.43a36.57,36.57 0,1 0,0 -73.14zM643.51,219.43h-219.43a36.57,36.57 0,0 0,0 73.14h219.43a36.57,36.57 0,1 0,0 -73.14z" />
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/ic_exit_desktop.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="200dp"
|
||||
android:height="200dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M746.67,469.33a234.67,234.67 0,1 1,0 469.33,234.67 234.67,0 0,1 0,-469.33zM512,42.67a234.54,234.54 0,0 1,208.3 342.49,319.87 319.87,0 0,0 -230.23,510.12c-34.56,0.17 -74.03,0.73 -114.39,0.73l-22.14,-0.04C220.67,895.15 85.33,886.57 85.33,838.36c0,-128.55 129.28,-237.44 306.3,-272 15.19,-7.59 22.78,-20.78 22.78,-39.51 0,-18.99 -10.58,-37.03 -31.7,-54.06A234.07,234.07 0,0 1,277.33 277.12,234.54 234.54,0 0,1 512,42.67zM746.33,590.42l-4.44,2.99 -4.01,3.58a42.67,42.67 0,0 0,-6.66 51.88l2.99,4.44 30.81,39.81L640,693.12l-4.99,0.3a42.67,42.67 0,0 0,0 84.74l4.99,0.3h211.93l4.74,-0.26a42.67,42.67 0,0 0,31.83 -64.43l-2.82,-4.05 -83.93,-108.63 -3.54,-4.01a42.67,42.67 0,0 0,-51.88 -6.66z"
|
||||
android:fillColor="#ffffff" />
|
||||
</vector>
|
||||
83
app/src/main/res/layout/activity_category.xml
Normal file
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".activity.category.CategoryActivity">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="com.hainaos.vc.activity.category.CategoryActivity.BtnClick" />
|
||||
|
||||
<variable
|
||||
name="title"
|
||||
type="String" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="@{click::exit}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="26dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_back_white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:text="@{title}"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="海纳美业学习机" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cl_title">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_video"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -31,7 +31,7 @@
|
||||
android:layout_marginStart="4dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/back"
|
||||
android:src="@drawable/icon_back_white"
|
||||
android:onClick="@{click::exit}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
||||
@@ -8,116 +8,644 @@
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="com.hainaos.vc.activity.main.MainActivity.Click" />
|
||||
type="com.hainaos.vc.activity.main.MainActivity.BtnClick" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_main"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_margin="8dp"
|
||||
android:background="@drawable/bg_main_login"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="@{click::exit}"
|
||||
<com.shehuan.niv.NiceImageView
|
||||
android:id="@+id/nv_avatar"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/icon_avatar_male"
|
||||
app:is_circle="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/iv_login"
|
||||
app:layout_constraintStart_toEndOf="@+id/nv_avatar"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="26dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_back"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="美业视频学习机"
|
||||
android:textColor="@color/gray"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="海纳美业学习机"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="账号:13220282310"
|
||||
android:textColor="@color/gray"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:onClick="@{click::toVip}"
|
||||
android:src="@drawable/icon_info"
|
||||
android:id="@+id/iv_login"
|
||||
android:layout_width="94dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_main_login"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/constraintLayout2">
|
||||
|
||||
<com.flyco.tablayout.SlidingTabLayout
|
||||
android:id="@+id/main_sliding_tab_layout"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="48dp"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tl_indicator_color="@color/white"
|
||||
app:tl_indicator_style="NORMAL"
|
||||
app:tl_indicator_width_equal_title="true"
|
||||
app:tl_tab_space_equal="true"
|
||||
app:tl_textBold="SELECT"
|
||||
app:tl_textSelectColor="@color/white"
|
||||
app:tl_textSelectSize="18sp"
|
||||
app:tl_textSize="17sp"
|
||||
app:tl_textUnSelectColor="@color/gray"
|
||||
app:tl_textUnSelectSize="17sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/main_sliding_tab_layout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/viewPager"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/main_sliding_tab_layout" />
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/main_card_margin"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/icon_main_card_bg1"
|
||||
android:onClick="@{click::open1}">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="@dimen/main_card_image_width"
|
||||
android:layout_height="@dimen/main_card_image_height"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_beauty_industry"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/main_card_text_top"
|
||||
android:text="发型设计"
|
||||
android:textColor="@color/main_card_text_color1"
|
||||
android:textSize="@dimen/main_card_text_size"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/main_card_margin"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/icon_main_card_bg2"
|
||||
android:onClick="@{click::open2}">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_width="@dimen/main_card_image_width"
|
||||
android:layout_height="@dimen/main_card_image_height"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_beauty_industry"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/main_card_text_top"
|
||||
android:text="化妆基础"
|
||||
android:textColor="@color/main_card_text_color"
|
||||
android:textSize="@dimen/main_card_text_size"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView2" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/main_card_margin"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/icon_main_card_bg3"
|
||||
android:onClick="@{click::open3}">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView3"
|
||||
android:layout_width="@dimen/main_card_image_width"
|
||||
android:layout_height="@dimen/main_card_image_height"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_beauty_industry"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/main_card_text_top"
|
||||
android:text="美甲技巧"
|
||||
android:textColor="@color/main_card_text_color"
|
||||
android:textSize="@dimen/main_card_text_size"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView3" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/main_card_margin"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/icon_main_card_bg2"
|
||||
android:onClick="@{click::open4}">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView4"
|
||||
android:layout_width="@dimen/main_card_image_width"
|
||||
android:layout_height="@dimen/main_card_image_height"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_beauty_industry"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/main_card_text_top"
|
||||
android:text="皮肤管理"
|
||||
android:textColor="@color/main_card_text_color"
|
||||
android:textSize="@dimen/main_card_text_size"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView4" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/main_card_margin"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/icon_main_card_bg3"
|
||||
android:onClick="@{click::open5}">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView5"
|
||||
android:layout_width="@dimen/main_card_image_width"
|
||||
android:layout_height="@dimen/main_card_image_height"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_beauty_industry"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/main_card_text_top"
|
||||
android:text="纹绣入门"
|
||||
android:textColor="@color/main_card_text_color"
|
||||
android:textSize="@dimen/main_card_text_size"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView5" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/main_card_margin"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/icon_main_card_bg1"
|
||||
android:onClick="@{click::open6}">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView6"
|
||||
android:layout_width="@dimen/main_card_image_width"
|
||||
android:layout_height="@dimen/main_card_image_height"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_beauty_industry"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/main_card_text_top"
|
||||
android:text="美睫教程"
|
||||
android:textColor="@color/main_card_text_color1"
|
||||
android:textSize="@dimen/main_card_text_size"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView6" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/main_card_margin"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/icon_main_card_bg3"
|
||||
android:onClick="@{click::open7}">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView7"
|
||||
android:layout_width="@dimen/main_card_image_width"
|
||||
android:layout_height="@dimen/main_card_image_height"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_beauty_industry"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/main_card_text_top"
|
||||
android:text="形象穿搭"
|
||||
android:textColor="@color/main_card_text_color"
|
||||
android:textSize="@dimen/main_card_text_size"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView7" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/main_card_margin"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/icon_main_card_bg1"
|
||||
android:onClick="@{click::open8}">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView8"
|
||||
android:layout_width="@dimen/main_card_image_width"
|
||||
android:layout_height="@dimen/main_card_image_height"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_beauty_industry"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/main_card_text_top"
|
||||
android:text="门店营销"
|
||||
android:textColor="@color/main_card_text_color1"
|
||||
android:textSize="@dimen/main_card_text_size"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView8" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/main_card_margin"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/icon_main_card_bg2"
|
||||
android:onClick="@{click::open9}">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView9"
|
||||
android:layout_width="@dimen/main_card_image_width"
|
||||
android:layout_height="@dimen/main_card_image_height"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_beauty_industry"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/main_card_text_top"
|
||||
android:text="色彩搭配"
|
||||
android:textColor="@color/main_card_text_color"
|
||||
android:textSize="@dimen/main_card_text_size"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView9" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/main_card_margin"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/icon_main_card_bg1"
|
||||
android:onClick="@{click::open10}">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView10"
|
||||
android:layout_width="@dimen/main_card_image_width"
|
||||
android:layout_height="@dimen/main_card_image_height"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_beauty_industry"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/main_card_text_top"
|
||||
android:text="工具消毒"
|
||||
android:textColor="@color/main_card_text_color1"
|
||||
android:textSize="@dimen/main_card_text_size"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView10" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/main_card_margin"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/icon_main_card_bg2"
|
||||
android:onClick="@{click::open11}">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView11"
|
||||
android:layout_width="@dimen/main_card_image_width"
|
||||
android:layout_height="@dimen/main_card_image_height"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/ic_download_manager"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/main_card_text_top"
|
||||
android:text="视频管理"
|
||||
android:textColor="@color/main_card_text_color"
|
||||
android:textSize="@dimen/main_card_text_size"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView11" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/main_card_margin"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/icon_main_card_bg3"
|
||||
android:onClick="@{click::open12}">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView12"
|
||||
android:layout_width="@dimen/main_card_image_width"
|
||||
android:layout_height="@dimen/main_card_image_height"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_exit_desktop"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/main_card_text_top"
|
||||
android:text="退出桌面"
|
||||
android:textColor="@color/main_card_text_color"
|
||||
android:textSize="@dimen/main_card_text_size"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imageView12" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
android:adjustViewBounds="true"
|
||||
android:onClick="@{click::exit}"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_back"
|
||||
android:src="@drawable/icon_back_white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
android:adjustViewBounds="true"
|
||||
android:onClick="@{click::exie}"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/back"
|
||||
android:src="@drawable/icon_back_white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/root"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout"
|
||||
android:layout_width="200dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -45,9 +45,7 @@
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/video_image"
|
||||
app:layout_constraintEnd_toEndOf="@+id/video_image"
|
||||
app:layout_constraintHorizontal_bias="0.872"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
app:layout_constraintEnd_toEndOf="@+id/video_image" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
@@ -19,6 +19,10 @@
|
||||
<color name="home_background_color">#efefef</color>
|
||||
<color name="space_color">#3D54D9</color>
|
||||
|
||||
<color name="main_card_text_color1">#D0A65E</color>
|
||||
<color name="main_card_text_color">#FFFFFF</color>
|
||||
|
||||
|
||||
<!--https://www.jianshu.com/p/8dc258dfd189-->
|
||||
<color name="transparent">#00000000</color><!--透明色-->
|
||||
<color name="colorYang">#FFE2C59B</color><!--羊皮纸色-->
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="dp_2">2dp</dimen>
|
||||
|
||||
<dimen name="main_card_image_width">40dp</dimen>
|
||||
<dimen name="main_card_image_height">40dp</dimen>
|
||||
<dimen name="main_card_text_size">16sp</dimen>
|
||||
<dimen name="main_card_text_top">12dp</dimen>
|
||||
<dimen name="main_card_margin">4dp</dimen>
|
||||
</resources>
|
||||
@@ -33,6 +33,11 @@ allprojects {
|
||||
maven { url 'https://maven.aliyun.com/repository/public' }
|
||||
maven { url 'https://maven.aliyun.com/repository/google' }
|
||||
}
|
||||
gradle.projectsEvaluated {
|
||||
tasks.withType(JavaCompile) {
|
||||
options.compilerArgs.add('-Xbootclasspath/p:app/libs/framework.jar')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
|
||||