version:1.6.1
fix:休息日管控完善 add:
@@ -19,7 +19,6 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
|
||||
implementation 'androidx.appcompat:appcompat:1.3.1'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
def appName() {
|
||||
@@ -7,7 +6,7 @@ def appName() {
|
||||
}
|
||||
|
||||
def releaseTime() {
|
||||
return new Date().format("yyyyMMddHHmmss", TimeZone.getDefault())
|
||||
return new Date().format("yyyyMMdd", TimeZone.getDefault())
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -15,10 +14,10 @@ android {
|
||||
buildToolsVersion "29.0.3"
|
||||
defaultConfig {
|
||||
applicationId "com.appstore.uiui"
|
||||
minSdkVersion 24
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 29
|
||||
versionCode 35
|
||||
versionName "1.3.5"
|
||||
versionCode 61
|
||||
versionName "1.6.1"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
//极光
|
||||
ndk {
|
||||
@@ -33,9 +32,16 @@ android {
|
||||
JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可.
|
||||
]
|
||||
}
|
||||
|
||||
compileOptions{
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
checkReleaseBuilds false
|
||||
}
|
||||
|
||||
//签名
|
||||
signingConfigs {
|
||||
zhanRui {
|
||||
@@ -51,14 +57,16 @@ android {
|
||||
storePassword "123456"
|
||||
keyAlias "xueshibaoos"
|
||||
keyPassword "123456"
|
||||
v2SigningEnabled false
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled true
|
||||
}
|
||||
release {// 签名文件
|
||||
storeFile file("src/keys/xueshibaoos.jks")
|
||||
storePassword "123456"
|
||||
keyAlias "xueshibaoos"
|
||||
keyPassword "123456"
|
||||
v2SigningEnabled false
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,14 +126,14 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.3.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
||||
implementation "androidx.core:core-ktx:+"
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
implementation "androidx.core:core-ktx:1.6.0"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
|
||||
//github第三方控件
|
||||
@@ -134,11 +142,11 @@ dependencies {
|
||||
implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0' //1.0.5及以前版本的老用户升级需谨慎,API改动过大
|
||||
implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.1.0' //没有使用特殊Header,可以不加这行
|
||||
//glide
|
||||
implementation 'com.github.bumptech.glide:glide:4.10.0'
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.10.0'
|
||||
implementation 'com.github.bumptech.glide:glide:4.11.0'
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
|
||||
//aria
|
||||
implementation 'com.arialyy.aria:core:3.8.5'
|
||||
annotationProcessor 'com.arialyy.aria:compiler:3.8.5'
|
||||
implementation 'com.arialyy.aria:core:3.8.15'
|
||||
annotationProcessor 'com.arialyy.aria:compiler:3.8.15'
|
||||
//动态权限框架
|
||||
implementation 'com.hjq:xxpermissions:6.0'
|
||||
//okhttp
|
||||
@@ -150,17 +158,15 @@ dependencies {
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
|
||||
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
|
||||
//google
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
implementation 'com.google.code.gson:gson:2.8.7'
|
||||
implementation 'com.google.zxing:core:3.3.0'
|
||||
implementation 'com.alibaba:fastjson:1.2.21'
|
||||
implementation 'com.alibaba:fastjson:1.2.76'
|
||||
//极光推送
|
||||
implementation 'cn.jiguang.sdk:jpush:3.4.1' // 此处以JPush 3.4.1 版本为例。
|
||||
implementation 'cn.jiguang.sdk:jcore:2.2.4' // 此处以JCore 2.2.4 版本为例。
|
||||
implementation 'cn.jiguang.sdk:jpush:3.8.6' // 此处以JPush 3.4.1 版本为例。
|
||||
implementation 'cn.jiguang.sdk:jcore:2.6.0' // 此处以JCore 2.2.4 版本为例。
|
||||
//banner图
|
||||
implementation 'com.zhpan.library:bannerview:2.6.4'
|
||||
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
|
||||
//更换字体框架
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
implementation 'com.blankj:utilcodex:1.30.6'
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ public class LocalManagerActivity extends BaseActivity implements RefreshManager
|
||||
bean.setPackageName(packageName);
|
||||
Drawable icon = resolveInfoList.get(i).loadIcon(getApplicationContext().getPackageManager());
|
||||
bean.setIcon(icon);
|
||||
if (qch_force_app.contains(packageName)){
|
||||
if (packageName.contains(qch_force_app)){
|
||||
bean.setCanUnintall(false);
|
||||
}else {
|
||||
bean.setCanUnintall(true);
|
||||
|
||||
@@ -84,7 +84,7 @@ public class MainActivity extends BaseActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
Log.e(TAG, "onCreate");
|
||||
requestPermission();
|
||||
// requestPermission();
|
||||
registerMessageReceiver(); // used for receive msg
|
||||
String rid = JPushInterface.getRegistrationID(getApplicationContext());
|
||||
if (!rid.isEmpty()) {
|
||||
@@ -136,7 +136,7 @@ public class MainActivity extends BaseActivity {
|
||||
iv_appicon.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
startActivity(new Intent(MainActivity.this, AboutActivity.class));
|
||||
// startActivity(new Intent(MainActivity.this, AboutActivity.class));
|
||||
}
|
||||
});
|
||||
iv_download = findViewById(R.id.iv_download);
|
||||
@@ -418,7 +418,9 @@ public class MainActivity extends BaseActivity {
|
||||
SPUtils.put(MainActivity.this, "isLogined", 1);
|
||||
SPUtils.put(MainActivity.this, "admin_id", info.getAdmin_id());
|
||||
SPUtils.put(MainActivity.this, "sn_id", info.getId());
|
||||
SPUtils.put(MainActivity.this, "sn_grade", info.getGrade());
|
||||
if (!TextUtils.isEmpty(info.getGrade())) {
|
||||
SPUtils.put(MainActivity.this, "sn_grade", info.getGrade());
|
||||
}
|
||||
} else if (code == -200) {
|
||||
SPUtils.put(MainActivity.this, "isLogined", 0);
|
||||
} else if (code == -250) {
|
||||
|
||||
@@ -7,6 +7,15 @@ public class Banner implements Serializable {
|
||||
|
||||
private String banner_name;
|
||||
private String banner_img;
|
||||
private String vertical_img;
|
||||
|
||||
public String getVertical_img() {
|
||||
return vertical_img;
|
||||
}
|
||||
|
||||
public void setVertical_img(String vertical_img) {
|
||||
this.vertical_img = vertical_img;
|
||||
}
|
||||
|
||||
public String getBanner_name() {
|
||||
return banner_name;
|
||||
|
||||
@@ -4,82 +4,5 @@ package com.appstore.uiui.common;
|
||||
import com.appstore.uiui.BuildConfig;
|
||||
|
||||
public class CommonDatas {
|
||||
|
||||
public static final String PACKAGE = "colorflykids";
|
||||
public static String BABYINFO_CHANGE = PACKAGE + "babyinfo_change"; // 宝宝信息变更标识
|
||||
|
||||
|
||||
|
||||
public final static String SP_LOCK = "lock";//锁定用户
|
||||
public final static String SP_BABY_AGE_KEY = "age_system";//子系统选择
|
||||
public final static String SP_LOCK__KEY = "lock_key";//主界面选择
|
||||
|
||||
public final static String SP_USER_NAME = "user_name";//用户名字
|
||||
public final static String SP_USER_PASSWORD = "user_password";//用户密码
|
||||
public final static String SP_USER_EMAIL = "user_email";//用户信箱
|
||||
public final static String SP_VERSION = "user_version";//版本信息
|
||||
public final static String SP_USER_VIP = "user_vip";//用户等级
|
||||
public final static String SP_USER_DATE = "user_vip_date";//体验用户使用时间段
|
||||
public final static String SP_USER_ALIVE_DATE = "SP_USER_ALIVE_DATE";//用户激活时的时间
|
||||
public final static String SP_USER_ALIVE_CODE = "SP_USER_ALIVE_CODE";//用户激活码
|
||||
|
||||
|
||||
public final static String SP_BABY_HEAD = "age_head";//宝宝头像
|
||||
public final static String SP_BABY_NAME = "age_name";//宝宝名字
|
||||
public final static String SP_BABY_SEX = "age_sex";//宝宝性别
|
||||
public final static String SP_BABY_BIRTHDAY = "age_birthday";//宝宝生日
|
||||
|
||||
public final static String SP_BABY_TITLE = "user_title";//宝宝称谓
|
||||
public final static String SP_TOTAL_POINT = "total_point";//总积分
|
||||
public final static String SP_TODAY_POINT = "today_point";//今日积分
|
||||
public final static String SP_NATIONAL_RANK = "national_rank";//全国排名
|
||||
public final static String SP_YESTERDAY_RANK = "yesterday_rank";//历史排名
|
||||
public final static String SP_TODAY_RANK = "today_rank";//今日排名
|
||||
|
||||
|
||||
public final static String SP_PARENT_PASSWORD = "parent_password";//家长密码
|
||||
public final static String SP_OLD_PARENT_PASSWORD = "old_parent_password";//旧的家长密码
|
||||
public final static String SP_CHANGE_PARENT_PASSWORD = "change_parent_password";//上传家长密码标识
|
||||
public final static String SP_CHANGE_BABY_INFO = "change_baby_info";//上传宝宝信息标识
|
||||
public final static String SP_CHANGE_LEARN_INFO = "change_learn_info";//上传学习日志标识
|
||||
|
||||
|
||||
public final static String SP_TIME_CONTROL_NOW = "time_control_now";//时间控制功能临时开关
|
||||
public final static String SP_TIME_CONTROL_KEY = "time_control";//时间控制功能开关
|
||||
public final static String SP_TIME_CURRENT_REMAINING = "current_remaining_time";//当前剩余时间
|
||||
public final static String SP_TIME_REST_REMAINING = "current_rest_time";//当前剩余休息时间
|
||||
public final static String SP_BATTEY_CONTROL_KEY = "battey_control";//充电保护开关
|
||||
public final static String SP_PASSWORD_LOCK = "password_lock";//家长密码开关
|
||||
public final static String SP_DISTANCE_CONTROL_KEY = "distance_control";//距离感应开关
|
||||
|
||||
// 使用时间段
|
||||
public final static String SP_SELECT_START_TIME = "start_time";
|
||||
public final static String SP_SELECT_END_TIME = "end_time";
|
||||
public final static String SP_OLD_START_TIME = "old_start_time";
|
||||
public final static String SP_OLD_END_TIME = "old_end_time";
|
||||
|
||||
|
||||
public final static String SP_SELECT_USE_TIME = "useTimeLong";//使用时长
|
||||
public final static String SP_SELECT_REST_TIME = "restTimeLong";//休息时长
|
||||
|
||||
//eventbus 事件
|
||||
public final static String SP_LOGIN_SUCCESS = "SP_LOGIN_SUCCESS";//账号登陆成功
|
||||
|
||||
public final static String ENTER_KEY = "enter_key";
|
||||
|
||||
public final static String UPDATE_URL = "http://www.jiaoguanyi.cn/api/update/index";
|
||||
public final static String UPDATE_PKG = BuildConfig.APPLICATION_ID;
|
||||
|
||||
|
||||
public static boolean IS_UPDATE_DOLOADING = false;
|
||||
public static String IS_RESET = "IS_RESET";
|
||||
public static int MIN_POWER = 21;
|
||||
public static String FORCE_INSTALL = "FORCE_INSTALL";
|
||||
|
||||
public static final String ACTION_HrReceiver_JGY_DIS = "qch_jgy_network_disallow";
|
||||
public static final String ACTION_HrReceiver_JGY = "qch_jgy_network_allow";
|
||||
public static final String FLAG_FIRST_ENTER = "qch_first_enter";
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
@@ -32,6 +34,7 @@ import com.appstore.uiui.network.api.BannerImage;
|
||||
import com.appstore.uiui.network.api.QueryAllApp;
|
||||
import com.appstore.uiui.utils.LogUtils;
|
||||
import com.appstore.uiui.utils.Utils;
|
||||
import com.blankj.utilcode.util.ScreenUtils;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
@@ -134,6 +137,21 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(@androidx.annotation.NonNull Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 3);
|
||||
mRvResult.setLayoutManager(gridLayoutManager);
|
||||
} else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 2);
|
||||
mRvResult.setLayoutManager(gridLayoutManager);
|
||||
} else {
|
||||
mRvResult.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
}
|
||||
initAPPData(handler);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
@@ -202,6 +220,11 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
|
||||
}
|
||||
|
||||
private void getBanner() {
|
||||
if (ScreenUtils.isPortrait()) {
|
||||
iv_banner.setImageDrawable(getActivity().getDrawable(R.drawable.port_banner));
|
||||
} else {
|
||||
iv_banner.setImageDrawable(getActivity().getDrawable(R.drawable.land_banner));
|
||||
}
|
||||
NetInterfaceManager.getInstance().getBannerObservable()
|
||||
.subscribe(new Observer<BaseResponse<Banner>>() {
|
||||
@Override
|
||||
@@ -211,10 +234,14 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
|
||||
|
||||
@Override
|
||||
public void onNext(BaseResponse<Banner> bannerBaseResponse) {
|
||||
Log.e("getBanner", "onNext: ");
|
||||
if (bannerBaseResponse.code == 200) {
|
||||
String imgURL = bannerBaseResponse.data.getBanner_img();
|
||||
Glide.with(iv_banner).load(imgURL).into(iv_banner);
|
||||
String banner_img = bannerBaseResponse.data.getBanner_img();
|
||||
String vertical_img = bannerBaseResponse.data.getVertical_img();
|
||||
if (ScreenUtils.isPortrait()) {
|
||||
Glide.with(iv_banner).load(banner_img).into(iv_banner);
|
||||
} else {
|
||||
Glide.with(iv_banner).load(vertical_img).into(iv_banner);
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
@@ -232,6 +259,25 @@ public class FeaturedFragment extends LazyLoadFragment implements RefreshManager
|
||||
|
||||
}
|
||||
});
|
||||
int bannerWidth = iv_banner.getWidth();
|
||||
int bannerHeight = iv_banner.getHeight();
|
||||
Drawable drawable = iv_banner.getDrawable();
|
||||
if (drawable != null) {
|
||||
int width = drawable.getMinimumWidth();
|
||||
int height = drawable.getMinimumHeight();
|
||||
Log.e(TAG, "getBanner: iv_banner: width = " + bannerWidth);
|
||||
Log.e(TAG, "getBanner: iv_banner: height = " + bannerHeight);
|
||||
Log.e(TAG, "getBanner: Drawable: width = " + width);
|
||||
Log.e(TAG, "getBanner: Drawable: height = " + height);
|
||||
Log.e(TAG, "getBanner: " + (float) (1.0 *bannerWidth / width));
|
||||
Log.e(TAG, "getBanner: " +(int) ((float) (1.0 *bannerWidth / width) * height));
|
||||
int changeHeight = (int) ((double) (bannerWidth / width) * height);
|
||||
if (changeHeight != 0) {
|
||||
iv_banner.getLayoutParams().height = changeHeight;
|
||||
}
|
||||
iv_banner.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.appstore.uiui.BuildConfig;
|
||||
import com.appstore.uiui.R;
|
||||
import com.appstore.uiui.activity.DownloadManagerActivity;
|
||||
import com.appstore.uiui.activity.LocalManagerActivity;
|
||||
@@ -44,7 +45,7 @@ public class ManageFragment extends LazyLoadFragment {
|
||||
|
||||
private RecyclerView mRvLocal;
|
||||
private ImageView iv_nodata;
|
||||
private TextView manage_tv_updateNum, manage_tv_appNum;
|
||||
private TextView manage_tv_updateNum, manage_tv_appNum, tv_version;
|
||||
private List<LocalApp> localAppList;
|
||||
private List<UpdateAppInfo> updateAppInfoList;
|
||||
private List<AppInfo> applist;
|
||||
@@ -62,6 +63,8 @@ public class ManageFragment extends LazyLoadFragment {
|
||||
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);
|
||||
tv_version.setText("版本 " + BuildConfig.VERSION_NAME);
|
||||
manage_cl_localapp = view.findViewById(R.id.manage_cl_localapp);
|
||||
manage_cl_localapp.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
||||
|
Before Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.0 KiB |
BIN
app/src/main/res/drawable-xhdpi/land_banner.png
Normal file
|
After Width: | Height: | Size: 155 KiB |
BIN
app/src/main/res/drawable-xhdpi/port_banner.png
Normal file
|
After Width: | Height: | Size: 150 KiB |
@@ -3,7 +3,7 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 内部颜色 -->
|
||||
<solid
|
||||
android:color="@color/red" />
|
||||
android:color="@color/adapter_selector_default" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners
|
||||
android:topLeftRadius="30dp"
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
android:layout_marginLeft="20dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/ic_place_holder"
|
||||
android:scaleType="centerInside" />
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="gone" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/search_layout"
|
||||
@@ -60,7 +61,7 @@
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@color/search"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_search" />
|
||||
android:src="@drawable/ic_menu_search" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
android:id="@+id/linearLayout3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/activity_title_height"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
@@ -25,31 +24,54 @@
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/ic_back" />
|
||||
|
||||
<androidx.appcompat.widget.SearchView
|
||||
android:id="@+id/search"
|
||||
<LinearLayout
|
||||
android:id="@+id/search_ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
android:textColor="@color/default_text_color"
|
||||
app:iconifiedByDefault="false"
|
||||
app:queryHint="@string/search_edit"
|
||||
app:searchIcon="@drawable/ic_menu_search">
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:gravity="center_vertical"
|
||||
android:src="@drawable/shap_search_left" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@color/search"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/ic_menu_search" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit_search"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:background="@drawable/shap_search_right"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="@string/search_edit"
|
||||
android:imeOptions="actionSearch"
|
||||
android:inputType="text"
|
||||
android:textColor="#a7a5a5">
|
||||
|
||||
</EditText>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.appcompat.widget.SearchView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout3"
|
||||
tools:listitem="@layout/item_app" />
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout3"
|
||||
tools:listitem="@layout/item_app" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -24,8 +24,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_230"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/banner"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/land_banner"
|
||||
android:layout_margin="10dp"
|
||||
android:visibility="visible" />
|
||||
|
||||
|
||||
@@ -30,14 +30,15 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_my"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_my_task"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/manage_tv_appNum"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
@@ -50,6 +51,7 @@
|
||||
app:layout_constraintEnd_toStartOf="@+id/imageView1"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.5" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView1"
|
||||
android:layout_width="20dp"
|
||||
@@ -71,8 +73,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_download"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_download_task"
|
||||
@@ -115,8 +117,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_update"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_update_task"
|
||||
@@ -164,16 +166,18 @@
|
||||
|
||||
<include layout="@layout/include_line_horizontal" />
|
||||
|
||||
<RelativeLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/manage_rv_local"
|
||||
android:overScrollMode="never"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@color/white"
|
||||
android:layout_height="match_parent" />
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_version"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_nodata"
|
||||
@@ -183,10 +187,18 @@
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_nodata"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone" />
|
||||
|
||||
</ImageView>
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:id="@+id/tv_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -58,27 +58,48 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/local_app_btn_delete"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@drawable/btn_shap_download"
|
||||
android:stateListAnimator="@null"
|
||||
android:text="删除"
|
||||
android:textColor="@color/default_text_color"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/local_app_update"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="@dimen/dp_64"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginRight="20dp"
|
||||
android:text="已安装"
|
||||
android:visibility="gone" />
|
||||
android:orientation="vertical">
|
||||
|
||||
<Button
|
||||
android:id="@+id/local_app_btn_open"
|
||||
android:layout_width="@dimen/dp_64"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@drawable/btn_shap_open"
|
||||
android:stateListAnimator="@null"
|
||||
android:text="打开"
|
||||
android:textColor="@color/white"
|
||||
android:visibility="visible" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/local_app_btn_delete"
|
||||
android:layout_width="@dimen/dp_64"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginRight="8dp"
|
||||
android:background="@drawable/btn_shap_delete"
|
||||
android:stateListAnimator="@null"
|
||||
android:text="删除"
|
||||
android:textColor="@color/black"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/local_app_update"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginRight="24dp"
|
||||
android:text="已安装"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/ic_place_holder"
|
||||
android:scaleType="centerInside" />
|
||||
|
||||
@@ -60,7 +61,7 @@
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@color/search"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_search" />
|
||||
android:src="@drawable/ic_menu_search" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@color/search"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_search" />
|
||||
android:src="@drawable/ic_menu_search" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit_search"
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_230"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/banner"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/port_banner"
|
||||
android:layout_margin="10dp"
|
||||
android:visibility="visible" />
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_my"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_my_task"
|
||||
@@ -73,8 +73,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_download"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_download_task"
|
||||
@@ -117,8 +117,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_update"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_update_task"
|
||||
@@ -166,16 +166,18 @@
|
||||
|
||||
<include layout="@layout/include_line_horizontal" />
|
||||
|
||||
<RelativeLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/manage_rv_local"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@color/white"
|
||||
android:overScrollMode="never" />
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_version"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_nodata"
|
||||
@@ -185,10 +187,18 @@
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_nodata"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone" />
|
||||
|
||||
</ImageView>
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:id="@+id/tv_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -86,7 +86,7 @@
|
||||
android:background="@drawable/btn_shap_delete"
|
||||
android:stateListAnimator="@null"
|
||||
android:text="删除"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/black"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
<color name="search">#F1F1F1</color>
|
||||
<color name="red">#d64743</color>
|
||||
<color name="blue">#00a0e9</color>
|
||||
<color name="adapter_selector_default">#d8d8d8</color>
|
||||
<color name="adapter_selector_default">#f0f0f0</color>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<string name="app_name">应用市场</string>
|
||||
<string name="download_btn_had">打开</string>
|
||||
<string name="open_app_fail">打开失败!</string>
|
||||
<string name="search_edit">请输入应用名称或关键字</string>
|
||||
<string name="search_edit">\t请输入应用名称或关键字</string>
|
||||
|
||||
</resources>
|
||||
|
||||
14
build.gradle
@@ -1,14 +1,15 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.3.61'
|
||||
ext.kotlin_version = '1.4.32'
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
|
||||
mavenCentral()
|
||||
maven { url "https://jitpack.io" }
|
||||
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.2'
|
||||
classpath 'com.android.tools.build:gradle:3.6.4'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
@@ -19,8 +20,9 @@ buildscript {
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
|
||||
mavenCentral()
|
||||
maven { url "https://jitpack.io" }
|
||||
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
#Wed Nov 20 09:44:22 CST 2019
|
||||
#Wed Aug 11 10:47:49 CST 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
|
||||
|
||||