version:8.3

fix:
update:接口请求优化,主页优化
This commit is contained in:
2023-02-06 19:03:22 +08:00
parent fa650fb634
commit f246028922
90 changed files with 2000 additions and 704 deletions

View File

@@ -28,11 +28,11 @@ android {
manifestPlaceholders = [
XG_ACCESS_ID : "1500033122",
XG_ACCESS_KEY : "A5QBQVQ7KLQD",
XG_ACCESS_KEY: "A5QBQVQ7KLQD",
]
}
compileOptions{
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
@@ -45,8 +45,8 @@ android {
productFlavors {
official {
flavorDimensions "default"
versionCode 71
versionName "8.0"
versionCode 74
versionName "8.3"
}
}
@@ -187,8 +187,8 @@ dependencies {
//github第三方控件
implementation 'io.github.h07000223:flycoTabLayout:3.0.0'
//下拉刷新控件
implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0' //1.0.5及以前版本的老用户升级需谨慎API改动过大
implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.1.0' //没有使用特殊Header可以不加这行
implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.3' //1.0.5及以前版本的老用户升级需谨慎API改动过大
implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.1.3' //没有使用特殊Header可以不加这行
//glide
implementation 'com.github.bumptech.glide:glide:4.14.2'
annotationProcessor 'com.github.bumptech.glide:compiler:4.14.2'

View File

@@ -44,7 +44,7 @@
<uses-permission android:name="android.permission.GET_TASKS" />
<application
android:name="com.uiui.appstore.base.BaseApplication"
android:name=".base.BaseApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
@@ -53,8 +53,11 @@
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/ImmerseTheme">
<activity android:name=".activity.ClassAppActivity" />
<activity android:name=".activity.MoreAppActivity" />
<activity android:name=".activity.ManagerAppActivity" />
<activity
android:name="com.uiui.appstore.activity.MainActivity"
android:name=".activity.MainActivity"
android:configChanges="keyboardHidden|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -63,51 +66,50 @@
</intent-filter>
</activity>
<activity
android:name="com.uiui.appstore.activity.PrivacyPolicyActivity"
android:name=".activity.PrivacyPolicyActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait" />
<activity
android:name="com.uiui.appstore.activity.UserAgreementActivity"
android:name=".activity.UserAgreementActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait" />
<activity
android:name="com.uiui.appstore.activity.CopyrightActivity"
android:name=".activity.CopyrightActivity"
android:screenOrientation="behind" />
<activity
android:name="com.uiui.appstore.activity.AboutActivity"
android:name=".activity.AboutActivity"
android:screenOrientation="behind" />
<activity
android:name="com.uiui.appstore.activity.SearcherActivity"
android:name=".activity.SearcherActivity"
android:screenOrientation="behind" />
<activity
android:name="com.uiui.appstore.activity.HintActivity"
android:name=".activity.HintActivity"
android:launchMode="singleTask"
android:screenOrientation="sensor"
android:theme="@style/activity_styles" />
<activity
android:name="com.uiui.appstore.activity.KindDetailActivity"
android:name=".activity.KindDetailActivity"
android:screenOrientation="behind" />
<activity
android:name="com.uiui.appstore.activity.DetailsActivity"
android:name=".activity.DetailsActivity"
android:screenOrientation="behind" />
<activity
android:name="com.uiui.appstore.activity.LocalManagerActivity"
android:name=".activity.LocalManagerActivity"
android:screenOrientation="behind" />
<activity
android:name="com.uiui.appstore.activity.DownloadManagerActivity"
android:name=".activity.DownloadManagerActivity"
android:screenOrientation="behind" />
<service android:name="com.uiui.appstore.service.GuardService" />
<service android:name="com.uiui.appstore.service.StepService" />
<service android:name="com.uiui.appstore.service.MyDownloadService" />
<service android:name=".service.GuardService" />
<service android:name=".service.StepService" />
<service android:name=".service.MyDownloadService" />
<service
android:name="com.uiui.appstore.service.main.MainService"
android:name=".service.main.MainService"
android:enabled="true"
android:exported="true" />
<receiver
android:name="com.uiui.appstore.receiver.BootReceiver"
android:name=".receiver.BootReceiver"
android:enabled="true"
android:exported="true">
<intent-filter android:priority="1000">
@@ -115,7 +117,7 @@
</intent-filter>
</receiver>
<receiver
android:name="com.uiui.appstore.receiver.AppManagerReceiver"
android:name=".receiver.AppManagerReceiver"
android:enabled="true"
android:exported="true"
android:permission="com.example.broadcast.permission">
@@ -130,11 +132,11 @@
</intent-filter>
</receiver>
<receiver
android:name="com.uiui.appstore.receiver.InstallResultReceiver"
android:name=".receiver.InstallResultReceiver"
android:enabled="true"
android:exported="true" />
<receiver
android:name="com.uiui.appstore.receiver.NewAppReceiver"
android:name=".receiver.NewAppReceiver"
android:enabled="true"
android:exported="true"
android:permission="com.example.broadcast.permission">
@@ -146,6 +148,7 @@
<data android:scheme="package" />
</intent-filter>
</receiver>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.uiui.appstore.fileprovider"
@@ -156,21 +159,23 @@
android:resource="@xml/file_paths" />
</provider>
<activity android:name="com.tencent.android.tpush.TpnsActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
<activity
android:name="com.tencent.android.tpush.TpnsActivity"
android:exported="true"
android:launchMode="singleInstance"
android:exported="true">
android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="${applicationId}.OPEN_TPNS_ACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<data
android:scheme="tpns"
android:host="${applicationId}"/>
android:host="${applicationId}"
android:scheme="tpns" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
@@ -178,7 +183,6 @@
<action android:name="android.intent.action" />
</intent-filter>
</activity>
<activity
android:name="com.tencent.android.tpush.InnerTpnsActivity"
android:exported="false"
@@ -209,34 +213,29 @@
android:name="com.tencent.android.tpush.XGPushReceiver"
android:exported="false"
android:process=":xg_vip_service">
<intent-filter android:priority="0x7fffffff">
<!-- 【必须】 信鸽SDK的内部广播 -->
<action android:name="com.tencent.android.xg.vip.action.SDK" />
<action android:name="com.tencent.android.xg.vip.action.INTERNAL_PUSH_MESSAGE" />
<action android:name="com.tencent.android.xg.vip.action.ACTION_SDK_KEEPALIVE" />
</intent-filter>
</receiver>
<!-- 【必须】移动推送 TPNS service -->
<service
android:name="com.tencent.android.tpush.service.XGVipPushService"
android:persistent="true"
android:process=":xg_vip_service"></service>
android:process=":xg_vip_service" />
<!-- 【必须】通知 service android:name 部分改为包名.XGVIP_PUSH_ACTION -->
<service android:name="com.tencent.android.tpush.rpc.XGRemoteService"
<service
android:name="com.tencent.android.tpush.rpc.XGRemoteService"
android:exported="false">
<intent-filter>
<!-- 【必须】请修改为当前APP名包.XGVIP_PUSH_ACTION -->
<action android:name="com.uiui.appstore.XGVIP_PUSH_ACTION" />
</intent-filter>
</service>
<!-- 【必须】【注意】authorities 修改为包名.XGVIP_PUSH_AUTH -->
</service> <!-- 【必须】【注意】authorities 修改为包名.XGVIP_PUSH_AUTH -->
<provider
android:name="com.tencent.android.tpush.XGPushProvider"
android:authorities="com.uiui.appstore.XGVIP_PUSH_AUTH" />
@@ -255,7 +254,7 @@
<!-- 【可选】APP实现的Receiver用于接收消息透传和操作结果的回调请根据需要添加 -->
<!-- YOUR_PACKAGE_PATH.CustomPushReceiver需要改为自己的Receiver -->
<receiver android:name="com.uiui.appstore.tpush.MessageReceiver">
<receiver android:name=".tpush.MessageReceiver">
<intent-filter>
<!-- 接收消息透传 -->
<action android:name="com.tencent.android.xg.vip.action.PUSH_MESSAGE" />
@@ -265,16 +264,16 @@
</receiver>
<!-- MQTT START -->
<service android:exported="false"
android:process=":xg_vip_service"
android:name="com.tencent.tpns.mqttchannel.services.MqttService" />
<service
android:name="com.tencent.tpns.mqttchannel.services.MqttService"
android:exported="false"
android:process=":xg_vip_service" />
<provider
android:exported="false"
android:name="com.tencent.tpns.baseapi.base.SettingsContentProvider"
android:authorities="com.uiui.appstore.XG_SETTINGS_PROVIDER" />
<!-- MQTT END-->
android:authorities="com.uiui.appstore.XG_SETTINGS_PROVIDER"
android:exported="false" />
<!-- MQTT END -->
<!-- 【必须】 请修改为 APP 的 AccessId“15”开头的10位数字中间没空格 -->
<meta-data
@@ -284,7 +283,6 @@
<meta-data
android:name="XG_V2_ACCESS_KEY"
android:value="A5QBQVQ7KLQD" />
</application>
</manifest>

View File

@@ -0,0 +1,129 @@
package com.uiui.appstore.activity;
import android.content.Intent;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.uiui.appstore.R;
import com.uiui.appstore.adapter.AppAdapter;
import com.uiui.appstore.base.BaseActivity;
import com.uiui.appstore.bean.AppInfo;
import com.uiui.appstore.bean.BaseResponse;
import com.uiui.appstore.common.CommonDatas;
import com.uiui.appstore.network.NetInterfaceManager;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.annotations.NonNull;
import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.schedulers.Schedulers;
public class ClassAppActivity extends BaseActivity {
@BindView(R.id.moreapp_tv_title)
TextView mMoreappTvTitle;
@BindView(R.id.recyclerView)
RecyclerView mRecyclerView;
@BindView(R.id.iv_nodata)
ImageView iv_nodata;
private AppAdapter mAppAdapter;
@Override
protected int setLayoutResourceID() {
return R.layout.activity_class_app;
}
@Override
protected void initView() {
ButterKnife.bind(this);
}
@Override
protected void initData() {
Intent intent = getIntent();
if (intent == null) {
return;
}
String className = intent.getStringExtra(CommonDatas.APP_CLASS_NAME);
if (!TextUtils.isEmpty(className)) {
mMoreappTvTitle.setText(className);
}
int classId = intent.getIntExtra(CommonDatas.APP_CLASS_ID, 0);
mAppAdapter = new AppAdapter(this);
GridLayoutManager gridLayoutManager = new GridLayoutManager(this, 2);
mRecyclerView.setLayoutManager(gridLayoutManager);
mRecyclerView.setAdapter(mAppAdapter);
getAppByClass(classId);
}
@Override
protected void setListener() {
}
public void finish(View view) {
finish();
}
public void getAppByClass(int classId) {
NetInterfaceManager.getInstance().getAdminAppByClassObservable(classId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BaseResponse<List<AppInfo>>>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
Log.e("getAppByClass", "onSubscribe: ");
}
@Override
public void onNext(@NonNull BaseResponse<List<AppInfo>> listBaseResponse) {
Log.e("getAppByClass", "onNext: " + listBaseResponse);
setAllAppdata(listBaseResponse);
}
@Override
public void onError(@NonNull Throwable e) {
Log.e("getAppByClass", "onError: " + e.getMessage());
setAllAppError();
onComplete();
}
@Override
public void onComplete() {
Log.e("getAppByClass", "onComplete: ");
}
});
}
private void setAllAppdata(BaseResponse<List<AppInfo>> listBaseResponse) {
int code = listBaseResponse.code;
if (code == 200) {
List<AppInfo> infos = listBaseResponse.data;
mRecyclerView.setVisibility(View.VISIBLE);
iv_nodata.setVisibility(View.GONE);
mAppAdapter.setData(infos);
} else {
mRecyclerView.setVisibility(View.GONE);
iv_nodata.setImageDrawable(getDrawable(R.drawable.app_nodata));
iv_nodata.setVisibility(View.VISIBLE);
}
}
private void setAllAppError() {
mRecyclerView.setVisibility(View.GONE);
iv_nodata.setImageDrawable(getDrawable(R.drawable.app_nonetwork));
iv_nodata.setVisibility(View.VISIBLE);
}
}

View File

@@ -32,7 +32,6 @@ public class KindDetailActivity extends BaseActivity implements RefreshManager.R
private SmartRefreshLayout mRefreshLayout;
private RecyclerView detail_rv;
private AppAdapter adapter;
private List<AppInfo> AppInfoList = new ArrayList<>();
private ImageView mImageView;
@Override
@@ -59,7 +58,7 @@ public class KindDetailActivity extends BaseActivity implements RefreshManager.R
grade = (String) SPUtils.get(this, "sn_grade", "");
title.setText(name);
RefreshManager.getInstance().register(this);
adapter = new AppAdapter(AppInfoList, KindDetailActivity.this);
adapter = new AppAdapter(KindDetailActivity.this);
adapter.setHasStableIds(true);
detail_rv.setAdapter(adapter);
detail_rv.setLayoutManager(new LinearLayoutManager(this));
@@ -83,28 +82,6 @@ public class KindDetailActivity extends BaseActivity implements RefreshManager.R
finish();
}
Handler handler = new Handler() {
@Override
public void handleMessage(@NonNull Message msg) {
super.handleMessage(msg);
switch (msg.what) {
case 1:
AppInfoList = (List<AppInfo>) msg.obj;
adapter.setData(AppInfoList);
adapter.notifyDataSetChanged();
mImageView.setVisibility(View.GONE);
detail_rv.setVisibility(View.VISIBLE);
break;
case 0:
mImageView.setVisibility(View.VISIBLE);
detail_rv.setVisibility(View.GONE);
break;
}
mRefreshLayout.finishRefresh();
}
};
@Override
public void onRefresh() {
@@ -115,6 +92,4 @@ public class KindDetailActivity extends BaseActivity implements RefreshManager.R
public void onLoadBitMap(boolean isLoad) {
}
}

View File

