feat: 增加壁纸显示,增加天气事件分发,增加HotSeat
This commit is contained in:
@@ -197,6 +197,9 @@ dependencies {
|
|||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:2.2.10"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:2.2.10"
|
||||||
// 添加这行,使用 BOM 统一 Kotlin 相关库的版本
|
// 添加这行,使用 BOM 统一 Kotlin 相关库的版本
|
||||||
implementation(platform("org.jetbrains.kotlin:kotlin-bom:2.2.10"))
|
implementation(platform("org.jetbrains.kotlin:kotlin-bom:2.2.10"))
|
||||||
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.11.0'
|
||||||
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.11.0'
|
||||||
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-rx3:1.11.0'
|
||||||
|
|
||||||
//保持1.3.1 更新会报错
|
//保持1.3.1 更新会报错
|
||||||
implementation 'androidx.appcompat:appcompat:1.7.1'
|
implementation 'androidx.appcompat:appcompat:1.7.1'
|
||||||
@@ -209,6 +212,7 @@ dependencies {
|
|||||||
// Java language implementation
|
// Java language implementation
|
||||||
implementation "androidx.fragment:fragment:1.8.9"
|
implementation "androidx.fragment:fragment:1.8.9"
|
||||||
implementation "androidx.viewpager2:viewpager2:1.1.0"
|
implementation "androidx.viewpager2:viewpager2:1.1.0"
|
||||||
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||||
// Room依赖
|
// Room依赖
|
||||||
implementation "androidx.room:room-runtime:2.8.4"
|
implementation "androidx.room:room-runtime:2.8.4"
|
||||||
|
|||||||
@@ -5,14 +5,18 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.lifecycle.Observer;
|
import androidx.lifecycle.Observer;
|
||||||
|
import androidx.loader.app.LoaderManager;
|
||||||
import androidx.viewpager.widget.ViewPager;
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
import com.tencent.mmkv.MMKV;
|
import com.tencent.mmkv.MMKV;
|
||||||
import com.ttstd.dialer.R;
|
import com.ttstd.dialer.R;
|
||||||
|
import com.ttstd.dialer.adapter.AppGridAdapter;
|
||||||
import com.ttstd.dialer.base.mvvm.BaseMvvmActivity;
|
import com.ttstd.dialer.base.mvvm.BaseMvvmActivity;
|
||||||
import com.ttstd.dialer.config.CommonConfig;
|
import com.ttstd.dialer.config.CommonConfig;
|
||||||
import com.ttstd.dialer.databinding.ActivityMainBinding;
|
import com.ttstd.dialer.databinding.ActivityMainBinding;
|
||||||
@@ -21,16 +25,25 @@ import com.ttstd.dialer.fragment.app.AppFragment;
|
|||||||
import com.ttstd.dialer.fragment.contact.ContactFragment;
|
import com.ttstd.dialer.fragment.contact.ContactFragment;
|
||||||
import com.ttstd.dialer.fragment.home.HomeFragment;
|
import com.ttstd.dialer.fragment.home.HomeFragment;
|
||||||
import com.ttstd.dialer.fragment.settings.SettingsFragment;
|
import com.ttstd.dialer.fragment.settings.SettingsFragment;
|
||||||
|
import com.ttstd.dialer.manager.AppManager;
|
||||||
|
import com.ttstd.dialer.manager.WeatherUpdateManager;
|
||||||
import com.ttstd.dialer.service.main.MainService;
|
import com.ttstd.dialer.service.main.MainService;
|
||||||
import com.ttstd.dialer.utils.Logger;
|
import com.ttstd.dialer.utils.Logger;
|
||||||
import com.ttstd.dialer.view.ApkPagerAdapter;
|
import com.ttstd.dialer.view.ApkPagerAdapter;
|
||||||
import com.ttstd.dialer.view.ScaleCircleNavigator;
|
import com.ttstd.dialer.view.ScaleCircleNavigator;
|
||||||
|
import com.ttstd.dialer.wallpager.WallpaperScrollHelper;
|
||||||
|
|
||||||
import net.lucode.hackware.magicindicator.ViewPagerHelper;
|
import net.lucode.hackware.magicindicator.ViewPagerHelper;
|
||||||
|
|
||||||
|
import java.util.concurrent.CancellationException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import kotlinx.coroutines.CoroutineScope;
|
||||||
|
import kotlinx.coroutines.CoroutineScopeKt;
|
||||||
|
import kotlinx.coroutines.Job;
|
||||||
|
import kotlinx.coroutines.flow.FlowKt;
|
||||||
|
|
||||||
public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBinding> {
|
public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBinding> {
|
||||||
private static final String TAG = "MainActivity";
|
private static final String TAG = "MainActivity";
|
||||||
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||||
@@ -38,7 +51,7 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
|||||||
private FragmentManager mFragmentManager = getSupportFragmentManager();
|
private FragmentManager mFragmentManager = getSupportFragmentManager();
|
||||||
// private BaseFragmentPagerAdapter mBaseFragmentPagerAdapter;
|
// private BaseFragmentPagerAdapter mBaseFragmentPagerAdapter;
|
||||||
private ApkPagerAdapter mApkPagerAdapter;
|
private ApkPagerAdapter mApkPagerAdapter;
|
||||||
|
private AppGridAdapter mAppGridAdapter;
|
||||||
private List<Fragment> mFragments = new ArrayList<>();
|
private List<Fragment> mFragments = new ArrayList<>();
|
||||||
private SettingsFragment mSettingsFragment;
|
private SettingsFragment mSettingsFragment;
|
||||||
private ContactFragment mContactFragment;
|
private ContactFragment mContactFragment;
|
||||||
@@ -48,12 +61,17 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
|||||||
private int mCurrentIndex = -1;
|
private int mCurrentIndex = -1;
|
||||||
private int mFragmentSize = 0;
|
private int mFragmentSize = 0;
|
||||||
|
|
||||||
private int APK_PER_FRAGMENT = 9;
|
|
||||||
|
|
||||||
private ScaleCircleNavigator mScaleCircleNavigator;
|
private ScaleCircleNavigator mScaleCircleNavigator;
|
||||||
|
|
||||||
private List<AppInfo> mAppInfos;
|
private List<AppInfo> mAppInfos;
|
||||||
|
|
||||||
|
private WallpaperScrollHelper wallpaperScrollHelper;
|
||||||
|
|
||||||
|
private WeatherUpdateManager weatherUpdateManager;
|
||||||
|
private final CoroutineScope weatherScope = CoroutineScopeKt.MainScope();
|
||||||
|
private Job weatherNowJob;
|
||||||
|
private Job weatherHourlyJob;
|
||||||
|
private Job weatherDailyJob;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean setNightMode() {
|
public boolean setNightMode() {
|
||||||
@@ -76,11 +94,18 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
|||||||
mViewModel.setVDBinding(mViewDataBinding);
|
mViewModel.setVDBinding(mViewDataBinding);
|
||||||
mViewModel.setLifecycle(getLifecycleSubject());
|
mViewModel.setLifecycle(getLifecycleSubject());
|
||||||
mViewDataBinding.setClick(new BtnClick());
|
mViewDataBinding.setClick(new BtnClick());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
// mBaseFragmentPagerAdapter = new BaseFragmentPagerAdapter(mFragmentManager, mFragments);
|
weatherUpdateManager = WeatherUpdateManager.Companion.getInstance();
|
||||||
|
observeWeatherUpdates();
|
||||||
|
|
||||||
|
showSystemWallpaperBehindActivity();
|
||||||
|
|
||||||
|
// mBaseFragmentPagerAdapter = new BaseFragmentPagerAdapter(mFragmentManager, mFragments);
|
||||||
mApkPagerAdapter = new ApkPagerAdapter(mFragmentManager);
|
mApkPagerAdapter = new ApkPagerAdapter(mFragmentManager);
|
||||||
|
|
||||||
mScaleCircleNavigator = new ScaleCircleNavigator(this);
|
mScaleCircleNavigator = new ScaleCircleNavigator(this);
|
||||||
@@ -108,6 +133,14 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
|||||||
mFragmentSize += 1;
|
mFragmentSize += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wallpaperScrollHelper = new WallpaperScrollHelper(
|
||||||
|
this,
|
||||||
|
mViewDataBinding.viewPager,
|
||||||
|
mFragmentSize
|
||||||
|
);
|
||||||
|
|
||||||
|
mViewDataBinding.viewPager.setPageCount(mFragmentSize);
|
||||||
|
mViewDataBinding.viewPager.setWallpaperScrollHelper(wallpaperScrollHelper);
|
||||||
|
|
||||||
mScaleCircleNavigator.setCircleCount(mFragments.size());
|
mScaleCircleNavigator.setCircleCount(mFragments.size());
|
||||||
mScaleCircleNavigator.notifyDataSetChanged();
|
mScaleCircleNavigator.notifyDataSetChanged();
|
||||||
@@ -155,11 +188,31 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
|||||||
Intent intent = new Intent(this, MainService.class);
|
Intent intent = new Intent(this, MainService.class);
|
||||||
startService(intent);
|
startService(intent);
|
||||||
|
|
||||||
|
mAppGridAdapter = new AppGridAdapter(this, LoaderManager.getInstance(this));
|
||||||
|
mViewDataBinding.gvApp.setAdapter(mAppGridAdapter);
|
||||||
|
mAppGridAdapter.setShortcutCallback(new AppGridAdapter.ShortcutCallback() {
|
||||||
|
@Override
|
||||||
|
public void setAppInside(AppInfo appInfo) {
|
||||||
|
// 处理回调
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
registerReceivers();
|
registerReceivers();
|
||||||
|
AppManager.getInstance().addProgressCallback(new AppManager.ProgressCallback() {
|
||||||
|
@Override
|
||||||
|
public void onProgress(String step, int current, int total) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCompleted(boolean success, String message) {
|
||||||
|
mViewModel.getOutsideApp();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
mViewModel.mDesktopSortAppData.observe(this, new Observer<List<AppInfo>>() {
|
mViewModel.mDesktopSortAppData.observe(this, new Observer<List<AppInfo>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onChanged(List<AppInfo> appInfos) {
|
public void onChanged(List<AppInfo> appInfos) {
|
||||||
@@ -169,6 +222,16 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
mViewModel.getOutsideApp();
|
mViewModel.getOutsideApp();
|
||||||
|
|
||||||
|
mViewModel.mHotseatAppData.observe(this, new Observer<List<AppInfo>>() {
|
||||||
|
@Override
|
||||||
|
public void onChanged(List<AppInfo> appInfos) {
|
||||||
|
mViewDataBinding.gvApp.setNumColumns(appInfos.size());
|
||||||
|
mAppGridAdapter.setAppInfos(appInfos);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mViewModel.getHotseatApp();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -189,6 +252,9 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
|||||||
//修补autozie fragment item大小不一致
|
//修补autozie fragment item大小不一致
|
||||||
Logger.e(TAG, "onResume: ");
|
Logger.e(TAG, "onResume: ");
|
||||||
mViewModel.getOutsideApp();
|
mViewModel.getOutsideApp();
|
||||||
|
if (wallpaperScrollHelper != null) {
|
||||||
|
wallpaperScrollHelper.onResume();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -196,6 +262,39 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
|||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
Logger.e(TAG, "onDestroy: ");
|
Logger.e(TAG, "onDestroy: ");
|
||||||
unregisterReceivers();
|
unregisterReceivers();
|
||||||
|
if (wallpaperScrollHelper != null) {
|
||||||
|
wallpaperScrollHelper.onDestroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (weatherNowJob != null) {
|
||||||
|
weatherNowJob.cancel(null);
|
||||||
|
}
|
||||||
|
if (weatherHourlyJob != null) {
|
||||||
|
weatherHourlyJob.cancel(null);
|
||||||
|
}
|
||||||
|
if (weatherDailyJob != null) {
|
||||||
|
weatherDailyJob.cancel(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void observeWeatherUpdates() {
|
||||||
|
// 观察当前天气更新
|
||||||
|
weatherNowJob = weatherUpdateManager.observeWeatherNow(weatherScope, weatherNowResponse -> {
|
||||||
|
if (weatherNowResponse != null) {
|
||||||
|
Logger.e(TAG, "weatherNowResponse = " + weatherNowResponse);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showSystemWallpaperBehindActivity() {
|
||||||
|
Window window = getWindow();
|
||||||
|
|
||||||
|
// 关键:让系统壁纸显示在当前窗口后面
|
||||||
|
window.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER);
|
||||||
|
|
||||||
|
// 窗口背景透明
|
||||||
|
window.setBackgroundDrawableResource(android.R.color.transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void registerReceivers() {
|
private void registerReceivers() {
|
||||||
@@ -231,6 +330,7 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setAppList() {
|
private void setAppList() {
|
||||||
|
int APK_PER_FRAGMENT = CommonConfig.FRAGMENT_APP_ROW_DEFAULT_VALUE * CommonConfig.FRAGMENT_APP_COLUMN_DEFAULT_VALUE;
|
||||||
Logger.e(TAG, "setAppList: mFragments size = " + mFragments.size());
|
Logger.e(TAG, "setAppList: mFragments size = " + mFragments.size());
|
||||||
mFragments = mFragments.subList(0, mFragmentSize);
|
mFragments = mFragments.subList(0, mFragmentSize);
|
||||||
Logger.e(TAG, "setAppList: subList mFragments size = " + mFragments.size());
|
Logger.e(TAG, "setAppList: subList mFragments size = " + mFragments.size());
|
||||||
@@ -256,6 +356,7 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
|||||||
mScaleCircleNavigator.notifyDataSetChanged();
|
mScaleCircleNavigator.notifyDataSetChanged();
|
||||||
|
|
||||||
mApkPagerAdapter.setFragments(mFragments);
|
mApkPagerAdapter.setFragments(mFragments);
|
||||||
|
mViewDataBinding.viewPager.setPageCount(mFragments.size());
|
||||||
mViewDataBinding.viewPager.setCurrentItem(mCurrentIndex);
|
mViewDataBinding.viewPager.setCurrentItem(mCurrentIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class MainViewModel extends BaseViewModel<ActivityMainBinding, ActivityEv
|
|||||||
Observable.fromCallable(new Callable<List<AppInfo>>() {
|
Observable.fromCallable(new Callable<List<AppInfo>>() {
|
||||||
@Override
|
@Override
|
||||||
public List<AppInfo> call() throws Exception {
|
public List<AppInfo> call() throws Exception {
|
||||||
return mAppRepository.getOutsideApp();
|
return mAppRepository.getOutsideAppWithoutHotseat();
|
||||||
}
|
}
|
||||||
}).compose(RxLifecycle.bindUntilEvent(getLifecycle(), ActivityEvent.DESTROY))
|
}).compose(RxLifecycle.bindUntilEvent(getLifecycle(), ActivityEvent.DESTROY))
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
@@ -68,4 +68,39 @@ public class MainViewModel extends BaseViewModel<ActivityMainBinding, ActivityEv
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MutableLiveData<List<AppInfo>> mHotseatAppData = new MutableLiveData<>();
|
||||||
|
|
||||||
|
public void getHotseatApp() {
|
||||||
|
Observable.fromCallable(new Callable<List<AppInfo>>() {
|
||||||
|
@Override
|
||||||
|
public List<AppInfo> call() throws Exception {
|
||||||
|
return mAppRepository.getHotseatApp();
|
||||||
|
}
|
||||||
|
}).compose(RxLifecycle.bindUntilEvent(getLifecycle(), ActivityEvent.DESTROY))
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(new Observer<List<AppInfo>>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
Logger.e("getHotseatApp", "onSubscribe: ");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(@NonNull List<AppInfo> appInfos) {
|
||||||
|
Logger.e("getHotseatApp", "onNext: " + appInfos);
|
||||||
|
mHotseatAppData.setValue(appInfos);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(@NonNull Throwable e) {
|
||||||
|
Logger.e("getHotseatApp", "onError: " + e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onComplete() {
|
||||||
|
Logger.e("getHotseatApp", "onComplete: ");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
162
app/src/main/java/com/ttstd/dialer/adapter/AppGridAdapter.java
Normal file
162
app/src/main/java/com/ttstd/dialer/adapter/AppGridAdapter.java
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
package com.ttstd.dialer.adapter;
|
||||||
|
|
||||||
|
import android.content.ComponentName;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.BaseAdapter;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
|
import androidx.fragment.app.FragmentActivity;
|
||||||
|
import androidx.loader.app.LoaderManager;
|
||||||
|
import androidx.loader.content.Loader;
|
||||||
|
|
||||||
|
import com.shehuan.niv.NiceImageView;
|
||||||
|
import com.tencent.mmkv.MMKV;
|
||||||
|
import com.ttstd.dialer.R;
|
||||||
|
import com.ttstd.dialer.config.CommonConfig;
|
||||||
|
import com.ttstd.dialer.db.app.AppInfo;
|
||||||
|
import com.ttstd.dialer.fragment.dialog.shortcut.ShortcutDialogFagment;
|
||||||
|
import com.ttstd.dialer.utils.ApkUtils;
|
||||||
|
import com.ttstd.dialer.utils.Logger;
|
||||||
|
import com.ttstd.iconloader.IconCacheManager;
|
||||||
|
import com.ttstd.iconloader.IconLoader;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class AppGridAdapter extends BaseAdapter implements LoaderManager.LoaderCallbacks<Drawable> {
|
||||||
|
private static final String TAG = "AppGridAdapter";
|
||||||
|
|
||||||
|
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||||
|
|
||||||
|
private FragmentActivity mContext;
|
||||||
|
private LoaderManager mLoaderManager;
|
||||||
|
private IconCacheManager mIconCacheManager = IconCacheManager.getInstance();
|
||||||
|
private List<AppInfo> mAppInfos;
|
||||||
|
|
||||||
|
public AppGridAdapter(FragmentActivity context, LoaderManager loaderManager) {
|
||||||
|
mContext = context;
|
||||||
|
mLoaderManager = loaderManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppInfos(List<AppInfo> appInfos) {
|
||||||
|
mAppInfos = appInfos;
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface ShortcutCallback {
|
||||||
|
void setAppInside(AppInfo appInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ShortcutCallback mShortcutCallback;
|
||||||
|
|
||||||
|
public void setShortcutCallback(ShortcutCallback shortcutCallback) {
|
||||||
|
mShortcutCallback = shortcutCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return mAppInfos == null ? 0 : mAppInfos.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getItem(int position) {
|
||||||
|
return mAppInfos == null ? null : mAppInfos.get(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getItemId(int position) {
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
|
ViewHolder holder;
|
||||||
|
if (convertView == null) {
|
||||||
|
convertView = LayoutInflater.from(mContext).inflate(R.layout.item_grid_app, parent, false);
|
||||||
|
holder = new ViewHolder();
|
||||||
|
holder.root = convertView.findViewById(R.id.root);
|
||||||
|
holder.iv_icon = convertView.findViewById(R.id.iv_icon);
|
||||||
|
holder.tv_app_name = convertView.findViewById(R.id.tv_app_name);
|
||||||
|
convertView.setTag(holder);
|
||||||
|
} else {
|
||||||
|
holder = (ViewHolder) convertView.getTag();
|
||||||
|
}
|
||||||
|
|
||||||
|
AppInfo appInfo = mAppInfos.get(position);
|
||||||
|
Drawable drawable = mIconCacheManager.getIcon(appInfo.getComponentName().flattenToShortString());
|
||||||
|
if (drawable != null) {
|
||||||
|
holder.iv_icon.setImageDrawable(drawable);
|
||||||
|
} else {
|
||||||
|
mLoaderManager.restartLoader(position, null, this).forceLoad();
|
||||||
|
}
|
||||||
|
holder.tv_app_name.setText(appInfo.getLabel());
|
||||||
|
|
||||||
|
holder.root.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
ApkUtils.openApp(mContext, appInfo.getComponentName());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
holder.root.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onLongClick(View v) {
|
||||||
|
ShortcutDialogFagment shortcutDialogFagment = new ShortcutDialogFagment(appInfo);
|
||||||
|
shortcutDialogFagment.setTitil("温馨提示");
|
||||||
|
shortcutDialogFagment.setTips("是否将应用放入更多应用");
|
||||||
|
shortcutDialogFagment.setOnClickListener(new ShortcutDialogFagment.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onPositiveClick() {
|
||||||
|
if (mShortcutCallback != null)
|
||||||
|
mShortcutCallback.setAppInside(appInfo);
|
||||||
|
shortcutDialogFagment.dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNegativeClick() {
|
||||||
|
shortcutDialogFagment.dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
shortcutDialogFagment.show(mContext.getSupportFragmentManager(), "ShortcutDialogFagment");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@NotNull
|
||||||
|
@Override
|
||||||
|
public Loader<Drawable> onCreateLoader(int id, @Nullable @org.jetbrains.annotations.Nullable Bundle args) {
|
||||||
|
AppInfo appInfo = mAppInfos.get(id);
|
||||||
|
ComponentName componentName = appInfo.getComponentName();
|
||||||
|
return new IconLoader(mContext, componentName, mIconCacheManager);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoadFinished(@NonNull @NotNull Loader<Drawable> loader, Drawable data) {
|
||||||
|
int position = loader.getId();
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoaderReset(@NonNull @NotNull Loader<Drawable> loader) {
|
||||||
|
Logger.e(TAG, "onLoaderReset: ");
|
||||||
|
}
|
||||||
|
|
||||||
|
static class ViewHolder {
|
||||||
|
ConstraintLayout root;
|
||||||
|
NiceImageView iv_icon;
|
||||||
|
TextView tv_app_name;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,6 +10,12 @@ public class CommonConfig {
|
|||||||
public static final String FLOAT_WINDOW_ENABLE = "float_window_enable_key";
|
public static final String FLOAT_WINDOW_ENABLE = "float_window_enable_key";
|
||||||
public static final String FLOAT_WINDOW_KILL_APP = "float_window_kill_app_key";
|
public static final String FLOAT_WINDOW_KILL_APP = "float_window_kill_app_key";
|
||||||
|
|
||||||
|
public static final String FRAGMENT_APP_ROW_KEY = "fragment_app_row_key";
|
||||||
|
public static final int FRAGMENT_APP_ROW_DEFAULT_VALUE = 2;
|
||||||
|
public static final String FRAGMENT_APP_COLUMN_KEY = "fragment_app_column_key";
|
||||||
|
public static final int FRAGMENT_APP_COLUMN_DEFAULT_VALUE = 3;
|
||||||
|
|
||||||
|
|
||||||
public static final String WECHAT_AUTO_ACCEPT_CALL= "wechat_auto_accept_call_key";
|
public static final String WECHAT_AUTO_ACCEPT_CALL= "wechat_auto_accept_call_key";
|
||||||
public static final String WECHAT_AUTO_HNADS_FREE= "wechat_auto_hands_free_key";
|
public static final String WECHAT_AUTO_HNADS_FREE= "wechat_auto_hands_free_key";
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,9 @@ public interface AppDao {
|
|||||||
@Query("SELECT * FROM app_list WHERE outside = 1 ORDER BY position ASC")
|
@Query("SELECT * FROM app_list WHERE outside = 1 ORDER BY position ASC")
|
||||||
List<AppInfo> getOutsideApp();
|
List<AppInfo> getOutsideApp();
|
||||||
|
|
||||||
|
@Query("SELECT * FROM app_list WHERE outside = 1 AND hotseat = 0 ORDER BY position ASC")
|
||||||
|
List<AppInfo> getOutsideAppWithoutHotseat();
|
||||||
|
|
||||||
@Query("SELECT * FROM app_list WHERE outside = 0 ORDER BY position ASC")
|
@Query("SELECT * FROM app_list WHERE outside = 0 ORDER BY position ASC")
|
||||||
List<AppInfo> getInsideApp();
|
List<AppInfo> getInsideApp();
|
||||||
|
|
||||||
@@ -60,4 +63,10 @@ public interface AppDao {
|
|||||||
|
|
||||||
@Query("SELECT * FROM app_list WHERE label LIKE :searchQuery OR package_name LIKE :searchQuery")
|
@Query("SELECT * FROM app_list WHERE label LIKE :searchQuery OR package_name LIKE :searchQuery")
|
||||||
List<AppInfo> searchApp(String searchQuery);
|
List<AppInfo> searchApp(String searchQuery);
|
||||||
|
|
||||||
|
@Query("SELECT * FROM app_list WHERE hotseat = 1 ORDER BY hotseat_position ASC")
|
||||||
|
List<AppInfo> getHotseatApp();
|
||||||
|
|
||||||
|
@Query("UPDATE app_list SET hotseat = :isHotseat WHERE id = :id")
|
||||||
|
int updateHotseatStatus(int id, int isHotseat);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ public class AppInfo implements Serializable , Parcelable {
|
|||||||
private int mPosition;
|
private int mPosition;
|
||||||
@ColumnInfo(name = "outside")
|
@ColumnInfo(name = "outside")
|
||||||
private int outside;
|
private int outside;
|
||||||
|
@ColumnInfo(name = "hotseat")
|
||||||
|
private int hotseat;
|
||||||
|
@ColumnInfo(name = "hotseat_position")
|
||||||
|
private int hotseatPosition;
|
||||||
|
|
||||||
public AppInfo() {
|
public AppInfo() {
|
||||||
|
|
||||||
@@ -51,6 +55,8 @@ public class AppInfo implements Serializable , Parcelable {
|
|||||||
this.mClassName = componentName.getClassName();
|
this.mClassName = componentName.getClassName();
|
||||||
this.mPosition = 0;
|
this.mPosition = 0;
|
||||||
this.outside = 0;
|
this.outside = 0;
|
||||||
|
this.hotseat = 0;
|
||||||
|
this.hotseatPosition = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AppInfo(Context context, ComponentName componentName, int pos) {
|
public AppInfo(Context context, ComponentName componentName, int pos) {
|
||||||
@@ -60,6 +66,8 @@ public class AppInfo implements Serializable , Parcelable {
|
|||||||
this.mClassName = componentName.getClassName();
|
this.mClassName = componentName.getClassName();
|
||||||
this.mPosition = pos;
|
this.mPosition = pos;
|
||||||
this.outside = 0;
|
this.outside = 0;
|
||||||
|
this.hotseat = 0;
|
||||||
|
this.hotseatPosition = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected AppInfo(Parcel in) {
|
protected AppInfo(Parcel in) {
|
||||||
@@ -70,6 +78,7 @@ public class AppInfo implements Serializable , Parcelable {
|
|||||||
mClassName = in.readString();
|
mClassName = in.readString();
|
||||||
mPosition = in.readInt();
|
mPosition = in.readInt();
|
||||||
outside = in.readInt();
|
outside = in.readInt();
|
||||||
|
hotseatPosition = in.readInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Creator<AppInfo> CREATOR = new Creator<AppInfo>() {
|
public static final Creator<AppInfo> CREATOR = new Creator<AppInfo>() {
|
||||||
@@ -140,6 +149,22 @@ public class AppInfo implements Serializable , Parcelable {
|
|||||||
this.outside = outside;
|
this.outside = outside;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getHotseat() {
|
||||||
|
return hotseat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHotseat(int hotseat) {
|
||||||
|
this.hotseat = hotseat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getHotseatPosition() {
|
||||||
|
return hotseatPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHotseatPosition(int hotseatPosition) {
|
||||||
|
this.hotseatPosition = hotseatPosition;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(@Nullable @org.jetbrains.annotations.Nullable Object obj) {
|
public boolean equals(@Nullable @org.jetbrains.annotations.Nullable Object obj) {
|
||||||
if (obj instanceof AppInfo) {
|
if (obj instanceof AppInfo) {
|
||||||
@@ -177,5 +202,7 @@ public class AppInfo implements Serializable , Parcelable {
|
|||||||
dest.writeString(mClassName);
|
dest.writeString(mClassName);
|
||||||
dest.writeInt(mPosition);
|
dest.writeInt(mPosition);
|
||||||
dest.writeInt(outside);
|
dest.writeInt(outside);
|
||||||
|
dest.writeInt(hotseat);
|
||||||
|
dest.writeInt(hotseatPosition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,11 +37,21 @@ public class AppRepository {
|
|||||||
return mAppDao.getAllApp();
|
return mAppDao.getAllApp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取快捷方式APP
|
||||||
|
public List<AppInfo> getHotseatApp() {
|
||||||
|
return mAppDao.getHotseatApp();
|
||||||
|
}
|
||||||
|
|
||||||
// 获取在外面显示的APP
|
// 获取在外面显示的APP
|
||||||
public List<AppInfo> getOutsideApp() {
|
public List<AppInfo> getOutsideApp() {
|
||||||
return mAppDao.getOutsideApp();
|
return mAppDao.getOutsideApp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取外面显示的APP,不包含快捷方式APP
|
||||||
|
public List<AppInfo> getOutsideAppWithoutHotseat() {
|
||||||
|
return mAppDao.getOutsideAppWithoutHotseat();
|
||||||
|
}
|
||||||
|
|
||||||
// 获取在里面显示的APP
|
// 获取在里面显示的APP
|
||||||
public List<AppInfo> getInsideApp() {
|
public List<AppInfo> getInsideApp() {
|
||||||
return mAppDao.getInsideApp();
|
return mAppDao.getInsideApp();
|
||||||
|
|||||||
@@ -10,10 +10,11 @@ import androidx.recyclerview.widget.GridLayoutManager;
|
|||||||
import com.ttstd.dialer.R;
|
import com.ttstd.dialer.R;
|
||||||
import com.ttstd.dialer.adapter.AppAdapter;
|
import com.ttstd.dialer.adapter.AppAdapter;
|
||||||
import com.ttstd.dialer.base.mvvm.fragment.BaseMvvmFragment;
|
import com.ttstd.dialer.base.mvvm.fragment.BaseMvvmFragment;
|
||||||
|
import com.ttstd.dialer.config.CommonConfig;
|
||||||
import com.ttstd.dialer.databinding.FragmentAppBinding;
|
import com.ttstd.dialer.databinding.FragmentAppBinding;
|
||||||
import com.ttstd.dialer.db.app.AppInfo;
|
import com.ttstd.dialer.db.app.AppInfo;
|
||||||
import com.ttstd.dialer.utils.Logger;
|
import com.ttstd.dialer.utils.Logger;
|
||||||
import com.ttstd.dialer.view.EqualHeightDecoration;
|
import com.ttstd.dialer.view.EqualSpaceDecoration;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -81,8 +82,8 @@ public class AppFragment extends BaseMvvmFragment<AppViewModel, FragmentAppBindi
|
|||||||
mViewModel.updateAppInfo(appInfo);
|
mViewModel.updateAppInfo(appInfo);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
mViewDataBinding.recyclerView.setLayoutManager(new GridLayoutManager(mContext, 3));
|
mViewDataBinding.recyclerView.setLayoutManager(new GridLayoutManager(mContext, CommonConfig.FRAGMENT_APP_ROW_DEFAULT_VALUE));
|
||||||
mViewDataBinding.recyclerView.addItemDecoration(new EqualHeightDecoration(3));
|
mViewDataBinding.recyclerView.addItemDecoration(new EqualSpaceDecoration(CommonConfig.FRAGMENT_APP_COLUMN_DEFAULT_VALUE, 4));
|
||||||
mViewDataBinding.recyclerView.setAdapter(mAppAdapter);
|
mViewDataBinding.recyclerView.setAdapter(mAppAdapter);
|
||||||
|
|
||||||
if (mAppInfos != null) {
|
if (mAppInfos != null) {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import com.ttstd.dialer.databinding.FragmentContactBinding;
|
|||||||
import com.ttstd.dialer.db.contact.ContactInfo;
|
import com.ttstd.dialer.db.contact.ContactInfo;
|
||||||
import com.ttstd.dialer.fragment.dialog.call.CallFragment;
|
import com.ttstd.dialer.fragment.dialog.call.CallFragment;
|
||||||
import com.ttstd.dialer.utils.Logger;
|
import com.ttstd.dialer.utils.Logger;
|
||||||
import com.ttstd.dialer.view.EqualHeightDecoration;
|
import com.ttstd.dialer.view.EqualSpaceDecoration;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ public class ContactFragment extends BaseMvvmFragment<ContactViewModel, Fragment
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 2);
|
GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 2);
|
||||||
mViewDataBinding.recyclerView.addItemDecoration(new EqualHeightDecoration(3));
|
mViewDataBinding.recyclerView.addItemDecoration(new EqualSpaceDecoration(3, 4));
|
||||||
mViewDataBinding.recyclerView.setLayoutManager(gridLayoutManager);
|
mViewDataBinding.recyclerView.setLayoutManager(gridLayoutManager);
|
||||||
mViewDataBinding.recyclerView.setAdapter(mHomeContactAdapter);
|
mViewDataBinding.recyclerView.setAdapter(mHomeContactAdapter);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,6 +96,23 @@ public class AppManager {
|
|||||||
this.add("com.ss.android.ugc.aweme");
|
this.add("com.ss.android.ugc.aweme");
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
public static final Set<String> DEFAULT_DIALER_PACKAGE = new HashSet<String>() {{
|
||||||
|
this.add("com.android.dialer");
|
||||||
|
}};
|
||||||
|
|
||||||
|
public static final Set<String> DEFAULT_CONTACT_PACKAGE = new HashSet<String>() {{
|
||||||
|
this.add("com.android.contacts");
|
||||||
|
}};
|
||||||
|
|
||||||
|
public static final Set<String> DEFAULT_MESSAGE_PACKAGE = new HashSet<String>() {{
|
||||||
|
this.add("com.android.messaging");
|
||||||
|
}};
|
||||||
|
|
||||||
|
public static final Set<String> DEFAULT_SETTINGS_PACKAGE = new HashSet<String>() {{
|
||||||
|
this.add("com.android.settings");
|
||||||
|
}};
|
||||||
|
|
||||||
|
|
||||||
public static void init(Context context) {
|
public static void init(Context context) {
|
||||||
if (INSTANCE == null) {
|
if (INSTANCE == null) {
|
||||||
synchronized (AppManager.class) {
|
synchronized (AppManager.class) {
|
||||||
@@ -197,6 +214,7 @@ public class AppManager {
|
|||||||
.sorted(getAppComparator())
|
.sorted(getAppComparator())
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
final int[] hotseatCounter = {0};
|
||||||
IntStream.range(0, allFirstApps.size())
|
IntStream.range(0, allFirstApps.size())
|
||||||
.forEach(new IntConsumer() {
|
.forEach(new IntConsumer() {
|
||||||
@Override
|
@Override
|
||||||
@@ -207,6 +225,24 @@ public class AppManager {
|
|||||||
} else {
|
} else {
|
||||||
appInfo.setOutside(0);
|
appInfo.setOutside(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (DEFAULT_DIALER_PACKAGE.contains(appInfo.getPackageName())) {
|
||||||
|
appInfo.setHotseat(1);
|
||||||
|
appInfo.setHotseatPosition(hotseatCounter[0]++);
|
||||||
|
} else if (DEFAULT_CONTACT_PACKAGE.contains(appInfo.getPackageName())) {
|
||||||
|
appInfo.setHotseat(1);
|
||||||
|
appInfo.setHotseatPosition(hotseatCounter[0]++);
|
||||||
|
} else if (DEFAULT_MESSAGE_PACKAGE.contains(appInfo.getPackageName())) {
|
||||||
|
appInfo.setHotseat(1);
|
||||||
|
appInfo.setHotseatPosition(hotseatCounter[0]++);
|
||||||
|
} else if (DEFAULT_SETTINGS_PACKAGE.contains(appInfo.getPackageName())) {
|
||||||
|
appInfo.setHotseat(1);
|
||||||
|
appInfo.setHotseatPosition(hotseatCounter[0]++);
|
||||||
|
} else {
|
||||||
|
appInfo.setHotseat(0);
|
||||||
|
appInfo.setHotseatPosition(0);
|
||||||
|
}
|
||||||
|
|
||||||
appInfo.setPosition(index);
|
appInfo.setPosition(index);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.qweather.sdk.QWeather;
|
|||||||
import com.qweather.sdk.basic.Lang;
|
import com.qweather.sdk.basic.Lang;
|
||||||
import com.qweather.sdk.basic.Unit;
|
import com.qweather.sdk.basic.Unit;
|
||||||
import com.qweather.sdk.parameter.weather.WeatherParameter;
|
import com.qweather.sdk.parameter.weather.WeatherParameter;
|
||||||
|
import com.qweather.sdk.response.error.ErrorResponse;
|
||||||
import com.qweather.sdk.response.weather.WeatherDailyResponse;
|
import com.qweather.sdk.response.weather.WeatherDailyResponse;
|
||||||
import com.qweather.sdk.response.weather.WeatherHourlyResponse;
|
import com.qweather.sdk.response.weather.WeatherHourlyResponse;
|
||||||
import com.qweather.sdk.response.weather.WeatherNowResponse;
|
import com.qweather.sdk.response.weather.WeatherNowResponse;
|
||||||
@@ -33,6 +34,10 @@ import io.reactivex.rxjava3.core.ObservableOnSubscribe;
|
|||||||
import io.reactivex.rxjava3.core.Observer;
|
import io.reactivex.rxjava3.core.Observer;
|
||||||
import io.reactivex.rxjava3.disposables.Disposable;
|
import io.reactivex.rxjava3.disposables.Disposable;
|
||||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||||
|
import kotlinx.coroutines.CoroutineScope;
|
||||||
|
import kotlinx.coroutines.CoroutineStart;
|
||||||
|
import kotlinx.coroutines.Dispatchers;
|
||||||
|
import kotlinx.coroutines.GlobalScope;
|
||||||
|
|
||||||
public class WeatherManager {
|
public class WeatherManager {
|
||||||
private static final String TAG = "WeatherManager";
|
private static final String TAG = "WeatherManager";
|
||||||
@@ -44,10 +49,11 @@ public class WeatherManager {
|
|||||||
private Map<String, String> LocationIDMap = new HashMap<>();
|
private Map<String, String> LocationIDMap = new HashMap<>();
|
||||||
private boolean loadCsvFinish = false;
|
private boolean loadCsvFinish = false;
|
||||||
private String mAdCode;
|
private String mAdCode;
|
||||||
|
private WeatherUpdateManager weatherUpdateManager;
|
||||||
|
|
||||||
private WeatherManager(Context context) {
|
private WeatherManager(Context context) {
|
||||||
this.mContext = context.getApplicationContext();
|
this.mContext = context.getApplicationContext();
|
||||||
|
weatherUpdateManager = WeatherUpdateManager.Companion.getInstance();
|
||||||
initCsv();
|
initCsv();
|
||||||
try {
|
try {
|
||||||
// 通过SDK提供的JWTGenerator设置令牌生成器,其实现自TokenGenerator接口
|
// 通过SDK提供的JWTGenerator设置令牌生成器,其实现自TokenGenerator接口
|
||||||
@@ -155,7 +161,30 @@ public class WeatherManager {
|
|||||||
WeatherParameter parameter = new WeatherParameter(locationID)
|
WeatherParameter parameter = new WeatherParameter(locationID)
|
||||||
.lang(Lang.ZH_HANS)
|
.lang(Lang.ZH_HANS)
|
||||||
.unit(Unit.METRIC);
|
.unit(Unit.METRIC);
|
||||||
mQWeather.weatherNow(parameter, callback);
|
mQWeather.weatherNow(parameter, new Callback<WeatherNowResponse>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(WeatherNowResponse weatherNowResponse) {
|
||||||
|
Logger.e(TAG, "getWeatherNow", "onSuccess: " + weatherNowResponse);
|
||||||
|
weatherUpdateManager.publishWeatherNowUpdate(weatherNowResponse);
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onSuccess(weatherNowResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(ErrorResponse errorResponse) {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onFailure(errorResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(Throwable throwable) {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onException(throwable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getWeather24h(String adCode, Callback<WeatherHourlyResponse> callback) {
|
public void getWeather24h(String adCode, Callback<WeatherHourlyResponse> callback) {
|
||||||
@@ -164,7 +193,30 @@ public class WeatherManager {
|
|||||||
WeatherParameter parameter = new WeatherParameter(locationID)
|
WeatherParameter parameter = new WeatherParameter(locationID)
|
||||||
.lang(Lang.ZH_HANS)
|
.lang(Lang.ZH_HANS)
|
||||||
.unit(Unit.METRIC);
|
.unit(Unit.METRIC);
|
||||||
mQWeather.weather24h(parameter, callback);
|
mQWeather.weather24h(parameter, new Callback<WeatherHourlyResponse>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(WeatherHourlyResponse weatherHourlyResponse) {
|
||||||
|
Logger.e(TAG, "getWeather24h", "onSuccess: " + weatherHourlyResponse);
|
||||||
|
weatherUpdateManager.publishWeatherHourlyUpdate(weatherHourlyResponse);
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onSuccess(weatherHourlyResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(ErrorResponse errorResponse) {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onFailure(errorResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(Throwable throwable) {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onException(throwable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getWeather10D(String adCode, Callback<WeatherDailyResponse> callback) {
|
public void getWeather10D(String adCode, Callback<WeatherDailyResponse> callback) {
|
||||||
@@ -173,7 +225,30 @@ public class WeatherManager {
|
|||||||
WeatherParameter parameter = new WeatherParameter(locationID)
|
WeatherParameter parameter = new WeatherParameter(locationID)
|
||||||
.lang(Lang.ZH_HANS)
|
.lang(Lang.ZH_HANS)
|
||||||
.unit(Unit.METRIC);
|
.unit(Unit.METRIC);
|
||||||
mQWeather.weather10d(parameter, callback);
|
mQWeather.weather10d(parameter, new Callback<WeatherDailyResponse>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(WeatherDailyResponse weatherDailyResponse) {
|
||||||
|
Logger.e(TAG, "getWeather10D", "onSuccess: " + weatherDailyResponse);
|
||||||
|
weatherUpdateManager.publishWeatherDailyUpdate(weatherDailyResponse);
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onSuccess(weatherDailyResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(ErrorResponse errorResponse) {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onFailure(errorResponse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(Throwable throwable) {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onException(throwable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,104 @@
|
|||||||
|
package com.ttstd.dialer.manager
|
||||||
|
|
||||||
|
import com.qweather.sdk.response.weather.WeatherDailyResponse
|
||||||
|
import com.qweather.sdk.response.weather.WeatherHourlyResponse
|
||||||
|
import com.qweather.sdk.response.weather.WeatherNowResponse
|
||||||
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
import kotlinx.coroutines.Job
|
||||||
|
import kotlinx.coroutines.SupervisorJob
|
||||||
|
import kotlinx.coroutines.flow.MutableSharedFlow
|
||||||
|
import kotlinx.coroutines.flow.SharedFlow
|
||||||
|
import kotlinx.coroutines.flow.asSharedFlow
|
||||||
|
import kotlinx.coroutines.flow.launchIn
|
||||||
|
import kotlinx.coroutines.flow.onEach
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 天气数据更新管理器
|
||||||
|
* 使用 Kotlin Flow 实现观察者模式,替代 LiveEventBus
|
||||||
|
*/
|
||||||
|
class WeatherUpdateManager {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@Volatile
|
||||||
|
private var INSTANCE: WeatherUpdateManager? = null
|
||||||
|
|
||||||
|
fun getInstance(): WeatherUpdateManager {
|
||||||
|
return INSTANCE ?: synchronized(this) {
|
||||||
|
INSTANCE ?: WeatherUpdateManager().also { INSTANCE = it }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建一个共享的协程作用域
|
||||||
|
private val scope = CoroutineScope(SupervisorJob() + Dispatchers.IO)
|
||||||
|
|
||||||
|
// 用于发布天气数据更新的 MutableSharedFlow
|
||||||
|
private val _weatherNowUpdates = MutableSharedFlow<WeatherNowResponse?>(replay = 1)
|
||||||
|
private val _weatherHourlyUpdates = MutableSharedFlow<WeatherHourlyResponse?>(replay = 1)
|
||||||
|
private val _weatherDailyUpdates = MutableSharedFlow<WeatherDailyResponse?>(replay = 1)
|
||||||
|
|
||||||
|
// 对外暴露的只读 Flow
|
||||||
|
val weatherNowUpdates: SharedFlow<WeatherNowResponse?> = _weatherNowUpdates.asSharedFlow()
|
||||||
|
val weatherHourlyUpdates: SharedFlow<WeatherHourlyResponse?> =
|
||||||
|
_weatherHourlyUpdates.asSharedFlow()
|
||||||
|
val weatherDailyUpdates: SharedFlow<WeatherDailyResponse?> = _weatherDailyUpdates.asSharedFlow()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布当前天气更新事件
|
||||||
|
* @param weatherData 当前天气数据
|
||||||
|
*/
|
||||||
|
fun publishWeatherNowUpdate(weatherData: WeatherNowResponse?) {
|
||||||
|
scope.launch {
|
||||||
|
_weatherNowUpdates.emit(weatherData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布逐小时天气更新事件
|
||||||
|
* @param weatherData 逐小时天气数据
|
||||||
|
*/
|
||||||
|
fun publishWeatherHourlyUpdate(weatherData: WeatherHourlyResponse?) {
|
||||||
|
scope.launch {
|
||||||
|
_weatherHourlyUpdates.emit(weatherData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布每日天气更新事件
|
||||||
|
* @param weatherData 每日天气数据
|
||||||
|
*/
|
||||||
|
fun publishWeatherDailyUpdate(weatherData: WeatherDailyResponse?) {
|
||||||
|
scope.launch {
|
||||||
|
_weatherDailyUpdates.emit(weatherData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun observeWeatherNow(
|
||||||
|
scope: CoroutineScope,
|
||||||
|
observer: (WeatherNowResponse?) -> Unit
|
||||||
|
): Job {
|
||||||
|
return weatherNowUpdates
|
||||||
|
.onEach { observer(it) }
|
||||||
|
.launchIn(scope)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun observeWeatherHourly(
|
||||||
|
scope: CoroutineScope,
|
||||||
|
observer: (WeatherHourlyResponse?) -> Unit
|
||||||
|
): Job {
|
||||||
|
return weatherHourlyUpdates
|
||||||
|
.onEach { observer(it) }
|
||||||
|
.launchIn(scope)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun observeWeatherDaily(
|
||||||
|
scope: CoroutineScope,
|
||||||
|
observer: (WeatherDailyResponse?) -> Unit
|
||||||
|
): Job {
|
||||||
|
return weatherDailyUpdates
|
||||||
|
.onEach { observer(it) }
|
||||||
|
.launchIn(scope)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
package com.ttstd.dialer.view;
|
|
||||||
|
|
||||||
import android.graphics.Rect;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import com.ttstd.dialer.utils.ScreenUtils;
|
|
||||||
|
|
||||||
public class EqualHeightDecoration extends RecyclerView.ItemDecoration {
|
|
||||||
private int rowCount;
|
|
||||||
|
|
||||||
public EqualHeightDecoration(int rowCount) {
|
|
||||||
this.rowCount = rowCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
|
|
||||||
int recyclerViewHeight = parent.getHeight();
|
|
||||||
int height = recyclerViewHeight - 6 * ScreenUtils.dp2px(view.getResources(), 4);
|
|
||||||
int itemHeight = recyclerViewHeight / rowCount;
|
|
||||||
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
||||||
params.height = itemHeight;
|
|
||||||
view.setLayoutParams(params);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
package com.ttstd.dialer.view;
|
||||||
|
|
||||||
|
import android.graphics.Rect;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.ttstd.dialer.utils.ScreenUtils;
|
||||||
|
|
||||||
|
public class EqualSpaceDecoration extends RecyclerView.ItemDecoration {
|
||||||
|
private int rowCount;
|
||||||
|
private int spacing;
|
||||||
|
private Integer cachedItemWidth = null;
|
||||||
|
private Integer cachedItemHeight = null;
|
||||||
|
|
||||||
|
public EqualSpaceDecoration(int rowCount, int spacing) {
|
||||||
|
this.rowCount = rowCount;
|
||||||
|
this.spacing = spacing;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
|
||||||
|
int recyclerViewWidth = parent.getWidth();
|
||||||
|
int recyclerViewHeight = parent.getHeight();
|
||||||
|
|
||||||
|
int dpSpacing = ScreenUtils.dp2px(view.getResources(), spacing);
|
||||||
|
|
||||||
|
// 获取实际的列数
|
||||||
|
int actualColumnCount = 2; // 默认2列
|
||||||
|
if (parent.getLayoutManager() instanceof GridLayoutManager) {
|
||||||
|
GridLayoutManager layoutManager = (GridLayoutManager) parent.getLayoutManager();
|
||||||
|
actualColumnCount = layoutManager.getSpanCount();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 计算总item数量
|
||||||
|
int totalItemCount = parent.getAdapter() != null ? parent.getAdapter().getItemCount() : 0;
|
||||||
|
if (totalItemCount == 0) {
|
||||||
|
outRect.set(0, 0, 0, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 计算item的宽度
|
||||||
|
// recyclerView宽度 - 左右固定间距(2*spacing) - 中间列间距((columnCount-1)*spacing) / 列数
|
||||||
|
int totalHorizontalSpacing = 2 * dpSpacing + (actualColumnCount - 1) * dpSpacing;
|
||||||
|
int itemWidth = (recyclerViewWidth - totalHorizontalSpacing) / actualColumnCount;
|
||||||
|
|
||||||
|
// 计算item的高度
|
||||||
|
// recyclerView高度 - 上下固定间距(2*spacing) - 中间行间距((rowCount-1)*spacing) / 行数
|
||||||
|
int totalVerticalSpacing = 2 * dpSpacing + (rowCount - 1) * dpSpacing;
|
||||||
|
int itemHeight = (recyclerViewHeight - totalVerticalSpacing) / rowCount;
|
||||||
|
|
||||||
|
// 缓存计算的尺寸,避免重复计算
|
||||||
|
if (cachedItemWidth == null || cachedItemHeight == null) {
|
||||||
|
cachedItemWidth = itemWidth;
|
||||||
|
cachedItemHeight = itemHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置item的尺寸
|
||||||
|
ViewGroup.LayoutParams params = view.getLayoutParams();
|
||||||
|
params.width = cachedItemWidth;
|
||||||
|
params.height = cachedItemHeight;
|
||||||
|
view.setLayoutParams(params);
|
||||||
|
|
||||||
|
// 获取当前item的位置
|
||||||
|
int position = parent.getChildAdapterPosition(view);
|
||||||
|
if (position == RecyclerView.NO_POSITION) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 计算item所在的行和列
|
||||||
|
int row = position / actualColumnCount;
|
||||||
|
int column = position % actualColumnCount;
|
||||||
|
|
||||||
|
// 计算左边距:只有第一列设置spacing,其他列不设置
|
||||||
|
int left = column == 0 ? dpSpacing : 0;
|
||||||
|
|
||||||
|
// 计算上边距:只有第一行设置spacing,其他行不设置
|
||||||
|
int top = row == 0 ? dpSpacing : 0;
|
||||||
|
|
||||||
|
// 计算右边距:只有最后一列设置spacing,其他列不设置
|
||||||
|
int right = column == actualColumnCount - 1 ? dpSpacing : 0;
|
||||||
|
|
||||||
|
// 计算下边距:只有最后一行设置spacing,其他行不设置
|
||||||
|
int bottom = row == rowCount - 1 ? dpSpacing : 0;
|
||||||
|
|
||||||
|
outRect.set(left, top, right, bottom);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.ttstd.dialer.view;
|
||||||
|
|
||||||
|
import android.graphics.Rect;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
public class EquallyDividedItemDecoration extends RecyclerView.ItemDecoration {
|
||||||
|
private static final String TAG = "EquallyDividedItemDecoration";
|
||||||
|
|
||||||
|
private int mSpanCount;// 横条目数量
|
||||||
|
private int mHalfRowSpacing;// 行间距的一半
|
||||||
|
private int mHalfColumnSpacing;// 列间距的一半
|
||||||
|
|
||||||
|
public EquallyDividedItemDecoration(int spanCount, int halfRowSpacing) {
|
||||||
|
mSpanCount = spanCount;
|
||||||
|
mHalfRowSpacing = halfRowSpacing;
|
||||||
|
mHalfColumnSpacing = halfRowSpacing;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EquallyDividedItemDecoration(int spanCount, int halfRowSpacing, int halfColumnSpacing) {
|
||||||
|
mSpanCount = spanCount;
|
||||||
|
mHalfRowSpacing = halfRowSpacing;
|
||||||
|
mHalfColumnSpacing = halfColumnSpacing;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent,
|
||||||
|
@NonNull RecyclerView.State state) {
|
||||||
|
super.getItemOffsets(outRect, view, parent, state);
|
||||||
|
int position = parent.getChildAdapterPosition(view); // 获取view 在adapter中的位置。
|
||||||
|
Log.d(TAG, "getItemOffsets: position = " + position);
|
||||||
|
|
||||||
|
int itemCount = parent.getAdapter().getItemCount();// item全部数量
|
||||||
|
Log.d(TAG, "getItemOffsets: itemCount = " + itemCount);
|
||||||
|
|
||||||
|
int column = position % mSpanCount; // view 所在的列
|
||||||
|
Log.d(TAG, "getItemOffsets: column = " + column);
|
||||||
|
|
||||||
|
if (column == 0) {
|
||||||
|
outRect.left = 2 * mHalfRowSpacing;
|
||||||
|
outRect.right = mHalfRowSpacing;
|
||||||
|
} else if (column == mSpanCount - 1) {
|
||||||
|
outRect.left = mHalfRowSpacing;
|
||||||
|
outRect.right = 2 * mHalfRowSpacing;
|
||||||
|
} else {
|
||||||
|
outRect.left = mHalfRowSpacing;
|
||||||
|
outRect.right = mHalfRowSpacing;
|
||||||
|
}
|
||||||
|
|
||||||
|
int row = (position / mSpanCount);// 所在行
|
||||||
|
Log.d(TAG, "getItemOffsets: row = " + row);
|
||||||
|
int maxRow = (int) Math.ceil((double) itemCount / mSpanCount);// 一共多少行
|
||||||
|
Log.d(TAG, "getItemOffsets: maxRow = " + maxRow);
|
||||||
|
|
||||||
|
if (row == 0) {
|
||||||
|
outRect.top = 2 * mHalfColumnSpacing;
|
||||||
|
outRect.bottom = mHalfColumnSpacing;
|
||||||
|
} else if (row == maxRow - 1) {
|
||||||
|
outRect.top = mHalfColumnSpacing;
|
||||||
|
outRect.bottom = 2 * mHalfColumnSpacing;
|
||||||
|
} else {
|
||||||
|
outRect.top = mHalfColumnSpacing;
|
||||||
|
outRect.bottom = mHalfColumnSpacing;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d(TAG, "getItemOffsets: outRect.left = " + outRect.left);
|
||||||
|
Log.d(TAG, "getItemOffsets: outRect.right = " + outRect.right);
|
||||||
|
Log.d(TAG, "getItemOffsets: outRect.top = " + outRect.top);
|
||||||
|
Log.d(TAG, "getItemOffsets: outRect.bottom = " + outRect.bottom);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.ttstd.dialer.view;
|
||||||
|
|
||||||
|
import android.graphics.Rect;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述 : RecyclerView GridLayoutManager 等间距。
|
||||||
|
* <p>
|
||||||
|
* 等间距需满足两个条件:
|
||||||
|
* 1.各个模块的大小相等,即 各列的left+right 值相等;
|
||||||
|
* 2.各列的间距相等,即 前列的right + 后列的left = 列间距;
|
||||||
|
* <p>
|
||||||
|
* 在{@link #getItemOffsets(Rect, View, RecyclerView, RecyclerView.State)} 中针对 outRect 的left 和right 满足这两个条件即可
|
||||||
|
* <p>
|
||||||
|
* 作者 : shiguotao
|
||||||
|
* 版本 : V1
|
||||||
|
* 创建时间 : 2020/3/19 4:54 PM
|
||||||
|
*/
|
||||||
|
public class GridSpaceItemDecoration extends RecyclerView.ItemDecoration {
|
||||||
|
|
||||||
|
private final String TAG = "GridSpaceItemDecoration";
|
||||||
|
|
||||||
|
private int mSpanCount;//横条目数量
|
||||||
|
private int mRowSpacing;//行间距
|
||||||
|
private int mColumnSpacing;// 列间距
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param spanCount 列数
|
||||||
|
* @param rowSpacing 行间距
|
||||||
|
* @param columnSpacing 列间距
|
||||||
|
*/
|
||||||
|
public GridSpaceItemDecoration(int spanCount, int rowSpacing, int columnSpacing) {
|
||||||
|
this.mSpanCount = spanCount;
|
||||||
|
this.mRowSpacing = rowSpacing;
|
||||||
|
this.mColumnSpacing = columnSpacing;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
|
||||||
|
int position = parent.getChildAdapterPosition(view); // 获取view 在adapter中的位置。
|
||||||
|
int column = position % mSpanCount; // view 所在的列
|
||||||
|
|
||||||
|
outRect.left = column * mColumnSpacing / mSpanCount; // column * (列间距 * (1f / 列数))
|
||||||
|
outRect.right = mColumnSpacing - (column + 1) * mColumnSpacing / mSpanCount; // 列间距 - (column + 1) * (列间距 * (1f /列数))
|
||||||
|
|
||||||
|
Log.e(TAG, "position:" + position
|
||||||
|
+ " columnIndex: " + column
|
||||||
|
+ " left,right ->" + outRect.left + "," + outRect.right);
|
||||||
|
|
||||||
|
// 如果position > 行数,说明不是在第一行,则不指定行高,其他行的上间距为 top=mRowSpacing
|
||||||
|
if (position >= mSpanCount) {
|
||||||
|
outRect.top = mRowSpacing; // item top
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
package com.ttstd.dialer.wallpager;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.graphics.Canvas;
|
||||||
|
import android.graphics.Paint;
|
||||||
|
import android.graphics.RectF;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
public class WallpaperBackgroundView extends View {
|
||||||
|
|
||||||
|
private Bitmap wallpaperBitmap;
|
||||||
|
private Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG);
|
||||||
|
|
||||||
|
private float progress = 0f;
|
||||||
|
|
||||||
|
public WallpaperBackgroundView(Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public WallpaperBackgroundView(Context context, AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWallpaperBitmap(Bitmap bitmap) {
|
||||||
|
this.wallpaperBitmap = bitmap;
|
||||||
|
invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param progress 0 ~ 1
|
||||||
|
*/
|
||||||
|
public void setScrollProgress(float progress) {
|
||||||
|
this.progress = Math.max(0f, Math.min(1f, progress));
|
||||||
|
invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDraw(Canvas canvas) {
|
||||||
|
super.onDraw(canvas);
|
||||||
|
|
||||||
|
if (wallpaperBitmap == null || wallpaperBitmap.isRecycled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int viewWidth = getWidth();
|
||||||
|
int viewHeight = getHeight();
|
||||||
|
|
||||||
|
int bitmapWidth = wallpaperBitmap.getWidth();
|
||||||
|
int bitmapHeight = wallpaperBitmap.getHeight();
|
||||||
|
|
||||||
|
// 让图片铺满高度
|
||||||
|
float scale = Math.max(
|
||||||
|
viewHeight * 1f / bitmapHeight,
|
||||||
|
viewWidth * 1f / bitmapWidth
|
||||||
|
);
|
||||||
|
|
||||||
|
float scaledWidth = bitmapWidth * scale;
|
||||||
|
float scaledHeight = bitmapHeight * scale;
|
||||||
|
|
||||||
|
// 图片比屏幕宽出的部分,用于横向滑动
|
||||||
|
float maxMoveX = Math.max(0, scaledWidth - viewWidth);
|
||||||
|
|
||||||
|
float left = -maxMoveX * progress;
|
||||||
|
float top = (viewHeight - scaledHeight) / 2f;
|
||||||
|
|
||||||
|
RectF dst = new RectF(
|
||||||
|
left,
|
||||||
|
top,
|
||||||
|
left + scaledWidth,
|
||||||
|
top + scaledHeight
|
||||||
|
);
|
||||||
|
|
||||||
|
canvas.drawBitmap(wallpaperBitmap, null, dst, paint);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
package com.ttstd.dialer.wallpager;
|
||||||
|
|
||||||
|
import android.app.WallpaperManager;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.graphics.Canvas;
|
||||||
|
import android.graphics.drawable.BitmapDrawable;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.os.Build;
|
||||||
|
|
||||||
|
public class WallpaperBitmapUtils {
|
||||||
|
|
||||||
|
public static Bitmap getCurrentWallpaperBitmap(Context context) {
|
||||||
|
WallpaperManager manager = WallpaperManager.getInstance(context);
|
||||||
|
|
||||||
|
try {
|
||||||
|
Drawable drawable;
|
||||||
|
|
||||||
|
if (Build.VERSION.SDK_INT >= 34) {
|
||||||
|
// Android 14+ 普通 App 基本不要再用 getDrawable()
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
drawable = manager.getDrawable();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (drawable == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (drawable instanceof BitmapDrawable) {
|
||||||
|
return ((BitmapDrawable) drawable).getBitmap();
|
||||||
|
}
|
||||||
|
|
||||||
|
int width = Math.max(1, drawable.getIntrinsicWidth());
|
||||||
|
int height = Math.max(1, drawable.getIntrinsicHeight());
|
||||||
|
|
||||||
|
Bitmap bitmap = Bitmap.createBitmap(
|
||||||
|
width,
|
||||||
|
height,
|
||||||
|
Bitmap.Config.ARGB_8888
|
||||||
|
);
|
||||||
|
|
||||||
|
Canvas canvas = new Canvas(bitmap);
|
||||||
|
drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
|
||||||
|
drawable.draw(canvas);
|
||||||
|
|
||||||
|
return bitmap;
|
||||||
|
|
||||||
|
} catch (SecurityException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return null;
|
||||||
|
} catch (Throwable e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
package com.ttstd.dialer.wallpager;
|
||||||
|
|
||||||
|
import android.app.WallpaperManager;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.IBinder;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
public class WallpaperScrollHelper {
|
||||||
|
|
||||||
|
private static final String TAG = "WallpaperScrollHelper";
|
||||||
|
|
||||||
|
private final Context context;
|
||||||
|
private final WallpaperManager wallpaperManager;
|
||||||
|
private final View windowView;
|
||||||
|
|
||||||
|
private int pageCount;
|
||||||
|
|
||||||
|
public WallpaperScrollHelper(Context context, View windowView, int pageCount) {
|
||||||
|
this.context = context.getApplicationContext();
|
||||||
|
this.windowView = windowView;
|
||||||
|
this.wallpaperManager = WallpaperManager.getInstance(context);
|
||||||
|
this.pageCount = Math.max(1, pageCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onResume() {
|
||||||
|
setupWallpaperOffsetSteps();
|
||||||
|
syncWallpaperOffset(0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onDestroy() {
|
||||||
|
// 可选:清理偏移
|
||||||
|
try {
|
||||||
|
IBinder token = windowView.getWindowToken();
|
||||||
|
if (token != null) {
|
||||||
|
wallpaperManager.clearWallpaperOffsets(token);
|
||||||
|
}
|
||||||
|
} catch (Throwable ignored) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPageCount(int pageCount) {
|
||||||
|
this.pageCount = Math.max(1, pageCount);
|
||||||
|
setupWallpaperOffsetSteps();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupWallpaperOffsetSteps() {
|
||||||
|
if (pageCount <= 1) {
|
||||||
|
wallpaperManager.setWallpaperOffsetSteps(1f, 1f);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
float step = 1f / (pageCount - 1);
|
||||||
|
|
||||||
|
try {
|
||||||
|
wallpaperManager.setWallpaperOffsetSteps(step, 1f);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
Log.w(TAG, "setWallpaperOffsetSteps failed", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param scrollProgress 总滑动进度,范围 0 ~ 1
|
||||||
|
* 第 1 页是 0
|
||||||
|
* 最后一页是 1
|
||||||
|
*/
|
||||||
|
public void syncWallpaperOffset(float scrollProgress) {
|
||||||
|
scrollProgress = clamp(scrollProgress, 0f, 1f);
|
||||||
|
|
||||||
|
IBinder token = windowView.getWindowToken();
|
||||||
|
if (token == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// yOffset 通常保持 0.5f
|
||||||
|
wallpaperManager.setWallpaperOffsets(token, scrollProgress, 0.5f);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
Log.w(TAG, "setWallpaperOffsets IllegalArgumentException", e);
|
||||||
|
} catch (Throwable e) {
|
||||||
|
Log.w(TAG, "setWallpaperOffsets failed", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据 scrollX 转换成 0~1 的壁纸偏移。
|
||||||
|
*/
|
||||||
|
public void syncWithScroll(int scrollX, int pageWidth) {
|
||||||
|
if (pageCount <= 1 || pageWidth <= 0) {
|
||||||
|
syncWallpaperOffset(0f);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int maxScrollX = pageWidth * (pageCount - 1);
|
||||||
|
float progress = scrollX * 1f / maxScrollX;
|
||||||
|
|
||||||
|
syncWallpaperOffset(progress);
|
||||||
|
}
|
||||||
|
|
||||||
|
private float clamp(float value, float min, float max) {
|
||||||
|
return Math.max(min, Math.min(max, value));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
package com.ttstd.dialer.wallpager;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
|
public class WallpaperViewPager extends ViewPager {
|
||||||
|
|
||||||
|
private int pageCount = 1;
|
||||||
|
private WallpaperScrollHelper wallpaperScrollHelper;
|
||||||
|
|
||||||
|
private final OnPageChangeListener wallpaperSyncListener = new OnPageChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||||
|
syncWallpaper(position, positionOffset);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPageSelected(int position) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPageScrollStateChanged(int state) {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public WallpaperViewPager(@NonNull Context context) {
|
||||||
|
this(context, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public WallpaperViewPager(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void init() {
|
||||||
|
setBackgroundColor(Color.TRANSPARENT);
|
||||||
|
addOnPageChangeListener(wallpaperSyncListener);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWallpaperScrollHelper(WallpaperScrollHelper helper) {
|
||||||
|
this.wallpaperScrollHelper = helper;
|
||||||
|
if (helper != null) {
|
||||||
|
helper.setPageCount(pageCount);
|
||||||
|
post(this::syncWallpaperFromCurrentItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPageCount(int count) {
|
||||||
|
pageCount = Math.max(1, count);
|
||||||
|
if (wallpaperScrollHelper != null) {
|
||||||
|
wallpaperScrollHelper.setPageCount(pageCount);
|
||||||
|
post(this::syncWallpaperFromCurrentItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCurrentItem(int item) {
|
||||||
|
super.setCurrentItem(item);
|
||||||
|
syncWallpaperFromCurrentItem();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCurrentItem(int item, boolean smoothScroll) {
|
||||||
|
super.setCurrentItem(item, smoothScroll);
|
||||||
|
syncWallpaperFromCurrentItem();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void syncWallpaper(int position, float positionOffset) {
|
||||||
|
if (wallpaperScrollHelper == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (pageCount <= 1) {
|
||||||
|
wallpaperScrollHelper.syncWallpaperOffset(0f);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
float progress = (position + positionOffset) / (pageCount - 1f);
|
||||||
|
wallpaperScrollHelper.syncWallpaperOffset(progress);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void syncWallpaperFromCurrentItem() {
|
||||||
|
syncWallpaper(getCurrentItem(), 0f);
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
app/src/main/res/drawable-xxxhdpi/main_wallpaper.png
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/main_wallpaper.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 MiB |
21
app/src/main/res/drawable/main_hotseat_background.xml
Normal file
21
app/src/main/res/drawable/main_hotseat_background.xml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
|
||||||
|
<!-- 填充的颜色:这里设置背景透明 -->
|
||||||
|
<solid android:color="@color/card_background_color" />
|
||||||
|
<!-- 边框的颜色 :不能和窗口背景色一样 -->
|
||||||
|
|
||||||
|
<!-- 设置按钮的四个角为弧形 -->
|
||||||
|
<!-- android:radius 弧形的半径 -->
|
||||||
|
<corners android:radius="@dimen/card_radius" />
|
||||||
|
|
||||||
|
|
||||||
|
<!-- padding:Button里面的文字与Button边界的间隔 -->
|
||||||
|
<!-- <padding-->
|
||||||
|
<!-- android:bottom="10dp"-->
|
||||||
|
<!-- android:left="10dp"-->
|
||||||
|
<!-- android:right="10dp"-->
|
||||||
|
<!-- android:top="10dp" />-->
|
||||||
|
|
||||||
|
</shape>
|
||||||
@@ -13,10 +13,9 @@
|
|||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:background="@color/default_background_color"
|
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.viewpager.widget.ViewPager
|
<com.ttstd.dialer.wallpager.WallpaperViewPager
|
||||||
android:id="@+id/viewPager"
|
android:id="@+id/viewPager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
@@ -28,13 +27,32 @@
|
|||||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||||
android:id="@+id/magicIndicator"
|
android:id="@+id/magicIndicator"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/dp_16"
|
android:layout_height="@dimen/dp_32"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toTopOf="@+id/cl_hotseat"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/cl_hotseat"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_100"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<GridView
|
||||||
|
android:id="@+id/gv_app"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginHorizontal="@dimen/dp_8"
|
||||||
|
android:background="@drawable/main_hotseat_background"
|
||||||
|
android:numColumns="auto_fit"
|
||||||
|
android:orientation="horizontal" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</layout>
|
</layout>
|
||||||
@@ -24,213 +24,222 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.cardview.widget.CardView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="3"
|
android:layout_weight="3"
|
||||||
android:orientation="horizontal">
|
app:cardBackgroundColor="@color/card_background_color"
|
||||||
|
app:cardCornerRadius="@dimen/card_radius"
|
||||||
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center"
|
android:layout_weight="1">
|
||||||
android:layout_weight="1"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<TextView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/tv_time"
|
android:layout_width="0dp"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:layout_gravity="center"
|
||||||
android:shadowColor="#80000000"
|
android:layout_weight="1"
|
||||||
android:shadowDx="2"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:shadowDy="2"
|
|
||||||
android:shadowRadius="2"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:text="00:00"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="@dimen/sp_60"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.3"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
tools:text="00:00" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_date"
|
android:id="@+id/tv_time"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dp_16"
|
android:maxLines="1"
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
android:shadowColor="#80000000"
|
||||||
android:maxLines="1"
|
android:shadowDx="2"
|
||||||
android:shadowColor="#80000000"
|
android:shadowDy="2"
|
||||||
android:shadowDx="2"
|
android:shadowRadius="2"
|
||||||
android:shadowDy="2"
|
android:singleLine="true"
|
||||||
android:shadowRadius="2"
|
android:text="00:00"
|
||||||
android:singleLine="true"
|
android:textColor="@color/black"
|
||||||
android:textColor="@color/black"
|
android:textSize="@dimen/sp_60"
|
||||||
android:textSize="@dimen/sp_25"
|
android:textStyle="bold"
|
||||||
android:textStyle="bold"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintHorizontal_bias="0.3"
|
||||||
app:layout_constraintStart_toStartOf="@+id/tv_time"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_time"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:text="1月1日" />
|
tools:text="00:00" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_week"
|
android:id="@+id/tv_date"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
android:maxLines="1"
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
android:shadowColor="#80000000"
|
android:maxLines="1"
|
||||||
android:shadowDx="2"
|
android:shadowColor="#80000000"
|
||||||
android:shadowDy="2"
|
android:shadowDx="2"
|
||||||
android:shadowRadius="2"
|
android:shadowDy="2"
|
||||||
android:singleLine="true"
|
android:shadowRadius="2"
|
||||||
android:textColor="@color/black"
|
android:singleLine="true"
|
||||||
android:textSize="@dimen/sp_20"
|
android:textColor="@color/black"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:textSize="@dimen/sp_25"
|
||||||
app:layout_constraintStart_toStartOf="@+id/tv_date"
|
android:textStyle="bold"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_date"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
tools:text="星期一" />
|
app:layout_constraintStart_toStartOf="@+id/tv_time"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tv_time"
|
||||||
|
tools:text="1月1日" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_lunar"
|
android:id="@+id/tv_week"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:shadowColor="#80000000"
|
android:shadowColor="#80000000"
|
||||||
android:shadowDx="2"
|
android:shadowDx="2"
|
||||||
android:shadowDy="2"
|
android:shadowDy="2"
|
||||||
android:shadowRadius="2"
|
android:shadowRadius="2"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="@dimen/sp_20"
|
android:textSize="@dimen/sp_20"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@+id/tv_date"
|
app:layout_constraintStart_toStartOf="@+id/tv_date"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_week"
|
app:layout_constraintTop_toBottomOf="@+id/tv_date"
|
||||||
tools:text="正月初一" />
|
tools:text="星期一" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_lunar"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:shadowColor="#80000000"
|
||||||
|
android:shadowDx="2"
|
||||||
|
android:shadowDy="2"
|
||||||
|
android:shadowRadius="2"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/sp_20"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/tv_date"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tv_week"
|
||||||
|
tools:text="正月初一" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center"
|
android:layout_weight="1">
|
||||||
android:layout_weight="1"
|
|
||||||
android:onClick="@{click::openWeather}"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<TextView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/tv_temp_current"
|
android:layout_width="0dp"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:layout_gravity="center"
|
||||||
android:shadowColor="#80000000"
|
android:layout_weight="1"
|
||||||
android:shadowDx="2"
|
android:onClick="@{click::openWeather}"
|
||||||
android:shadowDy="2"
|
android:orientation="vertical"
|
||||||
android:shadowRadius="2"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:singleLine="true"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="@dimen/sp_60"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.7"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
tools:text="N/A°" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_location"
|
android:id="@+id/tv_temp_current"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
android:maxLines="1"
|
||||||
android:layout_marginEnd="@dimen/dp_16"
|
android:shadowColor="#80000000"
|
||||||
android:gravity="end"
|
android:shadowDx="2"
|
||||||
android:maxLines="1"
|
android:shadowDy="2"
|
||||||
android:shadowColor="#80000000"
|
android:shadowRadius="2"
|
||||||
android:shadowDx="2"
|
android:singleLine="true"
|
||||||
android:shadowDy="2"
|
android:textColor="@color/black"
|
||||||
android:shadowRadius="2"
|
android:textSize="@dimen/sp_60"
|
||||||
android:singleLine="true"
|
android:textStyle="bold"
|
||||||
android:textColor="@color/black"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:textSize="@dimen/sp_25"
|
app:layout_constraintHorizontal_bias="0.7"
|
||||||
android:textStyle="bold"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/tv_temp_current"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
tools:text="N/A°" />
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_temp_current"
|
|
||||||
tools:text="北京市" />
|
<TextView
|
||||||
|
android:id="@+id/tv_location"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
|
android:gravity="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:shadowColor="#80000000"
|
||||||
|
android:shadowDx="2"
|
||||||
|
android:shadowDy="2"
|
||||||
|
android:shadowRadius="2"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/sp_25"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/tv_temp_current"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tv_temp_current"
|
||||||
|
tools:text="北京市" />
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_weather"
|
android:id="@+id/tv_weather"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:shadowColor="#80000000"
|
android:shadowColor="#80000000"
|
||||||
android:shadowDx="2"
|
android:shadowDx="2"
|
||||||
android:shadowDy="2"
|
android:shadowDy="2"
|
||||||
android:shadowRadius="2"
|
android:shadowRadius="2"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="@dimen/sp_20"
|
android:textSize="@dimen/sp_20"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/tv_location"
|
app:layout_constraintEnd_toEndOf="@+id/tv_location"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_location"
|
app:layout_constraintTop_toBottomOf="@+id/tv_location"
|
||||||
tools:text="晴" />
|
tools:text="晴" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_temp"
|
android:id="@+id/tv_temp"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:shadowColor="#80000000"
|
android:shadowColor="#80000000"
|
||||||
android:shadowDx="2"
|
android:shadowDx="2"
|
||||||
android:shadowDy="2"
|
android:shadowDy="2"
|
||||||
android:shadowRadius="2"
|
android:shadowRadius="2"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="@dimen/sp_20"
|
android:textSize="@dimen/sp_20"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/tv_weather"
|
app:layout_constraintEnd_toEndOf="@+id/tv_weather"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_weather"
|
app:layout_constraintTop_toBottomOf="@+id/tv_weather"
|
||||||
tools:text="0°/10°" />
|
tools:text="0°/10°" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="5"
|
android:layout_weight="4"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -239,93 +248,111 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.cardview.widget.CardView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:onClick="@{click::openContact}"
|
app:cardBackgroundColor="@color/card_background_color"
|
||||||
android:orientation="horizontal">
|
app:cardCornerRadius="@dimen/card_radius"
|
||||||
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:onClick="@{click::openContact}"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:orientation="horizontal">
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<com.shehuan.niv.NiceImageView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/niceImageView1"
|
|
||||||
android:layout_width="@dimen/dp_100"
|
|
||||||
android:layout_height="@dimen/dp_100"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:src="@drawable/ic_contact"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:maxLines="1"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:singleLine="true"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:text="联系人"
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="@dimen/home_item_text_size"
|
<com.shehuan.niv.NiceImageView
|
||||||
android:textStyle="bold"
|
android:id="@+id/niceImageView1"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/niceImageView1"
|
android:layout_width="@dimen/dp_80"
|
||||||
app:layout_constraintStart_toStartOf="@+id/niceImageView1"
|
android:layout_height="@dimen/dp_80"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/niceImageView1" />
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/ic_contact"
|
||||||
|
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/dp_8"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="联系人"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/home_item_text_size"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/niceImageView1"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/niceImageView1"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/niceImageView1" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.cardview.widget.CardView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:onClick="@{click::openSettings}"
|
app:cardBackgroundColor="@color/card_background_color"
|
||||||
android:orientation="horizontal">
|
app:cardCornerRadius="@dimen/card_radius"
|
||||||
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:onClick="@{click::openSettings}"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:orientation="horizontal">
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<com.shehuan.niv.NiceImageView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/niceImageView2"
|
|
||||||
android:layout_width="@dimen/dp_100"
|
|
||||||
android:layout_height="@dimen/dp_100"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:src="@drawable/ic_settings"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:maxLines="1"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:singleLine="true"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:text="设置"
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="@dimen/home_item_text_size"
|
<com.shehuan.niv.NiceImageView
|
||||||
android:textStyle="bold"
|
android:id="@+id/niceImageView2"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/niceImageView2"
|
android:layout_width="@dimen/dp_80"
|
||||||
app:layout_constraintStart_toStartOf="@+id/niceImageView2"
|
android:layout_height="@dimen/dp_80"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/niceImageView2" />
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/ic_settings"
|
||||||
|
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/dp_8"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="设置"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/home_item_text_size"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/niceImageView2"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/niceImageView2"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/niceImageView2" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -335,97 +362,114 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.cardview.widget.CardView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:onClick="@{click::openDouyin}"
|
app:cardBackgroundColor="@color/card_background_color"
|
||||||
android:orientation="horizontal">
|
app:cardCornerRadius="@dimen/card_radius"
|
||||||
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:onClick="@{click::openDouyin}"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:orientation="horizontal">
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<com.shehuan.niv.NiceImageView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/niceImageView3"
|
|
||||||
android:layout_width="@dimen/dp_100"
|
|
||||||
android:layout_height="@dimen/dp_100"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:src="@drawable/ic_douyin"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:maxLines="1"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:singleLine="true"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:text="微信"
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="@dimen/home_item_text_size"
|
<com.shehuan.niv.NiceImageView
|
||||||
android:textStyle="bold"
|
android:id="@+id/niceImageView3"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/niceImageView3"
|
android:layout_width="@dimen/dp_80"
|
||||||
app:layout_constraintStart_toStartOf="@+id/niceImageView3"
|
android:layout_height="@dimen/dp_80"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/niceImageView3" />
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/ic_douyin"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
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/dp_8"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="微信"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/home_item_text_size"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/niceImageView3"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/niceImageView3"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/niceImageView3" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
<androidx.cardview.widget.CardView
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:onClick="@{click::openWeixin}"
|
app:cardBackgroundColor="@color/card_background_color"
|
||||||
android:orientation="horizontal">
|
app:cardCornerRadius="@dimen/card_radius"
|
||||||
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:onClick="@{click::openWeixin}"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:orientation="horizontal">
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<com.shehuan.niv.NiceImageView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/niceImageView4"
|
|
||||||
android:layout_width="@dimen/dp_100"
|
|
||||||
android:layout_height="@dimen/dp_100"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:src="@drawable/ic_weixin"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:maxLines="1"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:singleLine="true"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:text="抖音"
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="@dimen/home_item_text_size"
|
<com.shehuan.niv.NiceImageView
|
||||||
android:textStyle="bold"
|
android:id="@+id/niceImageView4"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/niceImageView4"
|
android:layout_width="@dimen/dp_80"
|
||||||
app:layout_constraintStart_toStartOf="@+id/niceImageView4"
|
android:layout_height="@dimen/dp_80"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/niceImageView4" />
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/ic_weixin"
|
||||||
|
android:textStyle="bold"
|
||||||
|
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/dp_8"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="抖音"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/home_item_text_size"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/niceImageView4"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/niceImageView4"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/niceImageView4" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -2,48 +2,62 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_120">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.cardview.widget.CardView
|
||||||
android:id="@+id/root"
|
android:id="@+id/cardView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:cardBackgroundColor="@color/card_background_color"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:cardCornerRadius="@dimen/card_radius"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:cardUseCompatPadding="true">
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<com.shehuan.niv.NiceImageView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/iv_icon"
|
android:id="@+id/root"
|
||||||
android:layout_width="@dimen/dp_60"
|
|
||||||
android:layout_height="@dimen/dp_60"
|
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:src="@mipmap/ic_launcher"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_app_name"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:layout_marginStart="@dimen/dp_16"
|
|
||||||
android:layout_marginEnd="@dimen/dp_16"
|
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:text="appname"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="@dimen/sp_16"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon" />
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
<com.shehuan.niv.NiceImageView
|
||||||
|
android:id="@+id/iv_icon"
|
||||||
|
android:layout_width="@dimen/dp_60"
|
||||||
|
android:layout_height="@dimen/dp_60"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@mipmap/ic_launcher"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.3" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_app_name"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="appname"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/iv_icon"
|
||||||
|
app:layout_constraintVertical_bias="0.26" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -4,7 +4,15 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.cardview.widget.CardView
|
||||||
|
android:id="@+id/cardView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:cardCornerRadius="@dimen/card_radius"
|
||||||
|
app:cardBackgroundColor="@color/card_background_color"
|
||||||
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/root"
|
android:id="@+id/root"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
@@ -14,8 +22,8 @@
|
|||||||
|
|
||||||
<com.shehuan.niv.NiceImageView
|
<com.shehuan.niv.NiceImageView
|
||||||
android:id="@+id/nv_avatar"
|
android:id="@+id/nv_avatar"
|
||||||
android:layout_width="@dimen/dp_120"
|
android:layout_width="@dimen/dp_108"
|
||||||
android:layout_height="@dimen/dp_120"
|
android:layout_height="@dimen/dp_108"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@drawable/ic_default_avatar"
|
android:src="@drawable/ic_default_avatar"
|
||||||
@@ -25,7 +33,7 @@
|
|||||||
app:layout_constraintHorizontal_bias="0.5"
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintVertical_bias="0.159" />
|
app:layout_constraintVertical_bias="0.12" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -35,7 +43,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/nv_avatar"
|
app:layout_constraintTop_toBottomOf="@+id/nv_avatar"
|
||||||
app:layout_constraintVertical_bias="0.5">
|
app:layout_constraintVertical_bias="0.3">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_name"
|
android:id="@+id/tv_name"
|
||||||
@@ -63,7 +71,8 @@
|
|||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
63
app/src/main/res/layout/item_grid_app.xml
Normal file
63
app/src/main/res/layout/item_grid_app.xml
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_100">
|
||||||
|
|
||||||
|
<!-- <androidx.cardview.widget.CardView-->
|
||||||
|
<!-- android:id="@+id/cardView"-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="match_parent"-->
|
||||||
|
<!-- app:cardBackgroundColor="@color/card_background_color"-->
|
||||||
|
<!-- app:cardCornerRadius="@dimen/card_radius"-->
|
||||||
|
<!-- app:cardUseCompatPadding="true">-->
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/root"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<com.shehuan.niv.NiceImageView
|
||||||
|
android:id="@+id/iv_icon"
|
||||||
|
android:layout_width="@dimen/dp_60"
|
||||||
|
android:layout_height="@dimen/dp_60"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@mipmap/ic_launcher"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_app_name"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="appname"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/iv_icon"
|
||||||
|
app:layout_constraintVertical_bias="0.1" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<!-- </androidx.cardview.widget.CardView>-->
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">56.8889sp</dimen>
|
<dimen name="home_item_text_size">56.8889sp</dimen>
|
||||||
<dimen name="default_radius">22.7556dp</dimen>
|
<dimen name="default_radius">22.7556dp</dimen>
|
||||||
|
<dimen name="settings_item_height">227.5556dp</dimen>
|
||||||
|
<dimen name="settings_text_size">51.2000sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">42.6667sp</dimen>
|
||||||
|
<dimen name="top_height">5.6889dp</dimen>
|
||||||
|
<dimen name="card_radius">45.5111dp</dimen>
|
||||||
<dimen name="dp_m_60">-170.6667dp</dimen>
|
<dimen name="dp_m_60">-170.6667dp</dimen>
|
||||||
<dimen name="dp_m_30">-85.3333dp</dimen>
|
<dimen name="dp_m_30">-85.3333dp</dimen>
|
||||||
<dimen name="dp_m_20">-56.8889dp</dimen>
|
<dimen name="dp_m_20">-56.8889dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-14.2222dp</dimen>
|
<dimen name="dp_m_5">-14.2222dp</dimen>
|
||||||
<dimen name="dp_m_2">-5.6889dp</dimen>
|
<dimen name="dp_m_2">-5.6889dp</dimen>
|
||||||
<dimen name="dp_m_1">-2.8444dp</dimen>
|
<dimen name="dp_m_1">-2.8444dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.2844dp</dimen>
|
<dimen name="dp_0_1">0.2844dp</dimen>
|
||||||
<dimen name="dp_0_5">1.4222dp</dimen>
|
<dimen name="dp_0_5">1.4222dp</dimen>
|
||||||
<dimen name="dp_1">2.8444dp</dimen>
|
<dimen name="dp_1">2.8444dp</dimen>
|
||||||
|
|||||||
@@ -2,7 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">71.1111sp</dimen>
|
<dimen name="home_item_text_size">71.1111sp</dimen>
|
||||||
<dimen name="default_radius">28.4444dp</dimen>
|
<dimen name="default_radius">28.4444dp</dimen>
|
||||||
|
<dimen name="settings_item_height">284.4444dp</dimen>
|
||||||
|
<dimen name="settings_text_size">64.0000sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">53.3333sp</dimen>
|
||||||
|
<dimen name="top_height">7.1111dp</dimen>
|
||||||
|
<dimen name="card_radius">56.8889dp</dimen>
|
||||||
<dimen name="dp_m_60">-213.3333dp</dimen>
|
<dimen name="dp_m_60">-213.3333dp</dimen>
|
||||||
<dimen name="dp_m_30">-106.6667dp</dimen>
|
<dimen name="dp_m_30">-106.6667dp</dimen>
|
||||||
<dimen name="dp_m_20">-71.1111dp</dimen>
|
<dimen name="dp_m_20">-71.1111dp</dimen>
|
||||||
@@ -12,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-17.7778dp</dimen>
|
<dimen name="dp_m_5">-17.7778dp</dimen>
|
||||||
<dimen name="dp_m_2">-7.1111dp</dimen>
|
<dimen name="dp_m_2">-7.1111dp</dimen>
|
||||||
<dimen name="dp_m_1">-3.5556dp</dimen>
|
<dimen name="dp_m_1">-3.5556dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.3556dp</dimen>
|
<dimen name="dp_0_1">0.3556dp</dimen>
|
||||||
<dimen name="dp_0_5">1.7778dp</dimen>
|
<dimen name="dp_0_5">1.7778dp</dimen>
|
||||||
<dimen name="dp_1">3.5556dp</dimen>
|
<dimen name="dp_1">3.5556dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">75.8333sp</dimen>
|
<dimen name="home_item_text_size">75.8333sp</dimen>
|
||||||
<dimen name="default_radius">30.3333dp</dimen>
|
<dimen name="default_radius">30.3333dp</dimen>
|
||||||
|
<dimen name="settings_item_height">303.3333dp</dimen>
|
||||||
|
<dimen name="settings_text_size">68.2500sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">56.8750sp</dimen>
|
||||||
|
<dimen name="top_height">7.5833dp</dimen>
|
||||||
|
<dimen name="card_radius">60.6667dp</dimen>
|
||||||
<dimen name="dp_m_60">-227.5000dp</dimen>
|
<dimen name="dp_m_60">-227.5000dp</dimen>
|
||||||
<dimen name="dp_m_30">-113.7500dp</dimen>
|
<dimen name="dp_m_30">-113.7500dp</dimen>
|
||||||
<dimen name="dp_m_20">-75.8333dp</dimen>
|
<dimen name="dp_m_20">-75.8333dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-18.9583dp</dimen>
|
<dimen name="dp_m_5">-18.9583dp</dimen>
|
||||||
<dimen name="dp_m_2">-7.5833dp</dimen>
|
<dimen name="dp_m_2">-7.5833dp</dimen>
|
||||||
<dimen name="dp_m_1">-3.7917dp</dimen>
|
<dimen name="dp_m_1">-3.7917dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.3792dp</dimen>
|
<dimen name="dp_0_1">0.3792dp</dimen>
|
||||||
<dimen name="dp_0_5">1.8958dp</dimen>
|
<dimen name="dp_0_5">1.8958dp</dimen>
|
||||||
<dimen name="dp_1">3.7917dp</dimen>
|
<dimen name="dp_1">3.7917dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">13.3333sp</dimen>
|
<dimen name="home_item_text_size">13.3333sp</dimen>
|
||||||
<dimen name="default_radius">5.3333dp</dimen>
|
<dimen name="default_radius">5.3333dp</dimen>
|
||||||
|
<dimen name="settings_item_height">53.3333dp</dimen>
|
||||||
|
<dimen name="settings_text_size">12.0000sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">10.0000sp</dimen>
|
||||||
|
<dimen name="top_height">1.3333dp</dimen>
|
||||||
|
<dimen name="card_radius">10.6667dp</dimen>
|
||||||
<dimen name="dp_m_60">-40.0000dp</dimen>
|
<dimen name="dp_m_60">-40.0000dp</dimen>
|
||||||
<dimen name="dp_m_30">-20.0000dp</dimen>
|
<dimen name="dp_m_30">-20.0000dp</dimen>
|
||||||
<dimen name="dp_m_20">-13.3333dp</dimen>
|
<dimen name="dp_m_20">-13.3333dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-3.3333dp</dimen>
|
<dimen name="dp_m_5">-3.3333dp</dimen>
|
||||||
<dimen name="dp_m_2">-1.3333dp</dimen>
|
<dimen name="dp_m_2">-1.3333dp</dimen>
|
||||||
<dimen name="dp_m_1">-0.6667dp</dimen>
|
<dimen name="dp_m_1">-0.6667dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.0667dp</dimen>
|
<dimen name="dp_0_1">0.0667dp</dimen>
|
||||||
<dimen name="dp_0_5">0.3333dp</dimen>
|
<dimen name="dp_0_5">0.3333dp</dimen>
|
||||||
<dimen name="dp_1">0.6667dp</dimen>
|
<dimen name="dp_1">0.6667dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">17.7778sp</dimen>
|
<dimen name="home_item_text_size">17.7778sp</dimen>
|
||||||
<dimen name="default_radius">7.1111dp</dimen>
|
<dimen name="default_radius">7.1111dp</dimen>
|
||||||
|
<dimen name="settings_item_height">71.1111dp</dimen>
|
||||||
|
<dimen name="settings_text_size">16.0000sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">13.3333sp</dimen>
|
||||||
|
<dimen name="top_height">1.7778dp</dimen>
|
||||||
|
<dimen name="card_radius">14.2222dp</dimen>
|
||||||
<dimen name="dp_m_60">-53.3333dp</dimen>
|
<dimen name="dp_m_60">-53.3333dp</dimen>
|
||||||
<dimen name="dp_m_30">-26.6667dp</dimen>
|
<dimen name="dp_m_30">-26.6667dp</dimen>
|
||||||
<dimen name="dp_m_20">-17.7778dp</dimen>
|
<dimen name="dp_m_20">-17.7778dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-4.4444dp</dimen>
|
<dimen name="dp_m_5">-4.4444dp</dimen>
|
||||||
<dimen name="dp_m_2">-1.7778dp</dimen>
|
<dimen name="dp_m_2">-1.7778dp</dimen>
|
||||||
<dimen name="dp_m_1">-0.8889dp</dimen>
|
<dimen name="dp_m_1">-0.8889dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.0889dp</dimen>
|
<dimen name="dp_0_1">0.0889dp</dimen>
|
||||||
<dimen name="dp_0_5">0.4444dp</dimen>
|
<dimen name="dp_0_5">0.4444dp</dimen>
|
||||||
<dimen name="dp_1">0.8889dp</dimen>
|
<dimen name="dp_1">0.8889dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">21.3333sp</dimen>
|
<dimen name="home_item_text_size">21.3333sp</dimen>
|
||||||
<dimen name="default_radius">8.5333dp</dimen>
|
<dimen name="default_radius">8.5333dp</dimen>
|
||||||
|
<dimen name="settings_item_height">85.3333dp</dimen>
|
||||||
|
<dimen name="settings_text_size">19.2000sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">16.0000sp</dimen>
|
||||||
|
<dimen name="top_height">2.1333dp</dimen>
|
||||||
|
<dimen name="card_radius">17.0667dp</dimen>
|
||||||
<dimen name="dp_m_60">-64.0000dp</dimen>
|
<dimen name="dp_m_60">-64.0000dp</dimen>
|
||||||
<dimen name="dp_m_30">-32.0000dp</dimen>
|
<dimen name="dp_m_30">-32.0000dp</dimen>
|
||||||
<dimen name="dp_m_20">-21.3333dp</dimen>
|
<dimen name="dp_m_20">-21.3333dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-5.3333dp</dimen>
|
<dimen name="dp_m_5">-5.3333dp</dimen>
|
||||||
<dimen name="dp_m_2">-2.1333dp</dimen>
|
<dimen name="dp_m_2">-2.1333dp</dimen>
|
||||||
<dimen name="dp_m_1">-1.0667dp</dimen>
|
<dimen name="dp_m_1">-1.0667dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.1067dp</dimen>
|
<dimen name="dp_0_1">0.1067dp</dimen>
|
||||||
<dimen name="dp_0_5">0.5333dp</dimen>
|
<dimen name="dp_0_5">0.5333dp</dimen>
|
||||||
<dimen name="dp_1">1.0667dp</dimen>
|
<dimen name="dp_1">1.0667dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">21.7778sp</dimen>
|
<dimen name="home_item_text_size">21.7778sp</dimen>
|
||||||
<dimen name="default_radius">8.7111dp</dimen>
|
<dimen name="default_radius">8.7111dp</dimen>
|
||||||
|
<dimen name="settings_item_height">87.1111dp</dimen>
|
||||||
|
<dimen name="settings_text_size">19.6000sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">16.3333sp</dimen>
|
||||||
|
<dimen name="top_height">2.1778dp</dimen>
|
||||||
|
<dimen name="card_radius">17.4222dp</dimen>
|
||||||
<dimen name="dp_m_60">-65.3333dp</dimen>
|
<dimen name="dp_m_60">-65.3333dp</dimen>
|
||||||
<dimen name="dp_m_30">-32.6667dp</dimen>
|
<dimen name="dp_m_30">-32.6667dp</dimen>
|
||||||
<dimen name="dp_m_20">-21.7778dp</dimen>
|
<dimen name="dp_m_20">-21.7778dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-5.4444dp</dimen>
|
<dimen name="dp_m_5">-5.4444dp</dimen>
|
||||||
<dimen name="dp_m_2">-2.1778dp</dimen>
|
<dimen name="dp_m_2">-2.1778dp</dimen>
|
||||||
<dimen name="dp_m_1">-1.0889dp</dimen>
|
<dimen name="dp_m_1">-1.0889dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.1089dp</dimen>
|
<dimen name="dp_0_1">0.1089dp</dimen>
|
||||||
<dimen name="dp_0_5">0.5444dp</dimen>
|
<dimen name="dp_0_5">0.5444dp</dimen>
|
||||||
<dimen name="dp_1">1.0889dp</dimen>
|
<dimen name="dp_1">1.0889dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">22.2222sp</dimen>
|
<dimen name="home_item_text_size">22.2222sp</dimen>
|
||||||
<dimen name="default_radius">8.8889dp</dimen>
|
<dimen name="default_radius">8.8889dp</dimen>
|
||||||
|
<dimen name="settings_item_height">88.8889dp</dimen>
|
||||||
|
<dimen name="settings_text_size">20.0000sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">16.6667sp</dimen>
|
||||||
|
<dimen name="top_height">2.2222dp</dimen>
|
||||||
|
<dimen name="card_radius">17.7778dp</dimen>
|
||||||
<dimen name="dp_m_60">-66.6667dp</dimen>
|
<dimen name="dp_m_60">-66.6667dp</dimen>
|
||||||
<dimen name="dp_m_30">-33.3333dp</dimen>
|
<dimen name="dp_m_30">-33.3333dp</dimen>
|
||||||
<dimen name="dp_m_20">-22.2222dp</dimen>
|
<dimen name="dp_m_20">-22.2222dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-5.5556dp</dimen>
|
<dimen name="dp_m_5">-5.5556dp</dimen>
|
||||||
<dimen name="dp_m_2">-2.2222dp</dimen>
|
<dimen name="dp_m_2">-2.2222dp</dimen>
|
||||||
<dimen name="dp_m_1">-1.1111dp</dimen>
|
<dimen name="dp_m_1">-1.1111dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.1111dp</dimen>
|
<dimen name="dp_0_1">0.1111dp</dimen>
|
||||||
<dimen name="dp_0_5">0.5556dp</dimen>
|
<dimen name="dp_0_5">0.5556dp</dimen>
|
||||||
<dimen name="dp_1">1.1111dp</dimen>
|
<dimen name="dp_1">1.1111dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">22.7778sp</dimen>
|
<dimen name="home_item_text_size">22.7778sp</dimen>
|
||||||
<dimen name="default_radius">9.1111dp</dimen>
|
<dimen name="default_radius">9.1111dp</dimen>
|
||||||
|
<dimen name="settings_item_height">91.1111dp</dimen>
|
||||||
|
<dimen name="settings_text_size">20.5000sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">17.0833sp</dimen>
|
||||||
|
<dimen name="top_height">2.2778dp</dimen>
|
||||||
|
<dimen name="card_radius">18.2222dp</dimen>
|
||||||
<dimen name="dp_m_60">-68.3333dp</dimen>
|
<dimen name="dp_m_60">-68.3333dp</dimen>
|
||||||
<dimen name="dp_m_30">-34.1667dp</dimen>
|
<dimen name="dp_m_30">-34.1667dp</dimen>
|
||||||
<dimen name="dp_m_20">-22.7778dp</dimen>
|
<dimen name="dp_m_20">-22.7778dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-5.6944dp</dimen>
|
<dimen name="dp_m_5">-5.6944dp</dimen>
|
||||||
<dimen name="dp_m_2">-2.2778dp</dimen>
|
<dimen name="dp_m_2">-2.2778dp</dimen>
|
||||||
<dimen name="dp_m_1">-1.1389dp</dimen>
|
<dimen name="dp_m_1">-1.1389dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.1139dp</dimen>
|
<dimen name="dp_0_1">0.1139dp</dimen>
|
||||||
<dimen name="dp_0_5">0.5694dp</dimen>
|
<dimen name="dp_0_5">0.5694dp</dimen>
|
||||||
<dimen name="dp_1">1.1389dp</dimen>
|
<dimen name="dp_1">1.1389dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">22.8333sp</dimen>
|
<dimen name="home_item_text_size">22.8333sp</dimen>
|
||||||
<dimen name="default_radius">9.1333dp</dimen>
|
<dimen name="default_radius">9.1333dp</dimen>
|
||||||
|
<dimen name="settings_item_height">91.3333dp</dimen>
|
||||||
|
<dimen name="settings_text_size">20.5500sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">17.1250sp</dimen>
|
||||||
|
<dimen name="top_height">2.2833dp</dimen>
|
||||||
|
<dimen name="card_radius">18.2667dp</dimen>
|
||||||
<dimen name="dp_m_60">-68.5000dp</dimen>
|
<dimen name="dp_m_60">-68.5000dp</dimen>
|
||||||
<dimen name="dp_m_30">-34.2500dp</dimen>
|
<dimen name="dp_m_30">-34.2500dp</dimen>
|
||||||
<dimen name="dp_m_20">-22.8333dp</dimen>
|
<dimen name="dp_m_20">-22.8333dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-5.7083dp</dimen>
|
<dimen name="dp_m_5">-5.7083dp</dimen>
|
||||||
<dimen name="dp_m_2">-2.2833dp</dimen>
|
<dimen name="dp_m_2">-2.2833dp</dimen>
|
||||||
<dimen name="dp_m_1">-1.1417dp</dimen>
|
<dimen name="dp_m_1">-1.1417dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.1142dp</dimen>
|
<dimen name="dp_0_1">0.1142dp</dimen>
|
||||||
<dimen name="dp_0_5">0.5708dp</dimen>
|
<dimen name="dp_0_5">0.5708dp</dimen>
|
||||||
<dimen name="dp_1">1.1417dp</dimen>
|
<dimen name="dp_1">1.1417dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">24.0000sp</dimen>
|
<dimen name="home_item_text_size">24.0000sp</dimen>
|
||||||
<dimen name="default_radius">9.6000dp</dimen>
|
<dimen name="default_radius">9.6000dp</dimen>
|
||||||
|
<dimen name="settings_item_height">96.0000dp</dimen>
|
||||||
|
<dimen name="settings_text_size">21.6000sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">18.0000sp</dimen>
|
||||||
|
<dimen name="top_height">2.4000dp</dimen>
|
||||||
|
<dimen name="card_radius">19.2000dp</dimen>
|
||||||
<dimen name="dp_m_60">-72.0000dp</dimen>
|
<dimen name="dp_m_60">-72.0000dp</dimen>
|
||||||
<dimen name="dp_m_30">-36.0000dp</dimen>
|
<dimen name="dp_m_30">-36.0000dp</dimen>
|
||||||
<dimen name="dp_m_20">-24.0000dp</dimen>
|
<dimen name="dp_m_20">-24.0000dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-6.0000dp</dimen>
|
<dimen name="dp_m_5">-6.0000dp</dimen>
|
||||||
<dimen name="dp_m_2">-2.4000dp</dimen>
|
<dimen name="dp_m_2">-2.4000dp</dimen>
|
||||||
<dimen name="dp_m_1">-1.2000dp</dimen>
|
<dimen name="dp_m_1">-1.2000dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.1200dp</dimen>
|
<dimen name="dp_0_1">0.1200dp</dimen>
|
||||||
<dimen name="dp_0_5">0.6000dp</dimen>
|
<dimen name="dp_0_5">0.6000dp</dimen>
|
||||||
<dimen name="dp_1">1.2000dp</dimen>
|
<dimen name="dp_1">1.2000dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">26.6667sp</dimen>
|
<dimen name="home_item_text_size">26.6667sp</dimen>
|
||||||
<dimen name="default_radius">10.6667dp</dimen>
|
<dimen name="default_radius">10.6667dp</dimen>
|
||||||
|
<dimen name="settings_item_height">106.6667dp</dimen>
|
||||||
|
<dimen name="settings_text_size">24.0000sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">20.0000sp</dimen>
|
||||||
|
<dimen name="top_height">2.6667dp</dimen>
|
||||||
|
<dimen name="card_radius">21.3333dp</dimen>
|
||||||
<dimen name="dp_m_60">-80.0000dp</dimen>
|
<dimen name="dp_m_60">-80.0000dp</dimen>
|
||||||
<dimen name="dp_m_30">-40.0000dp</dimen>
|
<dimen name="dp_m_30">-40.0000dp</dimen>
|
||||||
<dimen name="dp_m_20">-26.6667dp</dimen>
|
<dimen name="dp_m_20">-26.6667dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-6.6667dp</dimen>
|
<dimen name="dp_m_5">-6.6667dp</dimen>
|
||||||
<dimen name="dp_m_2">-2.6667dp</dimen>
|
<dimen name="dp_m_2">-2.6667dp</dimen>
|
||||||
<dimen name="dp_m_1">-1.3333dp</dimen>
|
<dimen name="dp_m_1">-1.3333dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.1333dp</dimen>
|
<dimen name="dp_0_1">0.1333dp</dimen>
|
||||||
<dimen name="dp_0_5">0.6667dp</dimen>
|
<dimen name="dp_0_5">0.6667dp</dimen>
|
||||||
<dimen name="dp_1">1.3333dp</dimen>
|
<dimen name="dp_1">1.3333dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">29.6111sp</dimen>
|
<dimen name="home_item_text_size">29.6111sp</dimen>
|
||||||
<dimen name="default_radius">11.8444dp</dimen>
|
<dimen name="default_radius">11.8444dp</dimen>
|
||||||
|
<dimen name="settings_item_height">118.4444dp</dimen>
|
||||||
|
<dimen name="settings_text_size">26.6500sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">22.2083sp</dimen>
|
||||||
|
<dimen name="top_height">2.9611dp</dimen>
|
||||||
|
<dimen name="card_radius">23.6889dp</dimen>
|
||||||
<dimen name="dp_m_60">-88.8333dp</dimen>
|
<dimen name="dp_m_60">-88.8333dp</dimen>
|
||||||
<dimen name="dp_m_30">-44.4167dp</dimen>
|
<dimen name="dp_m_30">-44.4167dp</dimen>
|
||||||
<dimen name="dp_m_20">-29.6111dp</dimen>
|
<dimen name="dp_m_20">-29.6111dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-7.4028dp</dimen>
|
<dimen name="dp_m_5">-7.4028dp</dimen>
|
||||||
<dimen name="dp_m_2">-2.9611dp</dimen>
|
<dimen name="dp_m_2">-2.9611dp</dimen>
|
||||||
<dimen name="dp_m_1">-1.4806dp</dimen>
|
<dimen name="dp_m_1">-1.4806dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.1481dp</dimen>
|
<dimen name="dp_0_1">0.1481dp</dimen>
|
||||||
<dimen name="dp_0_5">0.7403dp</dimen>
|
<dimen name="dp_0_5">0.7403dp</dimen>
|
||||||
<dimen name="dp_1">1.4806dp</dimen>
|
<dimen name="dp_1">1.4806dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">32.8889sp</dimen>
|
<dimen name="home_item_text_size">32.8889sp</dimen>
|
||||||
<dimen name="default_radius">13.1556dp</dimen>
|
<dimen name="default_radius">13.1556dp</dimen>
|
||||||
|
<dimen name="settings_item_height">131.5556dp</dimen>
|
||||||
|
<dimen name="settings_text_size">29.6000sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">24.6667sp</dimen>
|
||||||
|
<dimen name="top_height">3.2889dp</dimen>
|
||||||
|
<dimen name="card_radius">26.3111dp</dimen>
|
||||||
<dimen name="dp_m_60">-98.6667dp</dimen>
|
<dimen name="dp_m_60">-98.6667dp</dimen>
|
||||||
<dimen name="dp_m_30">-49.3333dp</dimen>
|
<dimen name="dp_m_30">-49.3333dp</dimen>
|
||||||
<dimen name="dp_m_20">-32.8889dp</dimen>
|
<dimen name="dp_m_20">-32.8889dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-8.2222dp</dimen>
|
<dimen name="dp_m_5">-8.2222dp</dimen>
|
||||||
<dimen name="dp_m_2">-3.2889dp</dimen>
|
<dimen name="dp_m_2">-3.2889dp</dimen>
|
||||||
<dimen name="dp_m_1">-1.6444dp</dimen>
|
<dimen name="dp_m_1">-1.6444dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.1644dp</dimen>
|
<dimen name="dp_0_1">0.1644dp</dimen>
|
||||||
<dimen name="dp_0_5">0.8222dp</dimen>
|
<dimen name="dp_0_5">0.8222dp</dimen>
|
||||||
<dimen name="dp_1">1.6444dp</dimen>
|
<dimen name="dp_1">1.6444dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">33.3333sp</dimen>
|
<dimen name="home_item_text_size">33.3333sp</dimen>
|
||||||
<dimen name="default_radius">13.3333dp</dimen>
|
<dimen name="default_radius">13.3333dp</dimen>
|
||||||
|
<dimen name="settings_item_height">133.3333dp</dimen>
|
||||||
|
<dimen name="settings_text_size">30.0000sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">25.0000sp</dimen>
|
||||||
|
<dimen name="top_height">3.3333dp</dimen>
|
||||||
|
<dimen name="card_radius">26.6667dp</dimen>
|
||||||
<dimen name="dp_m_60">-100.0000dp</dimen>
|
<dimen name="dp_m_60">-100.0000dp</dimen>
|
||||||
<dimen name="dp_m_30">-50.0000dp</dimen>
|
<dimen name="dp_m_30">-50.0000dp</dimen>
|
||||||
<dimen name="dp_m_20">-33.3333dp</dimen>
|
<dimen name="dp_m_20">-33.3333dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-8.3333dp</dimen>
|
<dimen name="dp_m_5">-8.3333dp</dimen>
|
||||||
<dimen name="dp_m_2">-3.3333dp</dimen>
|
<dimen name="dp_m_2">-3.3333dp</dimen>
|
||||||
<dimen name="dp_m_1">-1.6667dp</dimen>
|
<dimen name="dp_m_1">-1.6667dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.1667dp</dimen>
|
<dimen name="dp_0_1">0.1667dp</dimen>
|
||||||
<dimen name="dp_0_5">0.8333dp</dimen>
|
<dimen name="dp_0_5">0.8333dp</dimen>
|
||||||
<dimen name="dp_1">1.6667dp</dimen>
|
<dimen name="dp_1">1.6667dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">35.5556sp</dimen>
|
<dimen name="home_item_text_size">35.5556sp</dimen>
|
||||||
<dimen name="default_radius">14.2222dp</dimen>
|
<dimen name="default_radius">14.2222dp</dimen>
|
||||||
|
<dimen name="settings_item_height">142.2222dp</dimen>
|
||||||
|
<dimen name="settings_text_size">32.0000sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">26.6667sp</dimen>
|
||||||
|
<dimen name="top_height">3.5556dp</dimen>
|
||||||
|
<dimen name="card_radius">28.4444dp</dimen>
|
||||||
<dimen name="dp_m_60">-106.6667dp</dimen>
|
<dimen name="dp_m_60">-106.6667dp</dimen>
|
||||||
<dimen name="dp_m_30">-53.3333dp</dimen>
|
<dimen name="dp_m_30">-53.3333dp</dimen>
|
||||||
<dimen name="dp_m_20">-35.5556dp</dimen>
|
<dimen name="dp_m_20">-35.5556dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-8.8889dp</dimen>
|
<dimen name="dp_m_5">-8.8889dp</dimen>
|
||||||
<dimen name="dp_m_2">-3.5556dp</dimen>
|
<dimen name="dp_m_2">-3.5556dp</dimen>
|
||||||
<dimen name="dp_m_1">-1.7778dp</dimen>
|
<dimen name="dp_m_1">-1.7778dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.1778dp</dimen>
|
<dimen name="dp_0_1">0.1778dp</dimen>
|
||||||
<dimen name="dp_0_5">0.8889dp</dimen>
|
<dimen name="dp_0_5">0.8889dp</dimen>
|
||||||
<dimen name="dp_1">1.7778dp</dimen>
|
<dimen name="dp_1">1.7778dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">36.7778sp</dimen>
|
<dimen name="home_item_text_size">36.7778sp</dimen>
|
||||||
<dimen name="default_radius">14.7111dp</dimen>
|
<dimen name="default_radius">14.7111dp</dimen>
|
||||||
|
<dimen name="settings_item_height">147.1111dp</dimen>
|
||||||
|
<dimen name="settings_text_size">33.1000sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">27.5833sp</dimen>
|
||||||
|
<dimen name="top_height">3.6778dp</dimen>
|
||||||
|
<dimen name="card_radius">29.4222dp</dimen>
|
||||||
<dimen name="dp_m_60">-110.3333dp</dimen>
|
<dimen name="dp_m_60">-110.3333dp</dimen>
|
||||||
<dimen name="dp_m_30">-55.1667dp</dimen>
|
<dimen name="dp_m_30">-55.1667dp</dimen>
|
||||||
<dimen name="dp_m_20">-36.7778dp</dimen>
|
<dimen name="dp_m_20">-36.7778dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-9.1944dp</dimen>
|
<dimen name="dp_m_5">-9.1944dp</dimen>
|
||||||
<dimen name="dp_m_2">-3.6778dp</dimen>
|
<dimen name="dp_m_2">-3.6778dp</dimen>
|
||||||
<dimen name="dp_m_1">-1.8389dp</dimen>
|
<dimen name="dp_m_1">-1.8389dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.1839dp</dimen>
|
<dimen name="dp_0_1">0.1839dp</dimen>
|
||||||
<dimen name="dp_0_5">0.9194dp</dimen>
|
<dimen name="dp_0_5">0.9194dp</dimen>
|
||||||
<dimen name="dp_1">1.8389dp</dimen>
|
<dimen name="dp_1">1.8389dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">40.0000sp</dimen>
|
<dimen name="home_item_text_size">40.0000sp</dimen>
|
||||||
<dimen name="default_radius">16.0000dp</dimen>
|
<dimen name="default_radius">16.0000dp</dimen>
|
||||||
|
<dimen name="settings_item_height">160.0000dp</dimen>
|
||||||
|
<dimen name="settings_text_size">36.0000sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">30.0000sp</dimen>
|
||||||
|
<dimen name="top_height">4.0000dp</dimen>
|
||||||
|
<dimen name="card_radius">32.0000dp</dimen>
|
||||||
<dimen name="dp_m_60">-120.0000dp</dimen>
|
<dimen name="dp_m_60">-120.0000dp</dimen>
|
||||||
<dimen name="dp_m_30">-60.0000dp</dimen>
|
<dimen name="dp_m_30">-60.0000dp</dimen>
|
||||||
<dimen name="dp_m_20">-40.0000dp</dimen>
|
<dimen name="dp_m_20">-40.0000dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-10.0000dp</dimen>
|
<dimen name="dp_m_5">-10.0000dp</dimen>
|
||||||
<dimen name="dp_m_2">-4.0000dp</dimen>
|
<dimen name="dp_m_2">-4.0000dp</dimen>
|
||||||
<dimen name="dp_m_1">-2.0000dp</dimen>
|
<dimen name="dp_m_1">-2.0000dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.2000dp</dimen>
|
<dimen name="dp_0_1">0.2000dp</dimen>
|
||||||
<dimen name="dp_0_5">1.0000dp</dimen>
|
<dimen name="dp_0_5">1.0000dp</dimen>
|
||||||
<dimen name="dp_1">2.0000dp</dimen>
|
<dimen name="dp_1">2.0000dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">42.6667sp</dimen>
|
<dimen name="home_item_text_size">42.6667sp</dimen>
|
||||||
<dimen name="default_radius">17.0667dp</dimen>
|
<dimen name="default_radius">17.0667dp</dimen>
|
||||||
|
<dimen name="settings_item_height">170.6667dp</dimen>
|
||||||
|
<dimen name="settings_text_size">38.4000sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">32.0000sp</dimen>
|
||||||
|
<dimen name="top_height">4.2667dp</dimen>
|
||||||
|
<dimen name="card_radius">34.1333dp</dimen>
|
||||||
<dimen name="dp_m_60">-128.0000dp</dimen>
|
<dimen name="dp_m_60">-128.0000dp</dimen>
|
||||||
<dimen name="dp_m_30">-64.0000dp</dimen>
|
<dimen name="dp_m_30">-64.0000dp</dimen>
|
||||||
<dimen name="dp_m_20">-42.6667dp</dimen>
|
<dimen name="dp_m_20">-42.6667dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-10.6667dp</dimen>
|
<dimen name="dp_m_5">-10.6667dp</dimen>
|
||||||
<dimen name="dp_m_2">-4.2667dp</dimen>
|
<dimen name="dp_m_2">-4.2667dp</dimen>
|
||||||
<dimen name="dp_m_1">-2.1333dp</dimen>
|
<dimen name="dp_m_1">-2.1333dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.2133dp</dimen>
|
<dimen name="dp_0_1">0.2133dp</dimen>
|
||||||
<dimen name="dp_0_5">1.0667dp</dimen>
|
<dimen name="dp_0_5">1.0667dp</dimen>
|
||||||
<dimen name="dp_1">2.1333dp</dimen>
|
<dimen name="dp_1">2.1333dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">44.4444sp</dimen>
|
<dimen name="home_item_text_size">44.4444sp</dimen>
|
||||||
<dimen name="default_radius">17.7778dp</dimen>
|
<dimen name="default_radius">17.7778dp</dimen>
|
||||||
|
<dimen name="settings_item_height">177.7778dp</dimen>
|
||||||
|
<dimen name="settings_text_size">40.0000sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">33.3333sp</dimen>
|
||||||
|
<dimen name="top_height">4.4444dp</dimen>
|
||||||
|
<dimen name="card_radius">35.5556dp</dimen>
|
||||||
<dimen name="dp_m_60">-133.3333dp</dimen>
|
<dimen name="dp_m_60">-133.3333dp</dimen>
|
||||||
<dimen name="dp_m_30">-66.6667dp</dimen>
|
<dimen name="dp_m_30">-66.6667dp</dimen>
|
||||||
<dimen name="dp_m_20">-44.4444dp</dimen>
|
<dimen name="dp_m_20">-44.4444dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-11.1111dp</dimen>
|
<dimen name="dp_m_5">-11.1111dp</dimen>
|
||||||
<dimen name="dp_m_2">-4.4444dp</dimen>
|
<dimen name="dp_m_2">-4.4444dp</dimen>
|
||||||
<dimen name="dp_m_1">-2.2222dp</dimen>
|
<dimen name="dp_m_1">-2.2222dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.2222dp</dimen>
|
<dimen name="dp_0_1">0.2222dp</dimen>
|
||||||
<dimen name="dp_0_5">1.1111dp</dimen>
|
<dimen name="dp_0_5">1.1111dp</dimen>
|
||||||
<dimen name="dp_1">2.2222dp</dimen>
|
<dimen name="dp_1">2.2222dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">45.0556sp</dimen>
|
<dimen name="home_item_text_size">45.0556sp</dimen>
|
||||||
<dimen name="default_radius">18.0222dp</dimen>
|
<dimen name="default_radius">18.0222dp</dimen>
|
||||||
|
<dimen name="settings_item_height">180.2222dp</dimen>
|
||||||
|
<dimen name="settings_text_size">40.5500sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">33.7917sp</dimen>
|
||||||
|
<dimen name="top_height">4.5056dp</dimen>
|
||||||
|
<dimen name="card_radius">36.0444dp</dimen>
|
||||||
<dimen name="dp_m_60">-135.1667dp</dimen>
|
<dimen name="dp_m_60">-135.1667dp</dimen>
|
||||||
<dimen name="dp_m_30">-67.5833dp</dimen>
|
<dimen name="dp_m_30">-67.5833dp</dimen>
|
||||||
<dimen name="dp_m_20">-45.0556dp</dimen>
|
<dimen name="dp_m_20">-45.0556dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-11.2639dp</dimen>
|
<dimen name="dp_m_5">-11.2639dp</dimen>
|
||||||
<dimen name="dp_m_2">-4.5056dp</dimen>
|
<dimen name="dp_m_2">-4.5056dp</dimen>
|
||||||
<dimen name="dp_m_1">-2.2528dp</dimen>
|
<dimen name="dp_m_1">-2.2528dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.2253dp</dimen>
|
<dimen name="dp_0_1">0.2253dp</dimen>
|
||||||
<dimen name="dp_0_5">1.1264dp</dimen>
|
<dimen name="dp_0_5">1.1264dp</dimen>
|
||||||
<dimen name="dp_1">2.2528dp</dimen>
|
<dimen name="dp_1">2.2528dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">45.5556sp</dimen>
|
<dimen name="home_item_text_size">45.5556sp</dimen>
|
||||||
<dimen name="default_radius">18.2222dp</dimen>
|
<dimen name="default_radius">18.2222dp</dimen>
|
||||||
|
<dimen name="settings_item_height">182.2222dp</dimen>
|
||||||
|
<dimen name="settings_text_size">41.0000sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">34.1667sp</dimen>
|
||||||
|
<dimen name="top_height">4.5556dp</dimen>
|
||||||
|
<dimen name="card_radius">36.4444dp</dimen>
|
||||||
<dimen name="dp_m_60">-136.6667dp</dimen>
|
<dimen name="dp_m_60">-136.6667dp</dimen>
|
||||||
<dimen name="dp_m_30">-68.3333dp</dimen>
|
<dimen name="dp_m_30">-68.3333dp</dimen>
|
||||||
<dimen name="dp_m_20">-45.5556dp</dimen>
|
<dimen name="dp_m_20">-45.5556dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-11.3889dp</dimen>
|
<dimen name="dp_m_5">-11.3889dp</dimen>
|
||||||
<dimen name="dp_m_2">-4.5556dp</dimen>
|
<dimen name="dp_m_2">-4.5556dp</dimen>
|
||||||
<dimen name="dp_m_1">-2.2778dp</dimen>
|
<dimen name="dp_m_1">-2.2778dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.2278dp</dimen>
|
<dimen name="dp_0_1">0.2278dp</dimen>
|
||||||
<dimen name="dp_0_5">1.1389dp</dimen>
|
<dimen name="dp_0_5">1.1389dp</dimen>
|
||||||
<dimen name="dp_1">2.2778dp</dimen>
|
<dimen name="dp_1">2.2778dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">53.3333sp</dimen>
|
<dimen name="home_item_text_size">53.3333sp</dimen>
|
||||||
<dimen name="default_radius">21.3333dp</dimen>
|
<dimen name="default_radius">21.3333dp</dimen>
|
||||||
|
<dimen name="settings_item_height">213.3333dp</dimen>
|
||||||
|
<dimen name="settings_text_size">48.0000sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">40.0000sp</dimen>
|
||||||
|
<dimen name="top_height">5.3333dp</dimen>
|
||||||
|
<dimen name="card_radius">42.6667dp</dimen>
|
||||||
<dimen name="dp_m_60">-160.0000dp</dimen>
|
<dimen name="dp_m_60">-160.0000dp</dimen>
|
||||||
<dimen name="dp_m_30">-80.0000dp</dimen>
|
<dimen name="dp_m_30">-80.0000dp</dimen>
|
||||||
<dimen name="dp_m_20">-53.3333dp</dimen>
|
<dimen name="dp_m_20">-53.3333dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-13.3333dp</dimen>
|
<dimen name="dp_m_5">-13.3333dp</dimen>
|
||||||
<dimen name="dp_m_2">-5.3333dp</dimen>
|
<dimen name="dp_m_2">-5.3333dp</dimen>
|
||||||
<dimen name="dp_m_1">-2.6667dp</dimen>
|
<dimen name="dp_m_1">-2.6667dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.2667dp</dimen>
|
<dimen name="dp_0_1">0.2667dp</dimen>
|
||||||
<dimen name="dp_0_5">1.3333dp</dimen>
|
<dimen name="dp_0_5">1.3333dp</dimen>
|
||||||
<dimen name="dp_1">2.6667dp</dimen>
|
<dimen name="dp_1">2.6667dp</dimen>
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<dimen name="home_item_text_size">53.3889sp</dimen>
|
<dimen name="home_item_text_size">53.3889sp</dimen>
|
||||||
<dimen name="default_radius">21.3556dp</dimen>
|
<dimen name="default_radius">21.3556dp</dimen>
|
||||||
|
<dimen name="settings_item_height">213.5556dp</dimen>
|
||||||
|
<dimen name="settings_text_size">48.0500sp</dimen>
|
||||||
|
<dimen name="settings_text_explanation_size">40.0417sp</dimen>
|
||||||
|
<dimen name="top_height">5.3389dp</dimen>
|
||||||
|
<dimen name="card_radius">42.7111dp</dimen>
|
||||||
<dimen name="dp_m_60">-160.1667dp</dimen>
|
<dimen name="dp_m_60">-160.1667dp</dimen>
|
||||||
<dimen name="dp_m_30">-80.0833dp</dimen>
|
<dimen name="dp_m_30">-80.0833dp</dimen>
|
||||||
<dimen name="dp_m_20">-53.3889dp</dimen>
|
<dimen name="dp_m_20">-53.3889dp</dimen>
|
||||||
@@ -11,7 +16,6 @@
|
|||||||
<dimen name="dp_m_5">-13.3472dp</dimen>
|
<dimen name="dp_m_5">-13.3472dp</dimen>
|
||||||
<dimen name="dp_m_2">-5.3389dp</dimen>
|
<dimen name="dp_m_2">-5.3389dp</dimen>
|
||||||
<dimen name="dp_m_1">-2.6694dp</dimen>
|
<dimen name="dp_m_1">-2.6694dp</dimen>
|
||||||
<dimen name="dp_0">0.0000dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.2669dp</dimen>
|
<dimen name="dp_0_1">0.2669dp</dimen>
|
||||||
<dimen name="dp_0_5">1.3347dp</dimen>
|
<dimen name="dp_0_5">1.3347dp</dimen>
|
||||||
<dimen name="dp_1">2.6694dp</dimen>
|
<dimen name="dp_1">2.6694dp</dimen>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<color name="settings_text_color_item">#000000</color>
|
<color name="settings_text_color_item">#000000</color>
|
||||||
<color name="setting_enable_color">#000000</color>
|
<color name="setting_enable_color">#000000</color>
|
||||||
<color name="setting_disable_color">#9D9D9D</color>
|
<color name="setting_disable_color">#9D9D9D</color>
|
||||||
|
<color name="card_background_color">#BFFFFFFF</color>
|
||||||
|
|
||||||
<!--https://www.jianshu.com/p/8dc258dfd189-->
|
<!--https://www.jianshu.com/p/8dc258dfd189-->
|
||||||
<color name="transparent">#00000000</color><!--透明色-->
|
<color name="transparent">#00000000</color><!--透明色-->
|
||||||
@@ -254,4 +254,6 @@
|
|||||||
<color name="mediumblue">#0000cd</color><!--中兰色 -->
|
<color name="mediumblue">#0000cd</color><!--中兰色 -->
|
||||||
<color name="darkblue">#00008b</color><!--暗蓝色 -->
|
<color name="darkblue">#00008b</color><!--暗蓝色 -->
|
||||||
<color name="black">#000000</color><!--黑色 -->
|
<color name="black">#000000</color><!--黑色 -->
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
<dimen name="settings_text_explanation_size">15sp</dimen>
|
<dimen name="settings_text_explanation_size">15sp</dimen>
|
||||||
<dimen name="top_height">2dp</dimen>
|
<dimen name="top_height">2dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="card_radius">16dp</dimen>
|
||||||
|
|
||||||
|
|
||||||
<dimen name="dp_m_60">-60dp</dimen>
|
<dimen name="dp_m_60">-60dp</dimen>
|
||||||
<dimen name="dp_m_30">-30dp</dimen>
|
<dimen name="dp_m_30">-30dp</dimen>
|
||||||
@@ -18,7 +20,6 @@
|
|||||||
<dimen name="dp_m_5">-5dp</dimen>
|
<dimen name="dp_m_5">-5dp</dimen>
|
||||||
<dimen name="dp_m_2">-2dp</dimen>
|
<dimen name="dp_m_2">-2dp</dimen>
|
||||||
<dimen name="dp_m_1">-1dp</dimen>
|
<dimen name="dp_m_1">-1dp</dimen>
|
||||||
<dimen name="dp_0">0dp</dimen>
|
|
||||||
<dimen name="dp_0_1">0.1dp</dimen>
|
<dimen name="dp_0_1">0.1dp</dimen>
|
||||||
<dimen name="dp_0_5">0.5dp</dimen>
|
<dimen name="dp_0_5">0.5dp</dimen>
|
||||||
<dimen name="dp_1">1dp</dimen>
|
<dimen name="dp_1">1dp</dimen>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ buildscript {
|
|||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
// mavenCentral()
|
mavenCentral()
|
||||||
maven { url 'https://jitpack.io' }
|
maven { url 'https://jitpack.io' }
|
||||||
maven { url 'https://maven.google.com' }
|
maven { url 'https://maven.google.com' }
|
||||||
maven { url 'https://developer.huawei.com/repo/' }
|
maven { url 'https://developer.huawei.com/repo/' }
|
||||||
@@ -35,7 +35,7 @@ allprojects {
|
|||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
// mavenCentral()
|
mavenCentral()
|
||||||
maven { url 'https://jitpack.io' }
|
maven { url 'https://jitpack.io' }
|
||||||
maven { url 'https://maven.google.com' }
|
maven { url 'https://maven.google.com' }
|
||||||
maven { url 'https://developer.huawei.com/repo/' }
|
maven { url 'https://developer.huawei.com/repo/' }
|
||||||
|
|||||||
Reference in New Issue
Block a user