@@ -49,6 +49,7 @@ import io.reactivex.rxjava3.schedulers.Schedulers;
public class MainActivity extends BaseActivity {
private static final String TAG = MainActivity.class.getSimpleName();
private RelativeLayout search_layout;
private ImageView iv_download, iv_appicon;
private SlidingTabLayout mSlidingTabLayout;
@@ -131,7 +132,7 @@ public class MainActivity extends BaseActivity {
fragmentList.add(new FeaturedFragment());
// fragmentList.add(new RankFragment());
// fragmentList.add(new KindFragment());
fragmentList.add(new ManageFragment());
// fragmentList.add(new ManageFragment());
mViewPager.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {
@Override
public Fragment getItem(int position) {
@@ -144,8 +145,8 @@ public class MainActivity extends BaseActivity {
}
});
mViewPager.setOffscreenPageLimit(3);
String titles[] = new String[]{"专属应用",/* "我的分类",*/ "下载管理"};
mSlidingTabLayout.setViewPager(mViewPager, titles);
String titles[] = new String[]{"专属应用",/* "我的分类",*/ /*"下载管理"*/};
// mSlidingTabLayout.setViewPager(mViewPager, titles);
}
@Override

View File

@@ -0,0 +1,36 @@
package com.uiui.appstore.activity;
import android.view.View;
import com.uiui.appstore.R;
import com.uiui.appstore.base.BaseActivity;
import butterknife.ButterKnife;
public class ManagerAppActivity extends BaseActivity {
@Override
protected int setLayoutResourceID() {
return R.layout.activity_manager_app;
}
@Override
protected void initView() {
ButterKnife.bind(this);
}
@Override
protected void initData() {
}
@Override
protected void setListener() {
}
public void finish(View view) {
finish();
}
}

View File

@@ -0,0 +1,163 @@
package com.uiui.appstore.activity;
import android.content.Intent;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.uiui.appstore.R;
import com.uiui.appstore.adapter.AppAdapter;
import com.uiui.appstore.base.BaseActivity;
import com.uiui.appstore.bean.AppInfo;
import com.uiui.appstore.bean.BaseResponse;
import com.uiui.appstore.common.CommonDatas;
import com.uiui.appstore.fragment.FeaturedFragment;
import com.uiui.appstore.network.NetInterfaceManager;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
import butterknife.BindView;
import butterknife.ButterKnife;
import io.reactivex.rxjava3.annotations.NonNull;
import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable;
public class MoreAppActivity extends BaseActivity {
@BindView(R.id.moreapp_tv_title)
TextView mMoreappTvTitle;
@BindView(R.id.recyclerView)
RecyclerView mRecyclerView;
@BindView(R.id.iv_nodata)
ImageView iv_nodata;
private AppAdapter mAppAdapter;
@Override
protected int setLayoutResourceID() {
return R.layout.activity_more_app;
}
@Override
protected void initView() {
ButterKnife.bind(this);
Intent intent = getIntent();
if (intent == null) {
finish();
return;
}
String extra = intent.getStringExtra(CommonDatas.MORE_APP_TITLE);
if (!TextUtils.isEmpty(extra)) {
mMoreappTvTitle.setText(extra);
}
if (FeaturedFragment.EXCLUSIVE_APP.equals(extra)) {
getExclusiveApp();
} else if (FeaturedFragment.POPULAR_APP.equals(extra)) {
getAdminApp();
}
mAppAdapter = new AppAdapter(this);
GridLayoutManager gridLayoutManager = new GridLayoutManager(this, 2);
mRecyclerView.setLayoutManager(gridLayoutManager);
mRecyclerView.setAdapter(mAppAdapter);
}
@Override
protected void initData() {
}
@Override
protected void setListener() {
}
private void getExclusiveApp() {
NetInterfaceManager.getInstance()
.getQueryAllAppObservable()
.subscribe(new Observer<BaseResponse<List<AppInfo>>>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
Log.e("getAllAppInfo", "onSubscribe: ");
}
@Override
public void onNext(@NonNull BaseResponse<List<AppInfo>> listBaseResponse) {
Log.e("getAllAppInfo", "onNext: " + listBaseResponse);
setAllAppdata(listBaseResponse);
}
@Override
public void onError(@NonNull Throwable e) {
Log.e("getAllAppInfo", "onError: " + e.getMessage());
setAllAppError();
onComplete();
}
@Override
public void onComplete() {
Log.e("getAllAppInfo", "onComplete: ");
}
});
}
private void getAdminApp() {
NetInterfaceManager.getInstance()
.getAdminAppObservable()
.subscribe(new Observer<BaseResponse<List<AppInfo>>>() {
@Override
public void onSubscribe(Disposable d) {
Log.e("getAdminApp", "onSubscribe: ");
}
@Override
public void onNext(BaseResponse<List<AppInfo>> listBaseResponse) {
Log.e("getAdminApp", "onSubscribe: " + listBaseResponse);
setAllAppdata(listBaseResponse);
}
@Override
public void onError(Throwable e) {
Log.e("getAdminApp", "onError: " + e.getMessage());
setAllAppError();
onComplete();
}
@Override
public void onComplete() {
Log.e("getAdminApp", "onComplete: ");
}
});
}
private void setAllAppdata(BaseResponse<List<AppInfo>> listBaseResponse) {
int code = listBaseResponse.code;
if (code == 200) {
List<AppInfo> infos = listBaseResponse.data;
List<AppInfo> sortedApp = infos.stream().sorted(Comparator.comparingInt(AppInfo::getWeight).reversed()).collect(Collectors.toList());
mRecyclerView.setVisibility(View.VISIBLE);
iv_nodata.setVisibility(View.GONE);
mAppAdapter.setData(sortedApp);
} else {
mRecyclerView.setVisibility(View.GONE);
iv_nodata.setImageDrawable(getDrawable(R.drawable.app_nodata));
iv_nodata.setVisibility(View.VISIBLE);
}
}
private void setAllAppError() {
mRecyclerView.setVisibility(View.GONE);
iv_nodata.setImageDrawable(getDrawable(R.drawable.app_nonetwork));
iv_nodata.setVisibility(View.VISIBLE);
}
public void finish(View view) {
finish();
}
}

View File

@@ -1,7 +1,5 @@
package com.uiui.appstore.activity;
import android.os.Handler;
import android.os.Message;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Log;
@@ -13,7 +11,6 @@ import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
@@ -31,27 +28,28 @@ import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.schedulers.Schedulers;
public class SearcherActivity extends BaseActivity {
private static final String TAG = SearcherActivity.class.getSimpleName();
private List<AppInfo> mAppInfoList = new ArrayList<>();
@BindView(R.id.iv_back)
ImageView iv_back;
@BindView(R.id.recyclerView)
RecyclerView recyclerView;
@BindView(R.id.edit_search)
EditText edit_search;
@BindView(R.id.iv_back)
ImageView iv_back;
@BindView(R.id.tv_search)
TextView tv_search;
// @BindView(R.id.search)
// SearchView search;
AppAdapter madapter;
private AppAdapter mAppAdapter;
@Override
protected int setLayoutResourceID() {
@@ -72,9 +70,10 @@ public class SearcherActivity extends BaseActivity {
@Override
protected void initData() {
madapter = new AppAdapter(mAppInfoList, SearcherActivity.this);
madapter.setHasStableIds(true);
recyclerView.setAdapter(madapter);
mAppAdapter = new AppAdapter(SearcherActivity.this);
mAppAdapter.setHasStableIds(true);
mAppAdapter.setLineShow(false);
recyclerView.setAdapter(mAppAdapter);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
}
@@ -109,16 +108,7 @@ public class SearcherActivity extends BaseActivity {
.hideSoftInputFromWindow(SearcherActivity.this.getCurrentFocus()
.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
String text = edit_search.getText().toString();
if (TextUtils.isEmpty(text)) {
getAllAppPackageName();
} else {
int setting_admin_app = Settings.System.getInt(getContentResolver(), "setting_admin_app", 1);
if (setting_admin_app == 0) {
ToastUtil.debugShow("搜索功能已禁用");
} else {
searcheApp(text);
}
}
checkContent(text);
}
return true;
default:
@@ -128,12 +118,32 @@ public class SearcherActivity extends BaseActivity {
return false;
}
});
tv_search.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String text = edit_search.getText().toString();
checkContent(text);
}
});
}
private void checkContent(String text) {
if (TextUtils.isEmpty(text)) {
getAllAppPackageName();
} else {
int setting_admin_app = Settings.System.getInt(getContentResolver(), "setting_admin_app", 1);
if (setting_admin_app == 0) {
ToastUtil.debugShow("搜索功能已禁用");
} else {
searcheApp(text);
}
}
}
private void searcheApp(String text) {
NetInterfaceManager.getInstance()
.getSearchAppControl()
.getApp(Utils.getSerial(), text)
.getSearchAdminAppControl()
.getAdminApp(text)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BaseResponse<List<AppInfo>>>() {
@@ -148,10 +158,10 @@ public class SearcherActivity extends BaseActivity {
if (listBaseResponse.code == 200) {
List<AppInfo> appInfos = listBaseResponse.data;
if (appInfos != null && appInfos.size() > 0) {
madapter.setData(listBaseResponse.data);
mAppAdapter.setData(listBaseResponse.data);
}
} else {
madapter.setData(new ArrayList<>());
mAppAdapter.setData(new ArrayList<>());
ToastUtil.show("没有搜索到相关应用");
}
}
@@ -182,10 +192,10 @@ public class SearcherActivity extends BaseActivity {
if (listBaseResponse.code == 200) {
List<AppInfo> appInfos = listBaseResponse.data;
if (appInfos != null && appInfos.size() > 0) {
madapter.setData(listBaseResponse.data);
mAppAdapter.setData(listBaseResponse.data);
}
} else {
madapter.setData(new ArrayList<AppInfo>());
mAppAdapter.setData(new ArrayList<>());
}
}

View File

@@ -31,6 +31,8 @@ import com.uiui.appstore.utils.FileUtils;
import com.uiui.appstore.utils.StorageUtils;
import com.uiui.appstore.utils.Utils;
import org.jetbrains.annotations.NotNull;
import java.io.File;
import java.util.List;
@@ -39,15 +41,18 @@ import java.util.List;
*/
public class AppAdapter extends RecyclerView.Adapter<AppAdapter.Holder> {
private List<AppInfo> mAppInfoList;
private Context mContext;
private DownloadTask mDownloadTask;
private static final String TAG = AppAdapter.class.getSimpleName();
public AppAdapter(List<AppInfo> appInfoList, Context context) {
private Context mContext;
private List<AppInfo> mAppInfoList;
private DownloadTask mDownloadTask;
private boolean mShowLine = true;
public AppAdapter(Context context) {
this.mContext = context;
this.mAppInfoList = appInfoList;
}
@NotNull
@Override
public Holder onCreateViewHolder(ViewGroup parent, int viewType) {
Context context = parent.getContext();
@@ -58,6 +63,8 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.Holder> {
public void onBindViewHolder(final Holder holder, final int position) {
Aria.download(this).register();
final AppInfo appInfo = mAppInfoList.get(position);
// ImageLoader.getDefault().loadUrlRound(mContext, appInfo.getApp_img(), holder.ivIcon);
Glide.with(mContext)
.asBitmap()
.load(appInfo.getApp_img())
@@ -78,6 +85,23 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.Holder> {
mContext.startActivity(intent);
}
});
if (mShowLine) {
if (getItemCount() % 2 == 0) {
if (getItemCount() - 1 == position || getItemCount() - 2 == position) {
holder.mView.setVisibility(View.GONE);
} else {
holder.mView.setVisibility(View.VISIBLE);
}
} else {
if (getItemCount() - 1 == position) {
holder.mView.setVisibility(View.GONE);
} else {
holder.mView.setVisibility(View.VISIBLE);
}
}
} else {
holder.mView.setVisibility(View.GONE);
}
final boolean installed = ApkUtils.isInstalled(mContext, appInfo.getApp_package());
final boolean update = ApkUtils.isUpdate(mContext, appInfo.getApp_package(), appInfo.getApp_version_code());
if (installed) {
@@ -168,6 +192,7 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.Holder> {
TextView tvCompany, tvName, tvSize;
Button btnDownLoad;
RatingBar ratingBar;
View mView;
public Holder(View itemView) {
super(itemView);
@@ -177,6 +202,7 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.Holder> {
tvSize = itemView.findViewById(R.id.app_tv_size);
btnDownLoad = itemView.findViewById(R.id.app_btn_download);
ratingBar = itemView.findViewById(R.id.app_rating_bar);
mView = itemView.findViewById(R.id.line);
}
void refresh(DownloadTask task) {
@@ -240,6 +266,11 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.Holder> {
}
}
public void setLineShow(boolean show) {
this.mShowLine = show;
notifyDataSetChanged();
}
public void setData(List<AppInfo> appInfos) {
this.mAppInfoList = appInfos;
notifyDataSetChanged();
@@ -247,7 +278,6 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.Holder> {
private void ItemChanged(DownloadTask task) {
mDownloadTask = task;
// notifyDataSetChanged();
for (int i = 0; i < mAppInfoList.size(); i++) {
if (mAppInfoList.get(i).getApp_url().equals(task.getEntity().getUrl())) {
notifyItemChanged(i);

View File

@@ -12,18 +12,18 @@ import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.uiui.appstore.R;
import com.uiui.appstore.utils.FileUtils;
import com.uiui.appstore.view.NumberProgressBar;
import com.arialyy.annotations.Download;
import com.arialyy.aria.core.Aria;
import com.arialyy.aria.core.download.DownloadEntity;
import com.arialyy.aria.core.inf.IEntity;
import com.arialyy.aria.core.task.DownloadTask;
import com.bumptech.glide.Glide;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.uiui.appstore.R;
import com.uiui.appstore.bean.GlideCircleWithBorder;
import com.uiui.appstore.utils.FileUtils;
import com.uiui.appstore.view.NumberProgressBar;
import java.util.List;
@@ -94,13 +94,13 @@ public class DownloadManagerAdapter extends RecyclerView.Adapter<DownloadManager
.asBitmap()
.load(jsonObject.get("app_img").getAsString())
// .placeholder(R.drawable.ic_place_holder)
// .transform(new GlideCircleWithBorder(mContext))
.transform(new GlideCircleWithBorder(mContext))
.into(holder.icon);
holder.name.setText(jsonObject.get("app_name").getAsString());
holder.pbProgress.setMax(100);
holder.pbProgress.setProgress(entity.getPercent());
long progress = entity.getCurrentProgress();
holder.downloadSize.setText(FileUtils.formatFileSize(progress) + "/" + entity.getConvertFileSize());
holder.downloadSize.setText(FileUtils.formatFileSize(progress) + "/" + FileUtils.formatFileSize(entity.getFileSize()));
holder.refreshEntity(entity);
holder.start.setOnClickListener(new View.OnClickListener() {
@Override

View File

@@ -5,31 +5,40 @@ import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
public class AppInfo implements Serializable {
private static final long serialVersionUID = 8831166142886512597L;
@SerializedName(value = "app_id", alternate = {"id"})
private int app_id;
private String app_name;
private String app_package;
private String app_version_name;
private long app_version_code;
private long app_size;
private String app_desc;
private String app_url;
private String app_img;
private String app_preview1;
private String app_preview2;
private String app_preview3;
private String app_developer;
private String app_downloads;
private double app_score;
private int app_category;
private int app_subject;
private int app_type;
private int app_status;
private int is_delete;
private int is_update;
private int is_silent;
private String app_md5;
private String createtime;
int app_id;
String app_name;
String app_img;
String app_developer;
long app_size;
String app_package;
String app_version_name;
String app_md5;
double app_score;
String app_preview1;
String app_preview2;
String app_preview3;
String app_url;
String app_remarks;
String app_desc;
int is_promote;
int weight;
String discount;
String use_type;
long app_version_code;
String app_downloads;
int app_category;
int app_subject;
int app_type;
int app_status;
int is_delete;
int is_update;
int is_silent;
String createtime;
public int getApp_id() {
return app_id;
@@ -47,6 +56,30 @@ public class AppInfo implements Serializable {
this.app_name = app_name;
}
public String getApp_img() {
return app_img;
}
public void setApp_img(String app_img) {
this.app_img = app_img;
}
public String getApp_developer() {
return app_developer;
}
public void setApp_developer(String app_developer) {
this.app_developer = app_developer;
}
public long getApp_size() {
return app_size;
}
public void setApp_size(long app_size) {
this.app_size = app_size;
}
public String getApp_package() {
return app_package;
}
@@ -63,44 +96,20 @@ public class AppInfo implements Serializable {
this.app_version_name = app_version_name;
}
public long getApp_version_code() {
return app_version_code;
public String getApp_md5() {
return app_md5;
}
public void setApp_version_code(long app_version_code) {
this.app_version_code = app_version_code;
public void setApp_md5(String app_md5) {
this.app_md5 = app_md5;
}
public long getApp_size() {
return app_size;
public double getApp_score() {
return app_score;
}
public void setApp_size(long app_size) {
this.app_size = app_size;
}
public String getApp_desc() {
return app_desc;
}
public void setApp_desc(String app_desc) {
this.app_desc = app_desc;
}
public String getApp_url() {
return app_url;
}
public void setApp_url(String app_url) {
this.app_url = app_url;
}
public String getApp_img() {
return app_img;
}
public void setApp_img(String app_img) {
this.app_img = app_img;
public void setApp_score(double app_score) {
this.app_score = app_score;
}
public String getApp_preview1() {
@@ -127,12 +136,68 @@ public class AppInfo implements Serializable {
this.app_preview3 = app_preview3;
}
public String getApp_developer() {
return app_developer;
public String getApp_url() {
return app_url;
}
public void setApp_developer(String app_developer) {
this.app_developer = app_developer;
public void setApp_url(String app_url) {
this.app_url = app_url;
}
public String getApp_remarks() {
return app_remarks;
}
public void setApp_remarks(String app_remarks) {
this.app_remarks = app_remarks;
}
public String getApp_desc() {
return app_desc;
}
public void setApp_desc(String app_desc) {
this.app_desc = app_desc;
}
public int getIs_promote() {
return is_promote;
}
public void setIs_promote(int is_promote) {
this.is_promote = is_promote;
}
public int getWeight() {
return weight;
}
public void setWeight(int weight) {
this.weight = weight;
}
public String getDiscount() {
return discount;
}
public void setDiscount(String discount) {
this.discount = discount;
}
public String getUse_type() {
return use_type;
}
public void setUse_type(String use_type) {
this.use_type = use_type;
}
public long getApp_version_code() {
return app_version_code;
}
public void setApp_version_code(long app_version_code) {
this.app_version_code = app_version_code;
}
public String getApp_downloads() {
@@ -143,14 +208,6 @@ public class AppInfo implements Serializable {
this.app_downloads = app_downloads;
}
public double getApp_score() {
return app_score;
}
public void setApp_score(double app_score) {
this.app_score = app_score;
}
public int getApp_category() {
return app_category;
}
@@ -214,12 +271,4 @@ public class AppInfo implements Serializable {
public void setCreatetime(String createtime) {
this.createtime = createtime;
}
public String getApp_md5() {
return app_md5;
}
public void setApp_md5(String app_md5) {
this.app_md5 = app_md5;
}
}

View File

@@ -8,6 +8,8 @@ import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import androidx.annotation.NonNull;
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation;
import com.uiui.appstore.R;
@@ -18,6 +20,9 @@ import java.security.MessageDigest;
* 加载圆形头像带白色边框
*/
public class GlideCircleWithBorder extends BitmapTransformation {
private static final String ID = "com.bumptech.glide.load.resource.bitmap.CenterCrop";
private static final byte[] ID_BYTES = ID.getBytes(CHARSET);
private Paint mBorderPaint;
private float mBorderWidth;
private Context mContext;
@@ -103,7 +108,17 @@ public class GlideCircleWithBorder extends BitmapTransformation {
}
@Override
public void updateDiskCacheKey(MessageDigest messageDigest) {
public boolean equals(Object o) {
return o instanceof GlideCircleWithBorder;
}
@Override
public int hashCode() {
return ID.hashCode();
}
@Override
public void updateDiskCacheKey(@NonNull MessageDigest messageDigest) {
messageDigest.update(ID_BYTES);
}
}

View File

@@ -3,4 +3,8 @@ package com.uiui.appstore.common;
public class CommonDatas {
public static final String FLAG_FIRST_ENTER = "qch_first_enter";
public static final String MORE_APP_TITLE = "moreAppTitle";
public static final String APP_CLASS_ID = "class_id";
public static final String APP_CLASS_NAME = "class_name";
}

View File

@@ -27,23 +27,29 @@ import androidx.recyclerview.widget.SimpleItemAnimator;
import com.blankj.utilcode.util.ScreenUtils;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions;
import com.bumptech.glide.request.target.CustomTarget;
import com.bumptech.glide.request.transition.Transition;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.uiui.appstore.R;
import com.uiui.appstore.activity.ClassAppActivity;
import com.uiui.appstore.activity.ManagerAppActivity;
import com.uiui.appstore.activity.MoreAppActivity;
import com.uiui.appstore.adapter.AppAdapter;
import com.uiui.appstore.adapter.BannerViewHolder;
import com.uiui.appstore.base.LazyLoadFragment;
import com.uiui.appstore.base.RefreshManager;
import com.uiui.appstore.bean.AppClassBean;
import com.uiui.appstore.bean.AppInfo;
import com.uiui.appstore.bean.AppInfos;
import com.uiui.appstore.bean.Banner;
import com.uiui.appstore.bean.BaseResponse;
import com.uiui.appstore.bean.ImageUrl;
import com.uiui.appstore.common.CommonDatas;
import com.uiui.appstore.network.NetInterfaceManager;
import com.uiui.appstore.utils.DensityUtil;
import com.uiui.appstore.utils.LogUtils;
import com.uiui.appstore.utils.ToastUtil;
import com.uiui.appstore.utils.Utils;
import com.zhpan.bannerview.BannerViewPager;
import com.zhpan.bannerview.constants.IndicatorSlideMode;
@@ -52,7 +58,9 @@ import com.zhpan.bannerview.holder.HolderCreator;
import com.zhpan.bannerview.utils.BannerUtils;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
import butterknife.BindView;
import butterknife.ButterKnife;
@@ -70,18 +78,46 @@ import io.reactivex.rxjava3.schedulers.Schedulers;
public class FeaturedFragment extends LazyLoadFragment implements RefreshManager.RefreshInterface {
private static final String TAG = FeaturedFragment.class.getSimpleName();
@BindView(R.id.featured_rv_result)
RecyclerView mRvResult;
@BindView(R.id.cl)
ConstraintLayout cl;
@BindView(R.id.featured_refresh_layout)
SmartRefreshLayout mRefreshLayout;
@BindView(R.id.cl)
ConstraintLayout cl;
@BindView(R.id.iv_banner)
ImageView iv_banner;
@BindView(R.id.iv_nodata)
ImageView iv_nodata;
@BindView(R.id.banner_view)
BannerViewPager<String, BannerViewHolder> mViewPager;
@BindView(R.id.cl_exclusive)
ConstraintLayout cl_exclusive;
@BindView(R.id.tv_exclusive_app)
TextView tv_exclusive_app;
@BindView(R.id.rv_exclusive)
RecyclerView rv_exclusive;
@BindView(R.id.iv_exclusive_nodata)
ImageView iv_exclusive_nodata;
@BindView(R.id.cl_popular)
ConstraintLayout cl_popular;
@BindView(R.id.tv_popular_app)
TextView tv_popular_app;
@BindView(R.id.rv_popular)
RecyclerView rv_popular;
@BindView(R.id.iv_popular_nodata)
ImageView iv_popular_nodata;
@BindView(R.id.cl_0)
ConstraintLayout cl_0;
@BindView(R.id.cl_1)
ConstraintLayout cl_1;
@BindView(R.id.cl_2)
ConstraintLayout cl_2;
@BindView(R.id.cl_3)
ConstraintLayout cl_3;
@BindView(R.id.cl_4)
ConstraintLayout cl_4;
@BindView(R.id.cl_5)
ConstraintLayout cl_5;
@BindView(R.id.iv_0)
ImageView iv_0;
@BindView(R.id.iv_1)
@@ -92,12 +128,16 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
ImageView iv_3;
@BindView(R.id.iv_4)
ImageView iv_4;
@BindView(R.id.iv_5)
ImageView iv_5;
private Context mContext;
private AppAdapter mExclusiveAppAdapter;
private AppAdapter mPopularAppAdapter;
private List<AppClassBean> mAppClassList;
private List<AppInfos> appInfoList;//
private List<AppInfo> newAppInfoList = new ArrayList<>();
private AppAdapter mAppAdapter;
private boolean isNotLoadBitmap;
public static final String EXCLUSIVE_APP = "专属应用";
public static final String POPULAR_APP = "热门应用";
public FeaturedFragment() {
@@ -120,9 +160,14 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
@Override
public void initViews(View view) {
ButterKnife.bind(this, view);
((SimpleItemAnimator) mRvResult.getItemAnimator()).setSupportsChangeAnimations(false);
mContext = view.getContext();
((SimpleItemAnimator) rv_popular.getItemAnimator()).setSupportsChangeAnimations(false);
setImageViewSize();
RefreshManager.getInstance().register(this);
mRefreshLayout.setEnableLoadMore(false);
mRefreshLayout.setEnableRefresh(true);
mRefreshLayout.setOnRefreshListener(refreshlayout -> initAPPData());
mRefreshLayout.autoRefresh();
mViewPager.setIndicatorSlideMode(IndicatorSlideMode.SMOOTH)
.setHolderCreator(new HolderCreator<BannerViewHolder>() {
@Override
@@ -138,30 +183,81 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
}
})
.setInterval(5000);
isNotLoadBitmap = false;
cl_0.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openAppClass(0);
}
});
cl_1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openAppClass(1);
}
});
cl_2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openAppClass(2);
}
});
cl_3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openAppClass(3);
}
});
cl_4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openAppClass(4);
}
});
cl_5.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(getActivity(), ManagerAppActivity.class));
}
});
tv_exclusive_app.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(mContext, MoreAppActivity.class);
intent.putExtra(CommonDatas.MORE_APP_TITLE, EXCLUSIVE_APP);
startActivity(intent);
}
});
tv_popular_app.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(mContext, MoreAppActivity.class);
intent.putExtra(CommonDatas.MORE_APP_TITLE, POPULAR_APP);
startActivity(intent);
}
});
}
@Override
public void initDatas() {
mAppAdapter = new AppAdapter(newAppInfoList, getActivity());
mAppAdapter.setHasStableIds(true);
int orientation = 0;
orientation = getActivity().getResources().getConfiguration().orientation;
if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), 3);
mRvResult.setLayoutManager(gridLayoutManager);
} else if (orientation == Configuration.ORIENTATION_PORTRAIT) {
GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), 2);
mRvResult.setLayoutManager(gridLayoutManager);
} else {
mRvResult.setLayoutManager(new LinearLayoutManager(getActivity()));
}
mRvResult.setAdapter(mAppAdapter);
mRefreshLayout.setEnableLoadMore(false);
mRefreshLayout.setEnableRefresh(true);
mRefreshLayout.setOnRefreshListener(refreshlayout -> initAPPData());
mAppAdapter.setData(newAppInfoList);
mRefreshLayout.autoRefresh();
mExclusiveAppAdapter = new AppAdapter(mContext);
mExclusiveAppAdapter.setHasStableIds(true);
mPopularAppAdapter = new AppAdapter(mContext);
mPopularAppAdapter.setHasStableIds(true);
// int orientation = mContext.getResources().getConfiguration().orientation;
// if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 2);
rv_popular.setLayoutManager(gridLayoutManager);
// } else if (orientation == Configuration.ORIENTATION_PORTRAIT) {
// GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 2);
// rv_popular.setLayoutManager(gridLayoutManager);
// } else {
// rv_popular.setLayoutManager(new LinearLayoutManager(mContext));
// }
GridLayoutManager gridLayoutManager2 = new GridLayoutManager(mContext, 2);
rv_exclusive.setLayoutManager(gridLayoutManager2);
rv_popular.setAdapter(mPopularAppAdapter);
rv_exclusive.setAdapter(mExclusiveAppAdapter);
}
@Override
@@ -173,13 +269,13 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
public void onConfigurationChanged(@androidx.annotation.NonNull Configuration newConfig) {
super.onConfigurationChanged(newConfig);
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), 3);
mRvResult.setLayoutManager(gridLayoutManager);
GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 3);
rv_popular.setLayoutManager(gridLayoutManager);
} else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) {
GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), 2);
mRvResult.setLayoutManager(gridLayoutManager);
GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 2);
rv_popular.setLayoutManager(gridLayoutManager);
} else {
mRvResult.setLayoutManager(new LinearLayoutManager(getActivity()));
rv_popular.setLayoutManager(new LinearLayoutManager(mContext));
}
initAPPData();
}
@@ -189,7 +285,8 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
public void onResume() {
super.onResume();
registerReceiver();
mAppAdapter.notifyDataSetChanged();
mExclusiveAppAdapter.notifyDataSetChanged();
mPopularAppAdapter.notifyDataSetChanged();
}
@Override
@@ -197,7 +294,7 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
super.onDestroy();
if (myReceiver != null) {
try {
getActivity().unregisterReceiver(myReceiver);
mContext.unregisterReceiver(myReceiver);
} catch (Exception e) {
LogUtils.e("onDestroy", e.getMessage());
}
@@ -213,7 +310,7 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
filter.addDataScheme("package");
filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
getActivity().registerReceiver(myReceiver, filter);
mContext.registerReceiver(myReceiver, filter);
}
}
@@ -228,7 +325,7 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
|| action.equals(Intent.ACTION_PACKAGE_REPLACED)
|| action.equals(Intent.ACTION_PACKAGE_REMOVED)) {
// adapter.setData(checkUpdateOrInstalled(newAppInfoList));
mAppAdapter.notifyDataSetChanged();
mPopularAppAdapter.notifyDataSetChanged();
Log.e("installReceiver", action);
}
@@ -236,10 +333,11 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
}
synchronized private void initAPPData() {
int setting_admin_app = Settings.System.getInt(getActivity().getContentResolver(), "setting_admin_app", 1);
int setting_admin_app = Settings.System.getInt(mContext.getContentResolver(), "setting_admin_app", 1);
if (setting_admin_app == 0) {
getAllAppInfo();
} else {
getAllAppInfo();
getAdminApp();
}
getBanner();
@@ -267,9 +365,9 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
}
} else {
if (ScreenUtils.isPortrait()) {
iv_banner.setImageDrawable(getActivity().getDrawable(R.drawable.port_banner));
setBannerResource(R.drawable.port_banner);
} else {
iv_banner.setImageDrawable(getActivity().getDrawable(R.drawable.land_banner));
setBannerResource(R.drawable.land_banner);
}
}
}
@@ -318,6 +416,25 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
Glide.with(iv_banner)
.load(url)
.transition(new DrawableTransitionOptions().dontTransition())
.transform(new RoundedCorners(DensityUtil.dpToPx(mContext, 8)))
.into(new CustomTarget<Drawable>() {
@Override
public void onResourceReady(Drawable resource, Transition<? super Drawable> transition) {
iv_banner.setImageDrawable(resource);
}
@Override
public void onLoadCleared(@Nullable Drawable placeholder) {
}
});
}
private void setBannerResource(int resId) {
Glide.with(iv_banner)
.load(resId)
.transition(new DrawableTransitionOptions().dontTransition())
.transform(new RoundedCorners(DensityUtil.dpToPx(mContext, 8)))
.into(new CustomTarget<Drawable>() {
@Override
public void onResourceReady(Drawable resource, Transition<? super Drawable> transition) {
@@ -346,12 +463,12 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
Log.e(TAG, "initView: heightPixels: " + outMetrics.heightPixels);
int screenWidth = outMetrics.widthPixels;
int imageViewWidth = screenWidth - 100;
int imageViewWidth = screenWidth - DensityUtil.dpToPx(mContext, 20);
//获取屏幕像素
Resources res = getActivity().getResources();
Resources res = mContext.getResources();
BitmapFactory.Options opts = new BitmapFactory.Options();
opts.inJustDecodeBounds = true;
// if (getActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
// if (mContext.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
// //竖屏
// BitmapFactory.decodeResource(res, R.drawable.port_banner, opts);
// } else {
@@ -387,13 +504,13 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
@Override
public void onNext(@NonNull BaseResponse<List<AppInfo>> listBaseResponse) {
Log.e("getAllAppInfo", "onNext: " + listBaseResponse);
setAllAppdata(listBaseResponse);
setExclusiveAppdata(listBaseResponse);
}
@Override
public void onError(@NonNull Throwable e) {
Log.e("getAllAppInfo", "onError: " + e.getMessage());
setAllAppError();
setExclusiveAppError();
onComplete();
}
@@ -417,13 +534,13 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
@Override
public void onNext(BaseResponse<List<AppInfo>> listBaseResponse) {
Log.e("getAdminApp", "onSubscribe: " + listBaseResponse);
setAllAppdata(listBaseResponse);
setPopularAppdata(listBaseResponse);
}
@Override
public void onError(Throwable e) {
Log.e("getAdminApp", "onError: " + e.getMessage());
setAllAppError();
setPopularAppError();
onComplete();
}
@@ -471,14 +588,15 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
if (appClassList == null || appClassList.size() == 0) {
return;
}
this.mAppClassList = appClassList;
for (int i = 0; i < appClassList.size(); i++) {
AppClassBean appClassBean = appClassList.get(i);
int imageviewId = getActivity().getResources().getIdentifier("iv_" + (i), "id", getActivity().getPackageName());
int textviewId = getActivity().getResources().getIdentifier("tv_" + (i), "id", getActivity().getPackageName());
ImageView imageView = getActivity().findViewById(imageviewId);
int imageviewId = mContext.getResources().getIdentifier("iv_" + (i), "id", mContext.getPackageName());
int textviewId = mContext.getResources().getIdentifier("tv_" + (i), "id", mContext.getPackageName());
try {
ImageView imageView = getActivity().findViewById(imageviewId);
TextView textView = getActivity().findViewById(textviewId);
Glide.with(getActivity()).load(appClassBean.getImg_url()).error(R.drawable.ic_app).into(imageView);
Glide.with(mContext).load(appClassBean.getImg_url()).error(R.drawable.ic_app).into(imageView);
textView.setText(appClassBean.getName());
} catch (Exception e) {
Log.e(TAG, "setClass: " + e.getMessage());
@@ -486,26 +604,78 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
}
}
private void setAllAppdata(BaseResponse<List<AppInfo>> listBaseResponse) {
private void openAppClass(int index) {
if (mAppClassList == null || mAppClassList.size() == 0) {
ToastUtil.show("该分类没有应用");
return;
}
AppClassBean appClassBean = mAppClassList.get(index);
if (appClassBean == null) {
ToastUtil.show("该分类没有应用");
return;
}
int classId = appClassBean.getId();
String className = appClassBean.getName();
Intent intent = new Intent(getActivity(), ClassAppActivity.class);
intent.putExtra(CommonDatas.APP_CLASS_ID, classId);
intent.putExtra(CommonDatas.APP_CLASS_NAME, className);
startActivity(intent);
}
private void setExclusiveAppdata(BaseResponse<List<AppInfo>> listBaseResponse) {
int code = listBaseResponse.code;
if (code == 200) {
List<AppInfo> infos = listBaseResponse.data;
newAppInfoList = infos;
mRvResult.setVisibility(View.VISIBLE);
iv_nodata.setVisibility(View.GONE);
mAppAdapter.setData(newAppInfoList);
mAppAdapter.notifyDataSetChanged();
if (infos.size() <= 6) {
tv_exclusive_app.setVisibility(View.GONE);
} else {
tv_exclusive_app.setVisibility(View.VISIBLE);
}
List<AppInfo> filterApp = infos.stream().sorted(Comparator.comparingInt(AppInfo::getWeight).reversed()).limit(6).collect(Collectors.toList());
rv_exclusive.setVisibility(View.VISIBLE);
iv_exclusive_nodata.setVisibility(View.GONE);
mExclusiveAppAdapter.setData(filterApp);
cl_exclusive.setVisibility(View.VISIBLE);
} else {
mRvResult.setVisibility(View.GONE);
iv_nodata.setImageDrawable(getActivity().getDrawable(R.drawable.app_nodata));
iv_nodata.setVisibility(View.VISIBLE);
cl_exclusive.setVisibility(View.GONE);
rv_exclusive.setVisibility(View.GONE);
iv_exclusive_nodata.setImageDrawable(mContext.getDrawable(R.drawable.app_nodata));
iv_exclusive_nodata.setVisibility(View.VISIBLE);
}
}
private void setAllAppError() {
mRvResult.setVisibility(View.GONE);
iv_nodata.setImageDrawable(getActivity().getDrawable(R.drawable.app_nonetwork));
iv_nodata.setVisibility(View.VISIBLE);
private void setExclusiveAppError() {
rv_exclusive.setVisibility(View.GONE);
iv_exclusive_nodata.setImageDrawable(mContext.getDrawable(R.drawable.app_nonetwork));
iv_exclusive_nodata.setVisibility(View.VISIBLE);
}
private void setPopularAppdata(BaseResponse<List<AppInfo>> listBaseResponse) {
int code = listBaseResponse.code;
if (code == 200) {
List<AppInfo> infos = listBaseResponse.data;
if (infos.size() <= 6) {
tv_popular_app.setVisibility(View.GONE);
} else {
tv_popular_app.setVisibility(View.VISIBLE);
}
List<AppInfo> filterApp = infos.stream().sorted(Comparator.comparingInt(AppInfo::getWeight).reversed()).limit(12).collect(Collectors.toList());
rv_popular.setVisibility(View.VISIBLE);
iv_popular_nodata.setVisibility(View.GONE);
mPopularAppAdapter.setData(filterApp);
cl_popular.setVisibility(View.VISIBLE);
} else {
cl_popular.setVisibility(View.GONE);
rv_popular.setVisibility(View.GONE);
iv_popular_nodata.setImageDrawable(mContext.getDrawable(R.drawable.app_nodata));
iv_popular_nodata.setVisibility(View.VISIBLE);
}
}
private void setPopularAppError() {
rv_popular.setVisibility(View.GONE);
iv_popular_nodata.setImageDrawable(mContext.getDrawable(R.drawable.app_nonetwork));
iv_popular_nodata.setVisibility(View.VISIBLE);
}
private void getBannerImg() {

View File

@@ -2,14 +2,7 @@ package com.uiui.appstore.fragment;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
@@ -18,23 +11,23 @@ import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.arialyy.aria.core.Aria;
import com.uiui.appstore.BuildConfig;
import com.uiui.appstore.R;
import com.uiui.appstore.activity.DownloadManagerActivity;
import com.uiui.appstore.activity.LocalManagerActivity;
import com.uiui.appstore.activity.PrivacyPolicyActivity;
import com.uiui.appstore.activity.UserAgreementActivity;
import com.uiui.appstore.adapter.UpdateAppAdapter;
import com.uiui.appstore.base.LazyLoadFragment;
import com.uiui.appstore.bean.AppInfo;
import com.uiui.appstore.bean.LocalApp;
import com.uiui.appstore.bean.UpdateAppInfo;
import com.uiui.appstore.utils.ApkUtils;
import com.uiui.appstore.utils.ToastUtil;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* Created by asus on 2017/10/23.
@@ -43,15 +36,28 @@ import java.util.List;
public class ManageFragment extends LazyLoadFragment {
private RecyclerView mRvLocal;
private ImageView iv_nodata;
private TextView manage_tv_updateNum, manage_tv_appNum, tv_version;
@BindView(R.id.iv_nodata)
ImageView iv_nodata;
@BindView(R.id.manage_tv_appNum)
TextView manage_tv_appNum;
@BindView(R.id.manage_tv_taskNum)
TextView manage_tv_taskNum;
@BindView(R.id.manage_tv_updateNum)
TextView manage_tv_updateNum;
@BindView(R.id.tv_version)
TextView tv_version;
@BindView(R.id.manage_cl_localapp)
ConstraintLayout manage_cl_localapp;
@BindView(R.id.manage_cl_download)
ConstraintLayout manage_cl_download;
@BindView(R.id.manage_rv_local)
RecyclerView mRvLocal;
private List<LocalApp> localAppList;
private List<UpdateAppInfo> updateAppInfoList;
private List<AppInfo> applist;
private List<String> packageNameList = new ArrayList<>();
private UpdateAppAdapter adapter;
private ConstraintLayout manage_cl_localapp, manage_cl_download;
private Context mContext;
// private TextView tv_pripolicy;
// private TextView tv_useragreement;
@@ -63,9 +69,7 @@ public class ManageFragment extends LazyLoadFragment {
@Override
public void initViews(View view) {
manage_tv_updateNum = view.findViewById(R.id.manage_tv_updateNum);
manage_tv_appNum = view.findViewById(R.id.manage_tv_appNum);
tv_version = view.findViewById(R.id.tv_version);
ButterKnife.bind(this, view);
// tv_pripolicy = view.findViewById(R.id.tv_pripolicy);
// tv_useragreement = view.findViewById(R.id.tv_useragreement);
// tv_pripolicy.setOnClickListener(v -> {
@@ -75,26 +79,15 @@ public class ManageFragment extends LazyLoadFragment {
// startActivity(new Intent(getActivity(), UserAgreementActivity.class));
// });
tv_version.setText("版本 " + BuildConfig.VERSION_NAME);
manage_cl_localapp = view.findViewById(R.id.manage_cl_localapp);
manage_cl_localapp.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(mContext, LocalManagerActivity.class));
}
});
manage_cl_download = view.findViewById(R.id.manage_cl_download);
manage_cl_download.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(mContext, DownloadManagerActivity.class));
}
});
iv_nodata = view.findViewById(R.id.iv_nodata);
mRvLocal = view.findViewById(R.id.manage_rv_local);
if (Aria.download(this).getAllNotCompleteTask() != null) {
manage_tv_taskNum.setText(String.valueOf(Aria.download(this).getAllNotCompleteTask().size()));
} else {
manage_tv_taskNum.setText("0");
}
manage_cl_localapp.setOnClickListener(v -> startActivity(new Intent(mContext, LocalManagerActivity.class)));
manage_cl_download.setOnClickListener(v -> startActivity(new Intent(mContext, DownloadManagerActivity.class)));
updateAppInfoList = new ArrayList<>();
adapter = new UpdateAppAdapter(updateAppInfoList, mContext);
mRvLocal.setAdapter(adapter);
mRvLocal.setLayoutManager(new LinearLayoutManager(mContext));
}
@@ -113,81 +106,9 @@ public class ManageFragment extends LazyLoadFragment {
public void onStart() {
super.onStart();
mContext = getActivity();
initAPPData(handler);
List<LocalApp> localApps = ApkUtils.getLocalApp(getActivity());
List<LocalApp> localApps = ApkUtils.getLocalApp(getActivity());
if (localApps != null && localApps.size() > 0) {
manage_tv_appNum.setText(localApps.size() + "");
}
}
synchronized private void initAPPData(final Handler handler) {
// OKGO.getAllAppInfo(handler);
}
synchronized private void updateDta(List<AppInfo> list) {
packageNameList.clear();
for (AppInfo appInfo : list) {
packageNameList.add(appInfo.getApp_package());
}
localAppList = ApkUtils.getLocalApp(getActivity());
if (packageNameList != null && packageNameList.size() > 0) {
if (localAppList != null && localAppList.size() > 0) {
for (LocalApp app : localAppList) {
if (packageNameList.contains(app.getPackageName())) {
AppInfo info = list.get(packageNameList.indexOf(app.getPackageName()));
if (ApkUtils.checkIsUpdate(mContext, info.getApp_package(), info.getApp_version_code())) {
UpdateAppInfo updateAppInfo = new UpdateAppInfo();
updateAppInfo.setVersionCode(app.getVersionCode());
updateAppInfo.setVersionName(app.getVersion());
updateAppInfo.setAppName(app.getAppName());
updateAppInfo.setIcon(app.getIcon());
updateAppInfo.setNewVersionCode(info.getApp_version_code());
updateAppInfo.setNewVersionName(info.getApp_version_name());
updateAppInfo.setURL(info.getApp_url());
updateAppInfo.setPackageName(info.getApp_package());
updateAppInfo.setAppInfo(info);
updateAppInfoList.add(updateAppInfo);
}
}
}
} else {
ToastUtil.show("未安装本地应用");
}
} else {
ToastUtil.show("没有可以下载的在线应用");
}
if (null == updateAppInfoList || updateAppInfoList.size() == 0) {
iv_nodata.setVisibility(View.VISIBLE);
mRvLocal.setVisibility(View.GONE);
}
}
int updateNum = 0;
Handler handler = new Handler() {
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
switch (msg.what) {
case 0:
iv_nodata.setVisibility(View.VISIBLE);
mRvLocal.setVisibility(View.GONE);
break;
case 1:
applist = (List<AppInfo>) msg.obj;
updateDta(applist);
updateNum = updateAppInfoList.size();
manage_tv_updateNum.setText(updateNum + "");
if (updateNum == 0) {
iv_nodata.setVisibility(View.VISIBLE);
mRvLocal.setVisibility(View.GONE);
} else {
iv_nodata.setVisibility(View.GONE);
mRvLocal.setVisibility(View.VISIBLE);
}
adapter.notifyDataSetChanged();
break;
}
}
};
}

View File

@@ -33,7 +33,6 @@ import java.util.List;
public class RankFragment extends LazyLoadFragment implements RefreshManager.RefreshInterface {
private RecyclerView mRvResult;
private SmartRefreshLayout mRefreshLayout;
private List<AppInfo> mAppInfoList;
private AppAdapter mAppAdapter;
@Override
@@ -95,8 +94,7 @@ public class RankFragment extends LazyLoadFragment implements RefreshManager.Ref
}
private void initView() {
mAppInfoList = new ArrayList<>();
mAppAdapter = new AppAdapter(mAppInfoList, getActivity());
mAppAdapter = new AppAdapter(getActivity());
mRvResult.setLayoutManager(new LinearLayoutManager(getActivity()));
mRvResult.setAdapter(mAppAdapter);
mRefreshLayout.setEnableRefresh(true);
@@ -119,20 +117,4 @@ public class RankFragment extends LazyLoadFragment implements RefreshManager.Ref
public void onLoadBitMap(boolean isLoad) {
}
private Handler handler = new Handler() {
@Override
public void handleMessage(@NonNull Message msg) {
super.handleMessage(msg);
switch (msg.what) {
case 1:
mAppInfoList = (List<AppInfo>) msg.obj;
mAppAdapter.setData(mAppInfoList);
mAppAdapter.notifyDataSetChanged();
break;
}
mRefreshLayout.finishRefresh();
}
};
}

View File

@@ -0,0 +1,156 @@
package com.uiui.appstore.image;
import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.Priority;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions;
import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.request.target.SimpleTarget;
import com.bumptech.glide.request.target.Target;
import com.bumptech.glide.request.transition.Transition;
import com.uiui.appstore.R;
// ImageLoader 加载图片 清除缓存
public class ImageLoader {
// 优先级,设置图片加载的顺序 Priority.LOW Priority.NORMAL Priority.HIGH Priority.IMMEDIATE
public static Priority p1 = Priority.LOW;
public static Priority p2 = Priority.NORMAL;
public static Priority p3 = Priority.HIGH;
public static Priority p4 = Priority.IMMEDIATE;
private static volatile ImageLoader imageLoader;
RequestOptions options = new RequestOptions()
.centerCrop()
.override(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL)
.placeholder(R.mipmap.ic_launcher)
.fitCenter()
.diskCacheStrategy(DiskCacheStrategy.NONE)
.priority(ImageLoader.p4);
RequestOptions options1 = new RequestOptions()
.centerCrop()
.override(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL)
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.placeholder(R.mipmap.ic_launcher)
.fitCenter()
.error(R.mipmap.ic_launcher)
.priority(ImageLoader.p3);
RequestOptions options2 = new RequestOptions()
.centerCrop()
.override(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL)
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.placeholder(R.mipmap.ic_launcher)
.error(R.mipmap.ic_launcher)
.fitCenter()
// .transform(new GlideCircleTransformation())
.transform(new RoundedCorners(30))
.priority(ImageLoader.p3);
private ImageLoader() {
}
public static ImageLoader getDefault() {
if (imageLoader == null) {
synchronized (ImageLoader.class) {
if (imageLoader == null) {
imageLoader = new ImageLoader();
}
}
}
return imageLoader;
}
// ImageView 加载gif图片
public void loadGif(Context context, Object drawable, ImageView view) {
if (context != null && !((Activity) context).isFinishing()) {
Glide.with(context)
.load(drawable)
.apply(options)
.transition(new DrawableTransitionOptions().dontTransition())
.into(view);
}
}
// ImageView 加载本地图片
public void load(Context context, Object drawable, ImageView view) {
if (context != null && !((Activity) context).isFinishing()) {
Glide.with(context).load(drawable)
.apply(options)
.transition(new DrawableTransitionOptions().dontTransition())
.into(view);
}
}
// View 加载背景图片
public void loadBackground(Context context, int drawable, final View view) {
if (context != null && !((Activity) context).isFinishing()) {
Glide.with(context)
.load(drawable)
.apply(options)
.transition(new DrawableTransitionOptions().dontTransition())
.into(new SimpleTarget<Drawable>() {
@Override
public void onResourceReady(Drawable resource, Transition<? super Drawable> transition) {
view.setBackground(resource);
}
});
}
}
// ImageView 加载网络图片
public void loadUrl(Context context, String url, ImageView view) {
if (context != null && !((Activity) context).isFinishing()) {
Glide.with(context).load(url)
.apply(options1)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.transition(new DrawableTransitionOptions().dontTransition())
.into(view);
}
}
// ImageView 加载本地圆形图片
public void loadLocalRound(Context context, int drawable, ImageView view) {
if (context != null && !((Activity) context).isFinishing()) {
Glide.with(context)
.load(drawable)
.apply(options)
.transition(new DrawableTransitionOptions().dontTransition())
.into(view);
}
}
// ImageView 加载本地圆形图片
public void loadLocalRound(Context context, Drawable drawable, ImageView view) {
if (context != null && !((Activity) context).isFinishing()) {
Glide.with(context)
.load(drawable)
// .transform(new GlideCircleWithBorder(context))
// .apply(options)
// .transition(new DrawableTransitionOptions().dontTransition())
.into(view);
}
}
// ImageView 加载网络圆形图片
public void loadUrlRound(Context context, String url, ImageView view) {
if (context != null && !((Activity) context).isFinishing()) {
Glide.with(context).load(url)
// .transform(new GlideCircleWithBorder(context))
.apply(options2)
.transition(new DrawableTransitionOptions().dontTransition())
.into(view);
}
}
}

View File

@@ -3,33 +3,28 @@ package com.uiui.appstore.network;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Environment;
import android.text.TextUtils;
import android.util.Log;
import com.tencent.android.tpush.XGIOperateCallback;
import com.tencent.android.tpush.XGPushManager;
import com.tencent.mmkv.MMKV;
import com.trello.rxlifecycle4.RxLifecycle;
import com.trello.rxlifecycle4.android.ActivityEvent;
import com.uiui.appstore.bean.AppClassBean;
import com.uiui.appstore.bean.AppInfo;
import com.uiui.appstore.bean.Banner;
import com.uiui.appstore.bean.BaseResponse;
import com.uiui.appstore.bean.BatchID;
import com.uiui.appstore.disklrucache.CacheHelper;
import com.uiui.appstore.gson.GsonUtils;
import com.uiui.appstore.manager.ConnectManager;
import com.uiui.appstore.manager.ConnectMode;
import com.uiui.appstore.network.api.AdminApp;
import com.uiui.appstore.network.api.AdminAppApi;
import com.uiui.appstore.network.api.AdminAppClassApi;
import com.uiui.appstore.network.api.BannerImage;
import com.uiui.appstore.network.api.ClassAppApi;
import com.uiui.appstore.network.api.DownloadApp;
import com.uiui.appstore.network.api.GetBanner;
import com.uiui.appstore.network.api.NewestAppUpdate;
import com.uiui.appstore.network.api.QueryAllApp;
import com.uiui.appstore.network.api.QueryPackageApp;
import com.uiui.appstore.network.api.SNInfo;
import com.uiui.appstore.network.api.SearchApp;
import com.uiui.appstore.network.api.SearchAdminAppApi;
import com.uiui.appstore.network.api.SearchAppApi;
import com.uiui.appstore.network.interceptor.RepeatRequestInterceptor;
import com.uiui.appstore.utils.JGYUtils;
import com.uiui.appstore.utils.Utils;
@@ -41,12 +36,8 @@ import java.util.Set;
import java.util.concurrent.TimeUnit;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.annotations.NonNull;
import io.reactivex.rxjava3.core.Observable;
import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.schedulers.Schedulers;
import io.reactivex.rxjava3.subjects.BehaviorSubject;
import okhttp3.Cache;
import okhttp3.OkHttpClient;
import retrofit2.Retrofit;
@@ -141,7 +132,7 @@ public class NetInterfaceManager {
}
public Observable<BaseResponse<List<AppInfo>>> getAdminAppObservable() {
return mRetrofit.create(AdminApp.class).getAdminApp()
return mRetrofit.create(AdminAppApi.class).getAdminApp()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread());
}
@@ -153,6 +144,13 @@ public class NetInterfaceManager {
.observeOn(AndroidSchedulers.mainThread());
}
public Observable<BaseResponse<List<AppInfo>>> getAdminAppByClassObservable(int id) {
return mRetrofit.create(ClassAppApi.class)
.getAdminAppByClass(id)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread());
}
public Observable<BaseResponse<List<AppClassBean>>> getAdminAppClassObservable() {
return mRetrofit.create(AdminAppClassApi.class)
.getAdminAppClassApi()
@@ -164,8 +162,12 @@ public class NetInterfaceManager {
return mRetrofit.create(SNInfo.class);
}
public SearchApp getSearchAppControl() {
return mRetrofit.create(SearchApp.class);
public SearchAppApi getSearchAppControl() {
return mRetrofit.create(SearchAppApi.class);
}
public SearchAdminAppApi getSearchAdminAppControl() {
return mRetrofit.create(SearchAdminAppApi.class);
}
public BannerImage getBannerImageControl() {

View File

@@ -9,8 +9,7 @@ import java.util.List;
import io.reactivex.rxjava3.core.Observable;
import retrofit2.http.GET;
public interface AdminApp {
public interface AdminAppApi {
@GET(UrlAddress.GET_ADMIN_APP)
Observable<BaseResponse<List<AppInfo>>> getAdminApp(
);
Observable<BaseResponse<List<AppInfo>>> getAdminApp();
}

View File

@@ -0,0 +1,18 @@
package com.uiui.appstore.network.api;
import com.uiui.appstore.bean.AppInfo;
import com.uiui.appstore.bean.BaseResponse;
import com.uiui.appstore.network.UrlAddress;
import java.util.List;
import io.reactivex.rxjava3.core.Observable;
import retrofit2.http.GET;
import retrofit2.http.Query;
public interface ClassAppApi {
@GET(UrlAddress.GET_ADMIN_APP)
Observable<BaseResponse<List<AppInfo>>> getAdminAppByClass(
@Query("class_id") int class_id
);
}

View File

@@ -0,0 +1,18 @@
package com.uiui.appstore.network.api;
import com.uiui.appstore.bean.AppInfo;
import com.uiui.appstore.bean.BaseResponse;
import com.uiui.appstore.network.UrlAddress;
import java.util.List;
import io.reactivex.rxjava3.core.Observable;
import retrofit2.http.GET;
import retrofit2.http.Query;
public interface SearchAdminAppApi {
@GET(UrlAddress.GET_ADMIN_APP)
Observable<BaseResponse<List<AppInfo>>> getAdminApp(
@Query("app_name") String app_name
);
}

View File

@@ -10,7 +10,7 @@ import io.reactivex.rxjava3.core.Observable;
import retrofit2.http.GET;
import retrofit2.http.Query;
public interface SearchApp {
public interface SearchAppApi {
@GET(UrlAddress.GET_ALL_APPINFO)
Observable<BaseResponse<List<AppInfo>>> getApp(
@Query("sn") String sn,

View File

@@ -40,7 +40,7 @@ public class RepeatRequestInterceptor implements Interceptor {
// Response copy = response.newBuilder().body(responseBody).build();
ResponseBody copy = ResponseBody.create(responseBody.contentType(), content);
if (BuildConfig.DEBUG) {
// Log.e(TAG, "请求体返回:| Response: " + request.url().encodedPath() + "\t body: " + content);
Log.e(TAG, "请求体返回:| Response: " + request.url() + "\t body: " + content);
}
//相同的请求
String requestKey = MD5Util.getUpperMD5Str(request.method() + request.url().toString() + requestBodyToString(request.body()));

View File

@@ -40,16 +40,18 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
@Override
public void onDisconnected() {
Log.e(TAG, "网络未连接");
ToastUtil.show("网络未连接");
// ToastUtil.show("网络未连接");
}
@Override
public void onConnected(NetworkUtils.NetworkType networkType) {
Log.e(TAG, "网络已连接");
ToastUtil.show("网络已连接");
HTTPInterface.checkUpdate(MainService.this);
HTTPInterface.checkUpdate(MainService.this, "com.uiui.sn");
mPresenter.getSnTag();
// ToastUtil.show("网络已连接");
if (JGYUtils.getInstance().isScreenOn()) {
HTTPInterface.checkUpdate(MainService.this);
HTTPInterface.checkUpdate(MainService.this, "com.uiui.sn");
mPresenter.getSnTag();
}
}
@NotNull

View File

@@ -760,5 +760,6 @@ public class ApkUtils {
this.add("com.uiui.os");
this.add("com.uiui.browser");
this.add("com.uiui.sn");
this.add("com.uiui.aios");
}};
}

View File

@@ -0,0 +1,26 @@
package com.uiui.appstore.utils;
import android.content.Context;
/**
* dp转px | px转dp
*/
public class DensityUtil {
/**
* 根据手机的分辨率从 dp(相对大小) 的单位 转成为 px(像素)
*/
public static int dpToPx(Context context, float dpValue) {
// 获取屏幕密度
final float scale = context.getResources().getDisplayMetrics().density;
// 结果+0.5是为了int取整时更接近
return (int) (dpValue * scale + 0.5f);
}
/**
* 根据手机的分辨率从 px(像素) 的单位 转成为 dp(相对大小)
*/
public static int pxToDp(Context context, float pxValue) {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (pxValue / scale + 0.5f);
}
}

View File

@@ -106,21 +106,21 @@ public class FileUtils {
double megaByte = kiloByte / 1024;
if (megaByte < 1) {
BigDecimal result1 = new BigDecimal(Double.toString(kiloByte));
return result1.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString() + "kb";
return result1.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString() + "KB";
}
double gigaByte = megaByte / 1024;
if (gigaByte < 1) {
BigDecimal result2 = new BigDecimal(Double.toString(megaByte));
return result2.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString() + "mb";
return result2.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString() + "MB";
}
double teraBytes = gigaByte / 1024;
if (teraBytes < 1) {
BigDecimal result3 = new BigDecimal(Double.toString(gigaByte));
return result3.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString() + "gb";
return result3.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString() + "GB";
}
BigDecimal result4 = new BigDecimal(teraBytes);
return result4.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString() + "tb";
return result4.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString() + "TB";
}
}

View File

@@ -400,4 +400,9 @@ public class JGYUtils {
}
}
public boolean isScreenOn() {
PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
//true为打开false为关闭
return powerManager.isInteractive();
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -3,7 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 内部颜色 -->
<solid
android:color="@color/default_color" />
android:color="@color/download_btn_color" />
<!-- 圆角的幅度 -->
<corners
android:topLeftRadius="30dp"

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 内部颜色 -->
<solid android:color="@color/white" />
<!-- <padding-->
<!-- android:bottom="@dimen/dp_16"-->
<!-- android:left="@dimen/dp_16"-->
<!-- android:right="@dimen/dp_16"-->
<!-- android:top="@dimen/dp_16" />-->
<!-- 圆角的幅度 -->
<corners
android:bottomLeftRadius="@dimen/dp_8"
android:bottomRightRadius="@dimen/dp_8"
android:topLeftRadius="@dimen/dp_8"
android:topRightRadius="@dimen/dp_8" />
</shape>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 内部颜色 -->
<solid android:color="@color/search" />
<!-- 圆角的幅度 -->
<corners
android:bottomLeftRadius="@dimen/dp_20"
android:topLeftRadius="@dimen/dp_20"
android:bottomRightRadius="@dimen/dp_20"
android:topRightRadius="@dimen/dp_20" />
</shape>

View File

@@ -9,7 +9,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="@dimen/activity_title_height"
android:layout_height="@dimen/dp_32"
android:background="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -35,7 +35,7 @@
android:gravity="center_horizontal"
android:text="关于"
android:textColor="@color/default_text_color"
android:textSize="@dimen/activity_font_size"
android:textSize="@dimen/sp_12"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

View File

@@ -6,7 +6,7 @@
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/linearLayout4"
android:id="@+id/cl"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_32"
android:orientation="horizontal"
@@ -35,7 +35,7 @@
android:singleLine="true"
android:text="应用详情"
android:textColor="@color/default_text_color"
android:textSize="@dimen/activity_font_size"
android:textSize="@dimen/sp_12"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@+id/search_iv_back" />
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -46,7 +46,7 @@
android:layout_weight="1"
android:overScrollMode="never"
app:layout_constraintBottom_toTopOf="@id/constraintLayout2"
app:layout_constraintTop_toBottomOf="@+id/linearLayout4">
app:layout_constraintTop_toBottomOf="@+id/cl">
<LinearLayout
android:layout_width="match_parent"
@@ -129,14 +129,19 @@
android:scrollbars="none"
android:visibility="visible">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/detail_rv_image"
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="15dp"
android:layout_marginBottom="15dp"
android:nestedScrollingEnabled="false"
android:overScrollMode="never" />
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/detail_rv_image"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="15dp"
android:layout_marginBottom="15dp"
android:nestedScrollingEnabled="false"
android:overScrollMode="never" />
</RelativeLayout>
</HorizontalScrollView>
<TextView

View File

@@ -1,26 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/activity_title_height"
android:layout_height="@dimen/dp_32"
android:background="@color/white"
android:orientation="horizontal">
<ImageView
android:id="@+id/search_iv_back"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/dp_8"
android:adjustViewBounds="true"
android:onClick="finish"
android:layout_marginStart="20dp"
android:scaleType="centerInside"
android:src="@drawable/ic_back" />
@@ -32,15 +30,14 @@
android:singleLine="true"
android:text="下载管理"
android:textColor="@color/default_text_color"
android:textSize="@dimen/activity_font_size"
android:textSize="@dimen/sp_12"
android:textStyle="bold" />
</LinearLayout>
<RelativeLayout
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="@color/white">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
@@ -48,9 +45,7 @@
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginRight="@dimen/dp_20"
tools:listitem="@layout/item_download_manager">
</androidx.recyclerview.widget.RecyclerView>
tools:listitem="@layout/item_download_manager" />
<ImageView
android:id="@+id/iv_notask"
@@ -60,10 +55,6 @@
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/icon_notask"
android:visibility="gone">
</ImageView>
android:visibility="gone" />
</RelativeLayout>
</LinearLayout>

View File

@@ -10,7 +10,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/activity_title_height"
android:layout_height="@dimen/dp_32"
android:background="@color/white"
android:orientation="horizontal">

View File

@@ -9,7 +9,7 @@
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="@dimen/activity_title_height"
android:layout_height="@dimen/dp_32"
android:background="@color/white"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
@@ -17,10 +17,10 @@
<ImageView
android:id="@+id/search_iv_back"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_gravity="center_vertical"
android:layout_marginStart="20dp"
android:layout_marginStart="@dimen/dp_8"
android:adjustViewBounds="true"
android:onClick="finish"
android:scaleType="centerInside"
@@ -34,9 +34,8 @@
android:singleLine="true"
android:text="本地管理"
android:textColor="@color/default_text_color"
android:textSize="17sp"
android:textSize="@dimen/sp_12"
android:textStyle="bold" />
</LinearLayout>

View File

@@ -14,7 +14,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_24"
android:background="@color/white"
android:layout_marginBottom="@dimen/dp_4"
android:orientation="horizontal">
<ImageView
@@ -65,7 +65,7 @@
android:gravity="center_vertical"
android:text="@string/search_edit"
android:textColor="#a7a5a5"
android:textSize="@dimen/sp_9" />
android:textSize="@dimen/sp_8" />
</LinearLayout>
</RelativeLayout>
@@ -84,6 +84,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/dp_20"
android:background="@color/white"
android:visibility="gone"
app:tl_indicator_style="TRIANGLE"
app:tl_tab_space_equal="true"
app:tl_textBold="SELECT"

View File

@@ -34,7 +34,7 @@
android:layout_weight="1"
android:visibility="visible">
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/search_ll"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_32"
@@ -42,30 +42,56 @@
android:gravity="center_vertical">
<ImageView
android:id="@+id/imageView4"
android:layout_width="@dimen/dp_10"
android:layout_height="@dimen/dp_20"
android:gravity="center_vertical"
android:src="@drawable/shap_search_left" />
android:src="@drawable/shap_search_left"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView6"
android:layout_width="@dimen/dp_10"
android:layout_height="@dimen/dp_20"
android:adjustViewBounds="true"
android:background="@color/search"
android:scaleType="centerInside"
android:src="@drawable/ic_menu_search" />
android:src="@drawable/ic_menu_search"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageView4"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/edit_search"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="@dimen/dp_20"
android:background="@drawable/shap_search_right"
android:background="@color/search"
android:gravity="center_vertical"
android:hint="@string/search_edit"
android:padding="@dimen/dp_2"
android:textColor="#a7a5a5"
android:textSize="@dimen/sp_9" />
</LinearLayout>
android:textColor="@color/black"
android:textSize="@dimen/sp_8"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/tv_search"
app:layout_constraintStart_toEndOf="@+id/imageView6"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_search"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_20"
android:text="搜索"
android:textSize="@dimen/sp_9"
android:gravity="center"
android:paddingEnd="@dimen/dp_8"
android:textColor="@color/default_color"
android:background="@drawable/shap_search_right"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>
</LinearLayout>

View File

@@ -8,11 +8,15 @@
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id="@+id/featured_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="@color/adapter_selector_default"
app:srlAccentColor="@color/colorAccent"
app:srlPrimaryColor="@color/colorPrimary">
<ScrollView
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:fillViewport="true">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl"
@@ -25,7 +29,7 @@
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:src="@drawable/port_banner"
android:src="@drawable/land_banner"
android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -45,19 +49,19 @@
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/banner_view">
<LinearLayout
android:id="@+id/rv_class"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_72"
android:layout_height="@dimen/dp_60"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_0"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
@@ -78,9 +82,8 @@
android:id="@+id/tv_0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:text="购物"
android:text="@string/class_shopping"
android:textColor="@color/black"
android:textSize="@dimen/sp_8"
app:layout_constraintEnd_toEndOf="parent"
@@ -89,6 +92,7 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
@@ -109,9 +113,8 @@
android:id="@+id/tv_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:text="热门"
android:text="@string/class_popular"
android:textColor="@color/black"
android:textSize="@dimen/sp_8"
app:layout_constraintEnd_toEndOf="parent"
@@ -120,6 +123,7 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_2"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
@@ -140,9 +144,8 @@
android:id="@+id/tv_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:text="养生"
android:text="@string/class_health"
android:textColor="@color/black"
android:textSize="@dimen/sp_8"
app:layout_constraintEnd_toEndOf="parent"
@@ -151,6 +154,7 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_3"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
@@ -171,9 +175,8 @@
android:id="@+id/tv_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:text="影音"
android:text="@string/class_video"
android:textColor="@color/black"
android:textSize="@dimen/sp_8"
app:layout_constraintEnd_toEndOf="parent"
@@ -182,6 +185,7 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_4"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
@@ -202,43 +206,180 @@
android:id="@+id/tv_4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:text="娱乐"
android:text="@string/class_entertainment"
android:textColor="@color/black"
android:textSize="@dimen/sp_8"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/iv_4" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_5"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<ImageView
android:id="@+id/iv_5"
android:layout_width="@dimen/dp_40"
android:layout_height="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_4"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/icon_5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:text="@string/class_manage"
android:textColor="@color/black"
android:textSize="@dimen/sp_8"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/iv_5" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/featured_rv_result"
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_exclusive"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:nestedScrollingEnabled="false"
android:overScrollMode="never"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rv_class" />
<ImageView
android:id="@+id/iv_nodata"
android:layout_width="300dp"
android:layout_height="300dp"
android:layout_centerInParent="true"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/app_nodata"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/card_background"
android:minHeight="@dimen/dp_100"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/rv_class">
<TextView
android:id="@+id/tv_exclusive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_8"
android:text="@string/exclusive_app"
android:textColor="@color/black"
android:textSize="@dimen/sp_11"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_exclusive_app"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_16"
android:text="@string/more_app"
android:textColor="@color/more_color"
android:textSize="@dimen/sp_9"
android:textStyle="bold"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/tv_exclusive"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_exclusive" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_exclusive"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_16"
android:nestedScrollingEnabled="false"
android:overScrollMode="never"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_exclusive" />
<ImageView
android:id="@+id/iv_exclusive_nodata"
android:layout_width="@dimen/dp_64"
android:layout_height="@dimen/dp_64"
android:layout_centerInParent="true"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/app_nodata"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_popular"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/card_background"
android:minHeight="@dimen/dp_100"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cl_exclusive">
<TextView
android:id="@+id/tv_popular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_8"
android:text="@string/popular_recommendation"
android:textColor="@color/black"
android:textSize="@dimen/sp_11"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_popular_app"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_16"
android:text="@string/more_app"
android:textColor="@color/more_color"
android:textSize="@dimen/sp_9"
android:textStyle="bold"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/tv_popular"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_popular" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_popular"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_16"
android:nestedScrollingEnabled="false"
android:overScrollMode="never"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_popular" />
<ImageView
android:id="@+id/iv_popular_nodata"
android:layout_width="@dimen/dp_64"
android:layout_height="@dimen/dp_64"
android:layout_centerInParent="true"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/app_nodata"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</androidx.core.widget.NestedScrollView>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</LinearLayout>

View File

@@ -95,7 +95,21 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.5" />
<TextView
android:id="@+id/manage_tv_taskNum"
android:layout_width="@dimen/dp_40"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:gravity="center_horizontal"
android:text=""
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/imageView2"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.5" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="center_vertical"

View File

@@ -1,14 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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_52"
android:background="@drawable/ll_selector"
android:clickable="true"
android:orientation="vertical">
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/dp_4"
android:layout_marginTop="@dimen/dp_2"
android:layout_marginEnd="@dimen/dp_4"
@@ -17,38 +18,47 @@
<ImageView
android:id="@+id/app_iv_icon"
android:layout_width="@dimen/dp_44"
android:layout_height="@dimen/dp_44"
android:layout_width="@dimen/dp_40"
android:layout_height="@dimen/dp_40"
android:layout_gravity="center_vertical"
android:layout_marginEnd="@dimen/dp_8"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@mipmap/ic_launcher" />
android:src="@mipmap/ic_launcher"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout3"
android:layout_width="0dp"
android:layout_height="@dimen/dp_48"
android:layout_height="0dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/dp_4"
android:layout_weight="1"
android:orientation="vertical">
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="@+id/app_iv_icon"
app:layout_constraintEnd_toStartOf="@+id/app_btn_download"
app:layout_constraintStart_toEndOf="@+id/app_iv_icon"
app:layout_constraintTop_toTopOf="@+id/app_iv_icon">
<TextView
android:id="@+id/app_tv_name"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.5"
android:layout_marginTop="@dimen/dp_2"
android:gravity="bottom"
android:singleLine="true"
android:text="今日头条"
android:textColor="@color/black"
android:textSize="@dimen/sp_12"
android:textStyle="bold" />
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/app_tv_company"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:singleLine="true"
android:text="北京字节跳动网络技术有限公司"
@@ -59,32 +69,46 @@
android:id="@+id/app_tv_size"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:singleLine="true"
android:text="1.00M"
android:textSize="12sp" />
android:textSize="12sp"
app:layout_constraintBottom_toTopOf="@id/app_rating_bar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/app_tv_name" />
<RatingBar
android:id="@+id/app_rating_bar"
style="@style/myRatingBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:isIndicator="true" />
</LinearLayout>
android:isIndicator="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View
android:id="@+id/line"
android:layout_width="0dp"
android:layout_height="1px"
android:background="@color/line_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/constraintLayout3" />
<Button
android:id="@+id/app_btn_download"
android:layout_width="@dimen/dp_36"
android:layout_height="@dimen/dp_20"
android:layout_height="@dimen/dp_18"
android:layout_gravity="center_vertical"
android:layout_marginEnd="@dimen/dp_8"
android:background="@drawable/btn_shap_download"
android:stateListAnimator="@null"
android:text="下载中"
android:textColor="#000000"
android:textSize="@dimen/sp_10"
android:visibility="visible" />
android:textSize="@dimen/sp_9"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/app_tv_installed"
@@ -94,5 +118,5 @@
android:layout_marginEnd="20dp"
android:text="已安装"
android:visibility="gone" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>

View File

@@ -38,7 +38,7 @@
android:layout_weight="1"
android:gravity="center_vertical"
android:text="APP"
android:textSize="@dimen/sp_16"
android:textSize="@dimen/sp_11"
android:textStyle="bold" />
<com.uiui.appstore.view.NumberProgressBar
@@ -47,8 +47,8 @@
android:layout_height="match_parent"
android:layout_weight="1"
app:progress_reached_bar_height="6dp"
app:progress_reached_color="@color/default_color"
app:progress_text_color="@color/default_color"
app:progress_reached_color="@color/download_btn_color"
app:progress_text_color="@color/download_btn_color"
app:progress_text_size="10sp"
app:progress_unreached_bar_height="0.75dp"
app:progress_unreached_color="#CCCCCC" />
@@ -88,7 +88,8 @@
android:layout_width="@dimen/dp_15"
android:layout_height="@dimen/dp_15"
android:layout_gravity="center"
android:layout_margin="@dimen/dp_20"
android:layout_marginStart="@dimen/dp_20"
android:layout_marginEnd="@dimen/dp_20"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/bt_delete" />

View File

@@ -9,7 +9,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="@dimen/activity_title_height"
android:layout_height="@dimen/dp_32"
android:background="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -35,7 +35,7 @@
android:gravity="center_horizontal"
android:text="关于"
android:textColor="@color/default_text_color"
android:textSize="@dimen/activity_font_size"
android:textSize="@dimen/sp_12"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

View File

@@ -6,7 +6,7 @@
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/linearLayout4"
android:id="@+id/cl"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_32"
android:orientation="horizontal"
@@ -35,7 +35,7 @@
android:singleLine="true"
android:text="应用详情"
android:textColor="@color/default_text_color"
android:textSize="@dimen/activity_font_size"
android:textSize="@dimen/sp_12"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@+id/search_iv_back" />
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -46,7 +46,7 @@
android:layout_weight="1"
android:overScrollMode="never"
app:layout_constraintBottom_toTopOf="@id/constraintLayout2"
app:layout_constraintTop_toBottomOf="@+id/linearLayout4">
app:layout_constraintTop_toBottomOf="@+id/cl">
<LinearLayout
android:layout_width="match_parent"
@@ -129,14 +129,19 @@
android:scrollbars="none"
android:visibility="visible">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/detail_rv_image"
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/dp_4"
android:layout_marginBottom="@dimen/dp_4"
android:nestedScrollingEnabled="false"
android:overScrollMode="never" />
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/detail_rv_image"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/dp_4"
android:layout_marginBottom="@dimen/dp_4"
android:nestedScrollingEnabled="false"
android:overScrollMode="never" />
</RelativeLayout>
</HorizontalScrollView>
<TextView
@@ -251,5 +256,4 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,26 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/activity_title_height"
android:layout_height="@dimen/dp_32"
android:background="@color/white"
android:orientation="horizontal">
<ImageView
android:id="@+id/search_iv_back"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/dp_8"
android:adjustViewBounds="true"
android:onClick="finish"
android:layout_marginStart="20dp"
android:scaleType="centerInside"
android:src="@drawable/ic_back" />
@@ -32,15 +30,14 @@
android:singleLine="true"
android:text="下载管理"
android:textColor="@color/default_text_color"
android:textSize="@dimen/activity_font_size"
android:textSize="@dimen/sp_12"
android:textStyle="bold" />
</LinearLayout>
<RelativeLayout
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="@color/white">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
@@ -48,9 +45,7 @@
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginRight="@dimen/dp_20"
tools:listitem="@layout/item_download_manager">
</androidx.recyclerview.widget.RecyclerView>
tools:listitem="@layout/item_download_manager" />
<ImageView
android:id="@+id/iv_notask"
@@ -60,10 +55,6 @@
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/icon_notask"
android:visibility="gone">
</ImageView>
android:visibility="gone" />
</RelativeLayout>
</LinearLayout>

View File

@@ -10,7 +10,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/activity_title_height"
android:layout_height="@dimen/dp_32"
android:background="@color/white"
android:orientation="horizontal">

View File

@@ -9,7 +9,7 @@
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="@dimen/activity_title_height"
android:layout_height="@dimen/dp_32"
android:background="@color/white"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
@@ -17,10 +17,10 @@
<ImageView
android:id="@+id/search_iv_back"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_gravity="center_vertical"
android:layout_marginStart="20dp"
android:layout_marginStart="@dimen/dp_8"
android:adjustViewBounds="true"
android:onClick="finish"
android:scaleType="centerInside"
@@ -34,7 +34,7 @@
android:singleLine="true"
android:text="本地管理"
android:textColor="@color/default_text_color"
android:textSize="17sp"
android:textSize="@dimen/sp_12"
android:textStyle="bold" />
</LinearLayout>

View File

@@ -14,7 +14,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_24"
android:background="@color/white"
android:layout_marginBottom="@dimen/dp_4"
android:orientation="horizontal">
<ImageView
@@ -65,7 +65,7 @@
android:gravity="center_vertical"
android:text="@string/search_edit"
android:textColor="#a7a5a5"
android:textSize="@dimen/sp_9" />
android:textSize="@dimen/sp_8" />
</LinearLayout>
</RelativeLayout>
@@ -84,6 +84,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/dp_20"
android:background="@color/white"
android:visibility="gone"
app:tl_indicator_style="TRIANGLE"
app:tl_tab_space_equal="true"
app:tl_textBold="SELECT"

View File

@@ -34,7 +34,7 @@
android:layout_weight="1"
android:visibility="visible">
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/search_ll"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_32"
@@ -42,30 +42,56 @@
android:gravity="center_vertical">
<ImageView
android:id="@+id/imageView4"
android:layout_width="@dimen/dp_10"
android:layout_height="@dimen/dp_20"
android:gravity="center_vertical"
android:src="@drawable/shap_search_left" />
android:src="@drawable/shap_search_left"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView6"
android:layout_width="@dimen/dp_10"
android:layout_height="@dimen/dp_20"
android:adjustViewBounds="true"
android:background="@color/search"
android:scaleType="centerInside"
android:src="@drawable/ic_menu_search" />
android:src="@drawable/ic_menu_search"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageView4"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/edit_search"
android:padding="@dimen/dp_2"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="@dimen/dp_20"
android:background="@drawable/shap_search_right"
android:background="@color/search"
android:gravity="center_vertical"
android:hint="@string/search_edit"
android:textColor="#a7a5a5"
android:textSize="@dimen/sp_9" />
</LinearLayout>
android:padding="@dimen/dp_2"
android:textColor="@color/black"
android:textSize="@dimen/sp_8"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/tv_search"
app:layout_constraintStart_toEndOf="@+id/imageView6"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_search"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_20"
android:text="搜索"
android:textSize="@dimen/sp_9"
android:gravity="center"
android:paddingEnd="@dimen/dp_8"
android:textColor="@color/default_color"
android:background="@drawable/shap_search_right"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>
</LinearLayout>

View File

@@ -8,11 +8,15 @@
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id="@+id/featured_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="@color/adapter_selector_default"
app:srlAccentColor="@color/colorAccent"
app:srlPrimaryColor="@color/colorPrimary">
<ScrollView
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:fillViewport="true">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl"
@@ -45,19 +49,19 @@
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/banner_view">
<LinearLayout
android:id="@+id/rv_class"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_72"
android:layout_height="@dimen/dp_60"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_0"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
@@ -78,9 +82,8 @@
android:id="@+id/tv_0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:text="购物"
android:text="@string/class_shopping"
android:textColor="@color/black"
android:textSize="@dimen/sp_8"
app:layout_constraintEnd_toEndOf="parent"
@@ -89,6 +92,7 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
@@ -109,9 +113,8 @@
android:id="@+id/tv_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:text="热门"
android:text="@string/class_popular"
android:textColor="@color/black"
android:textSize="@dimen/sp_8"
app:layout_constraintEnd_toEndOf="parent"
@@ -120,6 +123,7 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_2"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
@@ -140,9 +144,8 @@
android:id="@+id/tv_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:text="养生"
android:text="@string/class_health"
android:textColor="@color/black"
android:textSize="@dimen/sp_8"
app:layout_constraintEnd_toEndOf="parent"
@@ -151,6 +154,7 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_3"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
@@ -171,9 +175,8 @@
android:id="@+id/tv_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:text="影音"
android:text="@string/class_video"
android:textColor="@color/black"
android:textSize="@dimen/sp_8"
app:layout_constraintEnd_toEndOf="parent"
@@ -182,6 +185,7 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_4"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
@@ -202,43 +206,180 @@
android:id="@+id/tv_4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:text="娱乐"
android:text="@string/class_entertainment"
android:textColor="@color/black"
android:textSize="@dimen/sp_8"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/iv_4" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_5"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<ImageView
android:id="@+id/iv_5"
android:layout_width="@dimen/dp_40"
android:layout_height="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_4"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/icon_5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:text="@string/class_manage"
android:textColor="@color/black"
android:textSize="@dimen/sp_8"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/iv_5" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/featured_rv_result"
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_exclusive"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:nestedScrollingEnabled="false"
android:overScrollMode="never"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rv_class" />
<ImageView
android:id="@+id/iv_nodata"
android:layout_width="300dp"
android:layout_height="300dp"
android:layout_centerInParent="true"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/app_nodata"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/card_background"
android:minHeight="@dimen/dp_100"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/rv_class">
<TextView
android:id="@+id/tv_exclusive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_8"
android:text="@string/exclusive_app"
android:textColor="@color/black"
android:textSize="@dimen/sp_11"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_exclusive_app"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_16"
android:text="@string/more_app"
android:textColor="@color/more_color"
android:textSize="@dimen/sp_9"
android:textStyle="bold"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/tv_exclusive"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_exclusive" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_exclusive"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_16"
android:nestedScrollingEnabled="false"
android:overScrollMode="never"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_exclusive" />
<ImageView
android:id="@+id/iv_exclusive_nodata"
android:layout_width="@dimen/dp_64"
android:layout_height="@dimen/dp_64"
android:layout_centerInParent="true"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/app_nodata"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_popular"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/card_background"
android:minHeight="@dimen/dp_100"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cl_exclusive">
<TextView
android:id="@+id/tv_popular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_8"
android:text="@string/popular_recommendation"
android:textColor="@color/black"
android:textSize="@dimen/sp_11"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_popular_app"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_16"
android:text="@string/more_app"
android:textColor="@color/more_color"
android:textSize="@dimen/sp_9"
android:textStyle="bold"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/tv_popular"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_popular" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_popular"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_16"
android:nestedScrollingEnabled="false"
android:overScrollMode="never"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_popular" />
<ImageView
android:id="@+id/iv_popular_nodata"
android:layout_width="@dimen/dp_64"
android:layout_height="@dimen/dp_64"
android:layout_centerInParent="true"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/app_nodata"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</androidx.core.widget.NestedScrollView>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</LinearLayout>

View File

@@ -95,7 +95,21 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.5" />
<TextView
android:id="@+id/manage_tv_taskNum"
android:layout_width="@dimen/dp_40"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:gravity="center_horizontal"
android:text=""
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/imageView2"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.5" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="center_vertical"

View File

@@ -18,8 +18,8 @@
<ImageView
android:id="@+id/app_iv_icon"
android:layout_width="@dimen/dp_44"
android:layout_height="@dimen/dp_44"
android:layout_width="@dimen/dp_40"
android:layout_height="@dimen/dp_40"
android:layout_gravity="center_vertical"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
@@ -28,35 +28,37 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout3"
android:layout_width="0dp"
android:layout_height="@dimen/dp_48"
android:layout_height="0dp"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:layout_marginStart="@dimen/dp_4"
android:layout_weight="1"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toBottomOf="@+id/app_iv_icon"
app:layout_constraintEnd_toStartOf="@+id/app_btn_download"
app:layout_constraintStart_toEndOf="@+id/app_iv_icon"
app:layout_constraintTop_toTopOf="parent">
app:layout_constraintTop_toTopOf="@+id/app_iv_icon">
<TextView
android:id="@+id/app_tv_name"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
android:layout_marginTop="@dimen/dp_2"
android:gravity="bottom"
android:singleLine="true"
android:text="今日头条"
android:textColor="@color/black"
android:textSize="16sp"
android:textStyle="bold" />
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/app_tv_company"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:gravity="center_vertical"
android:singleLine="true"
android:text="北京字节跳动网络技术有限公司"
@@ -67,30 +69,43 @@
android:id="@+id/app_tv_size"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:gravity="center_vertical"
android:singleLine="true"
android:text="1.00M"
android:textSize="12sp" />
android:textSize="12sp"
app:layout_constraintBottom_toTopOf="@id/app_rating_bar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/app_tv_name" />
<RatingBar
android:id="@+id/app_rating_bar"
style="@style/myRatingBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:isIndicator="true" />
</LinearLayout>
android:isIndicator="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View
android:id="@+id/line"
android:layout_width="0dp"
android:layout_height="1px"
android:background="@color/line_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/constraintLayout3" />
<Button
android:id="@+id/app_btn_download"
android:layout_width="@dimen/dp_36"
android:layout_height="@dimen/dp_20"
android:layout_height="@dimen/dp_18"
android:layout_gravity="center_vertical"
android:background="@drawable/btn_shap_download"
android:stateListAnimator="@null"
android:text="下载中"
android:textColor="#000000"
android:textSize="@dimen/sp_10"
android:textSize="@dimen/sp_9"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

View File

@@ -28,7 +28,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/dp_8"
android:layout_weight="2"
android:layout_weight="3"
android:orientation="vertical">
<TextView
@@ -38,7 +38,7 @@
android:layout_weight="1"
android:gravity="center_vertical"
android:text="APP"
android:textSize="@dimen/sp_16"
android:textSize="@dimen/sp_11"
android:textStyle="bold" />
<com.uiui.appstore.view.NumberProgressBar
@@ -47,8 +47,8 @@
android:layout_height="match_parent"
android:layout_weight="1"
app:progress_reached_bar_height="6dp"
app:progress_reached_color="@color/default_color"
app:progress_text_color="@color/default_color"
app:progress_reached_color="@color/download_btn_color"
app:progress_text_color="@color/download_btn_color"
app:progress_text_size="10sp"
app:progress_unreached_bar_height="0.75dp"
app:progress_unreached_color="#CCCCCC" />
@@ -80,13 +80,14 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="4"
android:layout_weight="5"
android:orientation="horizontal">
<ImageView
android:id="@+id/remove"
android:layout_width="@dimen/dp_15"
android:layout_height="@dimen/dp_15"
android:layout_marginStart="@dimen/dp_10"
android:layout_gravity="center"
android:adjustViewBounds="true"
android:scaleType="centerInside"
@@ -96,6 +97,7 @@
android:id="@+id/start"
android:layout_width="@dimen/dp_45"
android:layout_height="@dimen/dp_20"
android:layout_marginStart="@dimen/dp_10"
android:layout_gravity="center"
android:background="@drawable/btn_shap_open"
android:text="暂停"

View File

@@ -0,0 +1,77 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.ClassAppActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_32"
android:background="@color/white"
android:orientation="horizontal"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/moreapp_iv_back"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/dp_8"
android:adjustViewBounds="true"
android:onClick="finish"
android:scaleType="centerInside"
android:src="@drawable/ic_back"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/moreapp_tv_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/dp_8"
android:gravity="center_vertical"
android:singleLine="true"
android:text="应用"
android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_12"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@+id/moreapp_iv_back" />
<ImageView
android:layout_width="@dimen/dp_12"
android:layout_height="@dimen/dp_12"
android:layout_marginEnd="@dimen/dp_8"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/ic_menu_search"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cl" />
<ImageView
android:id="@+id/iv_nodata"
android:layout_width="@dimen/dp_150"
android:layout_height="@dimen/dp_150"
android:layout_centerInParent="true"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/app_nodata"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,52 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.ManagerAppActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_32"
android:orientation="horizontal"
android:background="@color/white"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/search_iv_back"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/dp_8"
android:adjustViewBounds="true"
android:onClick="finish"
android:scaleType="centerInside"
android:src="@drawable/ic_back"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/detail_tv_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/dp_8"
android:gravity="center_vertical"
android:singleLine="true"
android:text="应用管理"
android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_12"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@+id/search_iv_back" />
</androidx.constraintlayout.widget.ConstraintLayout>
<fragment
android:id="@+id/fragment"
android:name="com.uiui.appstore.fragment.ManageFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cl" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,77 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.MoreAppActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_32"
android:background="@color/white"
android:orientation="horizontal"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/moreapp_iv_back"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/dp_8"
android:adjustViewBounds="true"
android:onClick="finish"
android:scaleType="centerInside"
android:src="@drawable/ic_back"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/moreapp_tv_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/dp_8"
android:gravity="center_vertical"
android:singleLine="true"
android:text="应用"
android:textColor="@color/default_text_color"
android:textSize="@dimen/sp_12"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@+id/moreapp_iv_back" />
<ImageView
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_8"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/ic_menu_search"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:background="@color/white"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cl" />
<ImageView
android:id="@+id/iv_nodata"
android:layout_width="@dimen/dp_150"
android:layout_height="@dimen/dp_150"
android:layout_centerInParent="true"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/app_nodata"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">113.7778sp</dimen>
<dimen name="sp_42">119.4667sp</dimen>
<dimen name="sp_48">136.5333sp</dimen>
<dimen name="activity_title_height">142.2222dp</dimen>
<dimen name="activity_font_size">45.5111sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">142.2222sp</dimen>
<dimen name="sp_42">149.3333sp</dimen>
<dimen name="sp_48">170.6667sp</dimen>
<dimen name="activity_title_height">177.7778dp</dimen>
<dimen name="activity_font_size">56.8889sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">151.6667sp</dimen>
<dimen name="sp_42">159.2500sp</dimen>
<dimen name="sp_48">182.0000sp</dimen>
<dimen name="activity_title_height">189.5833dp</dimen>
<dimen name="activity_font_size">60.6667sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">35.5556sp</dimen>
<dimen name="sp_42">37.3333sp</dimen>
<dimen name="sp_48">42.6667sp</dimen>
<dimen name="activity_title_height">44.4444dp</dimen>
<dimen name="activity_font_size">14.2222sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">40.0000sp</dimen>
<dimen name="sp_42">42.0000sp</dimen>
<dimen name="sp_48">48.0000sp</dimen>
<dimen name="activity_title_height">50.0000dp</dimen>
<dimen name="activity_font_size">16.0000sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">40.2516sp</dimen>
<dimen name="sp_42">42.2641sp</dimen>
<dimen name="sp_48">48.3019sp</dimen>
<dimen name="activity_title_height">50.3145dp</dimen>
<dimen name="activity_font_size">16.1006sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">42.6667sp</dimen>
<dimen name="sp_42">44.8000sp</dimen>
<dimen name="sp_48">51.2000sp</dimen>
<dimen name="activity_title_height">53.3333dp</dimen>
<dimen name="activity_font_size">17.0667sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">43.6364sp</dimen>
<dimen name="sp_42">45.8182sp</dimen>
<dimen name="sp_48">52.3636sp</dimen>
<dimen name="activity_title_height">54.5454dp</dimen>
<dimen name="activity_font_size">17.4545sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">44.4444sp</dimen>
<dimen name="sp_42">46.6667sp</dimen>
<dimen name="sp_48">53.3333sp</dimen>
<dimen name="activity_title_height">55.5556dp</dimen>
<dimen name="activity_font_size">17.7778sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">45.5556sp</dimen>
<dimen name="sp_42">47.8333sp</dimen>
<dimen name="sp_48">54.6667sp</dimen>
<dimen name="activity_title_height">56.9444dp</dimen>
<dimen name="activity_font_size">18.2222sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">45.7143sp</dimen>
<dimen name="sp_42">48.0000sp</dimen>
<dimen name="sp_48">54.8571sp</dimen>
<dimen name="activity_title_height">57.1428dp</dimen>
<dimen name="activity_font_size">18.2857sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">48.0000sp</dimen>
<dimen name="sp_42">50.4000sp</dimen>
<dimen name="sp_48">57.6000sp</dimen>
<dimen name="activity_title_height">60.0000dp</dimen>
<dimen name="activity_font_size">19.2000sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">50.1961sp</dimen>
<dimen name="sp_42">52.7059sp</dimen>
<dimen name="sp_48">60.2353sp</dimen>
<dimen name="activity_title_height">62.7451dp</dimen>
<dimen name="activity_font_size">20.0784sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">53.3333sp</dimen>
<dimen name="sp_42">56.0000sp</dimen>
<dimen name="sp_48">64.0000sp</dimen>
<dimen name="activity_title_height">66.6667dp</dimen>
<dimen name="activity_font_size">21.3333sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">59.2222sp</dimen>
<dimen name="sp_42">62.1833sp</dimen>
<dimen name="sp_48">71.0667sp</dimen>
<dimen name="activity_title_height">74.0278dp</dimen>
<dimen name="activity_font_size">23.6889sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">60.0000sp</dimen>
<dimen name="sp_42">63.0000sp</dimen>
<dimen name="sp_48">72.0000sp</dimen>
<dimen name="activity_title_height">75.0000dp</dimen>
<dimen name="activity_font_size">24.0000sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">65.7778sp</dimen>
<dimen name="sp_42">69.0667sp</dimen>
<dimen name="sp_48">78.9333sp</dimen>
<dimen name="activity_title_height">82.2222dp</dimen>
<dimen name="activity_font_size">26.3111sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">66.6667sp</dimen>
<dimen name="sp_42">70.0000sp</dimen>
<dimen name="sp_48">80.0000sp</dimen>
<dimen name="activity_title_height">83.3333dp</dimen>
<dimen name="activity_font_size">26.6667sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">71.1111sp</dimen>
<dimen name="sp_42">74.6667sp</dimen>
<dimen name="sp_48">85.3333sp</dimen>
<dimen name="activity_title_height">88.8889dp</dimen>
<dimen name="activity_font_size">28.4444sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">73.5556sp</dimen>
<dimen name="sp_42">77.2333sp</dimen>
<dimen name="sp_48">88.2667sp</dimen>
<dimen name="activity_title_height">91.9444dp</dimen>
<dimen name="activity_font_size">29.4222sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">80.0000sp</dimen>
<dimen name="sp_42">84.0000sp</dimen>
<dimen name="sp_48">96.0000sp</dimen>
<dimen name="activity_title_height">100.0000dp</dimen>
<dimen name="activity_font_size">32.0000sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">85.3333sp</dimen>
<dimen name="sp_42">89.6000sp</dimen>
<dimen name="sp_48">102.4000sp</dimen>
<dimen name="activity_title_height">106.6667dp</dimen>
<dimen name="activity_font_size">34.1333sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">88.8889sp</dimen>
<dimen name="sp_42">93.3333sp</dimen>
<dimen name="sp_48">106.6667sp</dimen>
<dimen name="activity_title_height">111.1111dp</dimen>
<dimen name="activity_font_size">35.5556sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">90.1111sp</dimen>
<dimen name="sp_42">94.6167sp</dimen>
<dimen name="sp_48">108.1333sp</dimen>
<dimen name="activity_title_height">112.6389dp</dimen>
<dimen name="activity_font_size">36.0444sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">91.1111sp</dimen>
<dimen name="sp_42">95.6667sp</dimen>
<dimen name="sp_48">109.3333sp</dimen>
<dimen name="activity_title_height">113.8889dp</dimen>
<dimen name="activity_font_size">36.4444sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">106.6667sp</dimen>
<dimen name="sp_42">112.0000sp</dimen>
<dimen name="sp_48">128.0000sp</dimen>
<dimen name="activity_title_height">133.3333dp</dimen>
<dimen name="activity_font_size">42.6667sp</dimen>
</resources>

View File

@@ -416,6 +416,4 @@
<dimen name="sp_40">106.7778sp</dimen>
<dimen name="sp_42">112.1167sp</dimen>
<dimen name="sp_48">128.1333sp</dimen>
<dimen name="activity_title_height">133.4722dp</dimen>
<dimen name="activity_font_size">42.7111sp</dimen>
</resources>

View File

@@ -1,23 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#FFFFFF</color>
<color name="colorPrimaryDark">#FFFFFF</color>
<color name="colorAccent">#FFFFFF</color>
<color name="colorPrimary">#efefef</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#4880ff</color>
<!-- <color name="colorPrimary">#008577</color>-->
<!-- <color name="colorPrimaryDark">#00574B</color>-->
<!-- <color name="colorAccent">#D81B60</color>-->
<color name="white">#FFFFFF</color>
<color name="black">#000000</color>
<color name="gray">#f5f4f4</color>
<color name="more_color">#898989</color>
<color name="line_color">#cccccc</color>
<color name="install">#b6b6b6</color>
<color name="default_text_color">#333333</color>
<color name="default_color">#4880ff</color>
<color name="download_btn_color">#05d192</color>
<color name="download">#ffffff</color>
<color name="backgroundcolor">#ffffff</color>
<color name="search">#F1F1F1</color>
<color name="search">#FFFFFF</color>
<color name="red">#d64743</color>
<color name="blue">#00a0e9</color>
<color name="adapter_selector_default">#f0f0f0</color>
<color name="adapter_selector_default">#e8e7e7</color>
<color name="activation_color">#4880ff</color>
</resources>

View File

@@ -424,8 +424,4 @@
<dimen name="sp_42">42sp</dimen>
<dimen name="sp_48">48sp</dimen>
<!--activity-->
<dimen name="activity_title_height">50dp</dimen>
<dimen name="activity_font_size">16sp</dimen>
</resources>

View File

@@ -7,4 +7,15 @@
<string name="no_app">该设备暂时无白名单应用以供安装,请使用家长绑定账号推荐相关应用至平板应用市场!</string>
<string name="privacy_policy"><u>隐私政策</u></string>
<string name="user_agreement"><u>用户协议</u></string>
<string name="exclusive_app">专属应用</string>
<string name="popular_recommendation">热门推荐</string>
<string name="more_app">更多…</string>
<string name="class_shopping">购物</string>
<string name="class_popular">热门</string>
<string name="class_health">养生</string>
<string name="class_video">影音</string>
<string name="class_entertainment">娱乐</string>
<string name="class_manage">管理</string>
</resources>