version:1.9
fix:修复删除和安装apk时不更新图标 update:更换图标
@@ -15,8 +15,8 @@ android {
|
||||
applicationId "com.uiui.os"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 29
|
||||
versionCode 8
|
||||
versionName "1.7"
|
||||
versionCode 10
|
||||
versionName "1.9"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
@@ -157,7 +157,7 @@ dependencies {
|
||||
// implementation 'io.reactivex.rxjava2:rxjava:2.2.12'
|
||||
// implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
||||
//
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
|
||||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||
// implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
|
||||
|
||||
@@ -35,10 +35,33 @@
|
||||
android:restoreAnyVersion="true"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".activity.main.MainActivity"
|
||||
android:clearTaskOnLaunch="true"
|
||||
android:enabled="true"
|
||||
android:excludeFromRecents="true"
|
||||
android:launchMode="singleTask"
|
||||
android:resizeableActivity="true"
|
||||
android:resumeWhilePausing="true"
|
||||
android:screenOrientation="sensorLandscape"
|
||||
android:stateNotNeeded="true"
|
||||
android:taskAffinity="com.example.taskaffinity.newtask"
|
||||
android:windowSoftInputMode="adjustPan">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.HOME" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.MONKEY" />
|
||||
<category android:name="android.intent.category.LAUNCHER_APP" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.CodeActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:launchMode="singleTask" />
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="sensorPortrait" />
|
||||
<activity
|
||||
android:name=".activity.weather.WeatherActivity"
|
||||
android:launchMode="singleTask"
|
||||
@@ -50,11 +73,13 @@
|
||||
android:name=".activity.NoticeActivity"
|
||||
android:excludeFromRecents="true"
|
||||
android:theme="@style/activity_styles" />
|
||||
<activity android:name=".activity.APPListActivity" />
|
||||
|
||||
<service
|
||||
android:name=".service.AlarmService"
|
||||
android:enabled="true"
|
||||
android:exported="true" />
|
||||
|
||||
<service
|
||||
android:name=".service.main.MainService"
|
||||
android:enabled="true"
|
||||
@@ -68,29 +93,7 @@
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<activity
|
||||
android:name=".activity.main.MainActivity"
|
||||
android:clearTaskOnLaunch="true"
|
||||
android:enabled="true"
|
||||
android:excludeFromRecents="true"
|
||||
android:launchMode="singleTask"
|
||||
android:resizeableActivity="true"
|
||||
android:resumeWhilePausing="true"
|
||||
android:screenOrientation="unspecified"
|
||||
android:stateNotNeeded="true"
|
||||
android:taskAffinity="com.example.taskaffinity.newtask"
|
||||
android:windowSoftInputMode="adjustPan">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.HOME" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.MONKEY" />
|
||||
<category android:name="android.intent.category.LAUNCHER_APP" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".activity.APPListActivity" /> <!-- 高德地图 -->
|
||||
<!-- 高德地图 -->
|
||||
<!-- 设置key -->
|
||||
<meta-data
|
||||
android:name="com.amap.api.v2.apikey"
|
||||
@@ -117,6 +120,10 @@
|
||||
<action android:name="zuoyeos.action.BOOT_COMPLETED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver
|
||||
android:name=".receiver.InstallResultReceiver"
|
||||
android:enabled="true"
|
||||
android:exported="true" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -10,7 +10,6 @@ import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
|
||||
@@ -18,7 +17,7 @@ import com.uiui.os.R;
|
||||
import com.uiui.os.adapter.APPListAdapter;
|
||||
import com.uiui.os.base.BaseActivity;
|
||||
import com.uiui.os.bean.AppListInfo;
|
||||
import com.uiui.os.utils.APKUtils;
|
||||
import com.uiui.os.utils.ApkUtils;
|
||||
import com.uiui.os.utils.BitmapUtils;
|
||||
import com.uiui.os.view.RecyclerViewSpacesItemDecoration;
|
||||
|
||||
@@ -52,7 +51,7 @@ public class APPListActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
List<ApplicationInfo> applicationInfoList = APKUtils.getSystemApp(APPListActivity.this);
|
||||
List<ApplicationInfo> applicationInfoList = ApkUtils.getSystemApp(APPListActivity.this);
|
||||
PackageManager pm = getPackageManager();
|
||||
if (null != applicationInfoList) {
|
||||
List<AppListInfo> appinfoList = new ArrayList<>();
|
||||
|
||||
@@ -6,7 +6,6 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.ServiceConnection;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Color;
|
||||
import android.os.IBinder;
|
||||
@@ -33,7 +32,7 @@ import com.uiui.os.fragment.AppListFragment;
|
||||
import com.uiui.os.fragment.BaseFragmentPagerAdapter;
|
||||
import com.uiui.os.fragment.CustomFragment;
|
||||
import com.uiui.os.fragment.SecondFragment;
|
||||
import com.uiui.os.utils.APKUtils;
|
||||
import com.uiui.os.utils.ApkUtils;
|
||||
import com.uiui.os.utils.AppUsedTimeUtils;
|
||||
import com.uiui.os.view.ScaleCircleNavigator;
|
||||
|
||||
@@ -87,7 +86,7 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
||||
mFragments.add(mCustomFragment);
|
||||
|
||||
mMainPresenter.getDesktopLayout();
|
||||
ArrayList<DesktopIcon> desktopIcons = APKUtils.queryFilterAppInfo(this);
|
||||
ArrayList<DesktopIcon> desktopIcons = ApkUtils.queryFilterAppInfo(this);
|
||||
|
||||
int x = 0;
|
||||
for (int i = 0; i <= desktopIcons.size(); i++) {
|
||||
@@ -184,7 +183,7 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
||||
|
||||
private void addData() {
|
||||
List<Fragment> fragmentList = new ArrayList<>();
|
||||
ArrayList<DesktopIcon> applicationInfoList = APKUtils.queryFilterAppInfo(this);
|
||||
ArrayList<DesktopIcon> applicationInfoList = ApkUtils.queryFilterAppInfo(this);
|
||||
int x = 0;
|
||||
for (int i = 0; i <= applicationInfoList.size(); i++) {
|
||||
if (i != 0 && i % APP_LIST_SIZE == 0) {
|
||||
@@ -198,14 +197,15 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
||||
appListFragment.setAppList(new ArrayList<>(applicationInfoList.subList(x, i)));
|
||||
}
|
||||
}
|
||||
for (int i = 1; i <= fragmentList.size(); i++) {
|
||||
//从第三个开始改
|
||||
for (int i = 2; i <= fragmentList.size(); i++) {
|
||||
if (mFragments.get(i) != null) {
|
||||
mBaseFragmentPagerAdapter.replaceFragment(i, fragmentList.get(i - 1));
|
||||
mBaseFragmentPagerAdapter.replaceFragment(i, fragmentList.get(i - 2));
|
||||
mFragments.remove(i);
|
||||
mFragments.add(i, fragmentList.get(i - 1));
|
||||
mFragments.add(i, fragmentList.get(i - 2));
|
||||
} else {
|
||||
mBaseFragmentPagerAdapter.addFragment(fragmentList.get(i - 1));
|
||||
mFragments.add(fragmentList.get(i - 1));
|
||||
mBaseFragmentPagerAdapter.addFragment(fragmentList.get(i - 2));
|
||||
mFragments.add(fragmentList.get(i - 2));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -299,7 +299,7 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
||||
String action = intent.getAction();
|
||||
Log.e(TAG, "onReceive: " + action);
|
||||
if (Intent.ACTION_PACKAGE_ADDED.equals(action)
|
||||
|| Intent.ACTION_MANAGED_PROFILE_REMOVED.equals(action)) {
|
||||
|| Intent.ACTION_PACKAGE_REMOVED.equals(action)) {
|
||||
addData();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import com.uiui.os.BuildConfig;
|
||||
import com.uiui.os.bean.BaseResponse;
|
||||
import com.uiui.os.bean.NetDesktopIcon;
|
||||
import com.uiui.os.network.NetInterfaceManager;
|
||||
import com.uiui.os.utils.APKUtils;
|
||||
import com.uiui.os.utils.ApkUtils;
|
||||
import com.uiui.os.utils.AppUsedTimeUtils;
|
||||
import com.uiui.os.utils.Utils;
|
||||
|
||||
@@ -91,11 +91,11 @@ public class MainPresenter implements MainContact.Presenter {
|
||||
String packagename = AppUsedTimeUtils.getInstance().getAppPackageName();
|
||||
Log.e(TAG, "onRestart packagename == " + packagename);
|
||||
if (!TextUtils.isEmpty(packagename)) {
|
||||
Log.e(TAG, "onRestart: " + APKUtils.getAppNameByPackage(mContext, packagename));
|
||||
Log.e(TAG, "onRestart: " + ApkUtils.getAppNameByPackage(mContext, packagename));
|
||||
Log.e(TAG, "onRestart: " + packagename);
|
||||
NetInterfaceManager.getInstance().getAppUsageRecordControl()
|
||||
.sendappUsageRecord(Utils.getSerial(),
|
||||
APKUtils.getAppNameByPackage(mContext, packagename),
|
||||
ApkUtils.getAppNameByPackage(mContext, packagename),
|
||||
packagename,
|
||||
AppUsedTimeUtils.getInstance().getStartTime() / 1000,
|
||||
AppUsedTimeUtils.getInstance().getEndTime() / 1000)
|
||||
@@ -136,7 +136,7 @@ public class MainPresenter implements MainContact.Presenter {
|
||||
long time = AppUsedTimeUtils.getInstance().getStartTime();
|
||||
JsonObject jsonObject = new JsonObject();
|
||||
jsonObject.addProperty("app_package", BuildConfig.APPLICATION_ID);
|
||||
jsonObject.addProperty("version_name", APKUtils.getAPPVersionName(mContext, BuildConfig.APPLICATION_ID));
|
||||
jsonObject.addProperty("version_name", ApkUtils.getAPPVersionName(mContext, BuildConfig.APPLICATION_ID));
|
||||
jsonObject.addProperty("start_time", time / 1000);
|
||||
String jsonString = jsonObject.toString();
|
||||
Log.e(TAG, "sendRunningInfo: " + jsonString);
|
||||
|
||||
@@ -96,7 +96,7 @@ public class WeatherPresenter implements WeatherContact.Presenter {
|
||||
@Override
|
||||
public void onSuccess(WeatherDailyBean weatherDailyBean) {
|
||||
String jsonString = new Gson().toJson(weatherDailyBean);
|
||||
Log.e("getWeather", "onSuccess: " + jsonString);
|
||||
Log.d("getWeather", "onSuccess: " + jsonString);
|
||||
mMMKV.encode(WEATHER_DAILY_KEY, jsonString);
|
||||
mView.setWeather(weatherDailyBean);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.uiui.os.R;
|
||||
import com.uiui.os.bean.AppListInfo;
|
||||
import com.uiui.os.utils.APKUtils;
|
||||
import com.uiui.os.utils.ApkUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -51,7 +51,7 @@ public class APPListAdapter extends RecyclerView.Adapter<APPListAdapter.holder>
|
||||
holder.root.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
APKUtils.openPackage(mContext, info.getPackageName());
|
||||
ApkUtils.openPackage(mContext, info.getPackageName());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.uiui.os.base;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.CallSuper;
|
||||
import androidx.annotation.CheckResult;
|
||||
import androidx.annotation.ContentView;
|
||||
import androidx.annotation.LayoutRes;
|
||||
@@ -15,21 +16,13 @@ import com.trello.rxlifecycle4.LifecycleTransformer;
|
||||
import com.trello.rxlifecycle4.RxLifecycle;
|
||||
import com.trello.rxlifecycle4.android.FragmentEvent;
|
||||
import com.trello.rxlifecycle4.android.RxLifecycleAndroid;
|
||||
import com.trello.rxlifecycle4.components.RxFragment;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import io.reactivex.rxjava3.subjects.BehaviorSubject;
|
||||
|
||||
public class BaseFragment extends Fragment implements LifecycleProvider<FragmentEvent> {
|
||||
private final BehaviorSubject<FragmentEvent> lifecycleSubject = BehaviorSubject.create();
|
||||
|
||||
public BaseFragment() {
|
||||
super();
|
||||
}
|
||||
|
||||
@ContentView
|
||||
public BaseFragment(@LayoutRes int contentLayoutId) {
|
||||
super(contentLayoutId);
|
||||
}
|
||||
public final BehaviorSubject<FragmentEvent> lifecycleSubject = BehaviorSubject.create();
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
@@ -53,60 +46,70 @@ public class BaseFragment extends Fragment implements LifecycleProvider<Fragment
|
||||
}
|
||||
|
||||
@Override
|
||||
@CallSuper
|
||||
public void onAttach(android.app.Activity activity) {
|
||||
super.onAttach(activity);
|
||||
lifecycleSubject.onNext(FragmentEvent.ATTACH);
|
||||
}
|
||||
|
||||
@Override
|
||||
@CallSuper
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
lifecycleSubject.onNext(FragmentEvent.CREATE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@CallSuper
|
||||
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
lifecycleSubject.onNext(FragmentEvent.CREATE_VIEW);
|
||||
}
|
||||
|
||||
@Override
|
||||
@CallSuper
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
lifecycleSubject.onNext(FragmentEvent.START);
|
||||
}
|
||||
|
||||
@Override
|
||||
@CallSuper
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
lifecycleSubject.onNext(FragmentEvent.RESUME);
|
||||
}
|
||||
|
||||
@Override
|
||||
@CallSuper
|
||||
public void onPause() {
|
||||
lifecycleSubject.onNext(FragmentEvent.PAUSE);
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
@CallSuper
|
||||
public void onStop() {
|
||||
lifecycleSubject.onNext(FragmentEvent.STOP);
|
||||
super.onStop();
|
||||
}
|
||||
|
||||
@Override
|
||||
@CallSuper
|
||||
public void onDestroyView() {
|
||||
lifecycleSubject.onNext(FragmentEvent.DESTROY_VIEW);
|
||||
super.onDestroyView();
|
||||
}
|
||||
|
||||
@Override
|
||||
@CallSuper
|
||||
public void onDestroy() {
|
||||
lifecycleSubject.onNext(FragmentEvent.DESTROY);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
@CallSuper
|
||||
public void onDetach() {
|
||||
lifecycleSubject.onNext(FragmentEvent.DETACH);
|
||||
super.onDetach();
|
||||
|
||||
87
app/src/main/java/com/uiui/os/bean/ActivityBean.java
Normal file
@@ -0,0 +1,87 @@
|
||||
package com.uiui.os.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ActivityBean implements Serializable {
|
||||
private static final long serialVersionUID = 8046770505423171522L;
|
||||
|
||||
int id;
|
||||
//分类名
|
||||
String type_name;
|
||||
//标题
|
||||
String title;
|
||||
//活动时间戳 单位秒
|
||||
long activity_time;
|
||||
//人数
|
||||
int people_num;
|
||||
//语音地址
|
||||
String voice;
|
||||
//设备名
|
||||
String sn_name;
|
||||
//设备头像
|
||||
String avatar;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getType_name() {
|
||||
return type_name;
|
||||
}
|
||||
|
||||
public void setType_name(String type_name) {
|
||||
this.type_name = type_name;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public long getActivity_time() {
|
||||
return activity_time;
|
||||
}
|
||||
|
||||
public void setActivity_time(long activity_time) {
|
||||
this.activity_time = activity_time;
|
||||
}
|
||||
|
||||
public int getPeople_num() {
|
||||
return people_num;
|
||||
}
|
||||
|
||||
public void setPeople_num(int people_num) {
|
||||
this.people_num = people_num;
|
||||
}
|
||||
|
||||
public String getVoice() {
|
||||
return voice;
|
||||
}
|
||||
|
||||
public void setVoice(String voice) {
|
||||
this.voice = voice;
|
||||
}
|
||||
|
||||
public String getSn_name() {
|
||||
return sn_name;
|
||||
}
|
||||
|
||||
public void setSn_name(String sn_name) {
|
||||
this.sn_name = sn_name;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
}
|
||||
87
app/src/main/java/com/uiui/os/bean/DemandBean.java
Normal file
@@ -0,0 +1,87 @@
|
||||
package com.uiui.os.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class DemandBean implements Serializable {
|
||||
private static final long serialVersionUID = 8046770505423171522L;
|
||||
|
||||
int id;
|
||||
//分类名
|
||||
String type_name;
|
||||
//标题
|
||||
String title;
|
||||
//活动时间戳 单位秒
|
||||
long demand_time;
|
||||
//价格
|
||||
int price;
|
||||
//语音地址
|
||||
String voice;
|
||||
//设备名
|
||||
String sn_name;
|
||||
//设备头像
|
||||
String avatar;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getType_name() {
|
||||
return type_name;
|
||||
}
|
||||
|
||||
public void setType_name(String type_name) {
|
||||
this.type_name = type_name;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public long getDemand_time() {
|
||||
return demand_time;
|
||||
}
|
||||
|
||||
public void setDemand_time(long demand_time) {
|
||||
this.demand_time = demand_time;
|
||||
}
|
||||
|
||||
public int getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(int price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getVoice() {
|
||||
return voice;
|
||||
}
|
||||
|
||||
public void setVoice(String voice) {
|
||||
this.voice = voice;
|
||||
}
|
||||
|
||||
public String getSn_name() {
|
||||
return sn_name;
|
||||
}
|
||||
|
||||
public void setSn_name(String sn_name) {
|
||||
this.sn_name = sn_name;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.uiui.os.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
@@ -22,7 +21,7 @@ import com.uiui.os.R;
|
||||
import com.uiui.os.bean.BaseResponse;
|
||||
import com.uiui.os.bean.DesktopIcon;
|
||||
import com.uiui.os.network.NetInterfaceManager;
|
||||
import com.uiui.os.utils.APKUtils;
|
||||
import com.uiui.os.utils.ApkUtils;
|
||||
import com.uiui.os.utils.BitmapUtils;
|
||||
import com.uiui.os.utils.IconUtils;
|
||||
import com.uiui.os.utils.AppUsedTimeUtils;
|
||||
@@ -123,7 +122,7 @@ public class AppListFragment extends Fragment {
|
||||
Log.e(TAG, "getView: " + desktopIcon.getPackageName());
|
||||
int i = IconUtils.appClassNameList.indexOf(desktopIcon.getPackageName());
|
||||
if (i != -1) {
|
||||
String val = IconUtils.appIconList2.get(i);
|
||||
String val = IconUtils.appIconList.get(i);
|
||||
int resID = getActivity().getResources().getIdentifier(val, "drawable", "com.uiui.os");
|
||||
if (resID == 0) {
|
||||
Log.e(TAG, "getView: not found src : " + desktopIcon.getPackageName());
|
||||
@@ -155,7 +154,7 @@ public class AppListFragment extends Fragment {
|
||||
public void onItemClick(View v, int index) {
|
||||
DesktopIcon desktopIcon = mDesktopIcons.get(index);
|
||||
if (desktopIcon != null) {
|
||||
APKUtils.openPackage(v.getContext(), desktopIcon.getPackageName());
|
||||
ApkUtils.openPackage(v.getContext(), desktopIcon.getPackageName());
|
||||
AppUsedTimeUtils.getInstance().setAppPackageName(desktopIcon.getPackageName());
|
||||
AppUsedTimeUtils.getInstance().setStartTime(System.currentTimeMillis());
|
||||
SendRunningApp(getActivity());
|
||||
@@ -169,7 +168,7 @@ public class AppListFragment extends Fragment {
|
||||
long time = AppUsedTimeUtils.getInstance().getStartTime();
|
||||
JsonObject jsonObject = new JsonObject();
|
||||
jsonObject.addProperty("app_package", packageName);
|
||||
jsonObject.addProperty("version_name", APKUtils.getAPPVersionName(context, packageName));
|
||||
jsonObject.addProperty("version_name", ApkUtils.getAPPVersionName(context, packageName));
|
||||
jsonObject.addProperty("start_time", time / 1000);
|
||||
String jsonString = jsonObject.toString();
|
||||
Log.e(TAG, "SendRunningApp: " + jsonString);
|
||||
|
||||
@@ -47,13 +47,12 @@ import com.uiui.os.activity.APPListActivity;
|
||||
import com.uiui.os.activity.CodeActivity;
|
||||
import com.uiui.os.activity.EmergencyActivity;
|
||||
import com.uiui.os.activity.weather.WeatherActivity;
|
||||
import com.uiui.os.adapter.AlarmClockAdapter;
|
||||
import com.uiui.os.adapter.NotificationAdapter;
|
||||
import com.uiui.os.adapter.SOSNnmberAdapter;
|
||||
import com.uiui.os.bean.AlarmClockData;
|
||||
import com.uiui.os.bean.AlarmItem;
|
||||
import com.uiui.os.utils.AmapManager;
|
||||
import com.uiui.os.utils.APKUtils;
|
||||
import com.uiui.os.utils.ApkUtils;
|
||||
import com.uiui.os.utils.AppUtil;
|
||||
import com.uiui.os.utils.Utils;
|
||||
|
||||
@@ -177,21 +176,7 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
getActivity().registerReceiver(mbatteryReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
|
||||
}
|
||||
|
||||
private void registerBatteryReceiver() {
|
||||
if (null == batteryReceiver) {
|
||||
batteryReceiver = new BatteryReceiver();
|
||||
}
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
|
||||
filter.addAction(Intent.ACTION_BATTERY_CHANGED);
|
||||
filter.addAction(Intent.ACTION_BATTERY_LOW);
|
||||
filter.addAction(Intent.ACTION_BATTERY_OKAY);
|
||||
filter.addAction(Intent.ACTION_POWER_CONNECTED);
|
||||
filter.addAction(Intent.ACTION_POWER_DISCONNECTED);
|
||||
getActivity().registerReceiver(batteryReceiver, filter);
|
||||
}
|
||||
|
||||
BatteryReceiver batteryReceiver;
|
||||
|
||||
@Override
|
||||
public void onDisconnected() {
|
||||
@@ -226,6 +211,22 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
return mWifiInfo.isConnected();
|
||||
}
|
||||
|
||||
private void registerBatteryReceiver() {
|
||||
if (null == batteryReceiver) {
|
||||
batteryReceiver = new BatteryReceiver();
|
||||
}
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
|
||||
filter.addAction(Intent.ACTION_BATTERY_CHANGED);
|
||||
filter.addAction(Intent.ACTION_BATTERY_LOW);
|
||||
filter.addAction(Intent.ACTION_BATTERY_OKAY);
|
||||
filter.addAction(Intent.ACTION_POWER_CONNECTED);
|
||||
filter.addAction(Intent.ACTION_POWER_DISCONNECTED);
|
||||
getActivity().registerReceiver(batteryReceiver, filter);
|
||||
}
|
||||
|
||||
BatteryReceiver batteryReceiver;
|
||||
|
||||
private class BatteryReceiver extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
@@ -294,7 +295,7 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
// cl_alarm.setOnClickListener(new View.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
// APKUtils.openPackage(getActivity(), "com.alarmclock.uiui");
|
||||
// ApkUtils.openPackage(getActivity(), "com.alarmclock.uiui");
|
||||
// }
|
||||
// });
|
||||
notificationAdapter = new NotificationAdapter();
|
||||
@@ -447,7 +448,7 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
|
||||
@Override
|
||||
public void onSuccess(WeatherNowBean weatherBean) {
|
||||
Log.e("getWeatherNow", "onSuccess: " + new Gson().toJson(weatherBean));
|
||||
Log.d("getWeatherNow", "onSuccess: " + new Gson().toJson(weatherBean));
|
||||
//先判断返回的status是否正确,当status正确时获取数据,若status不正确,可查看status对应的Code值找到原因
|
||||
if (Code.OK == weatherBean.getCode()) {
|
||||
WeatherNowBean.NowBaseBean now = weatherBean.getNow();
|
||||
@@ -458,7 +459,7 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
} else {
|
||||
//在此查看返回数据失败的原因
|
||||
Code code = weatherBean.getCode();
|
||||
Log.e("getWeatherNow", "failed code: " + code);
|
||||
Log.d("getWeatherNow", "failed code: " + code);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -471,7 +472,7 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
|
||||
@Override
|
||||
public void onSuccess(WeatherHourlyBean weatherHourlyBean) {
|
||||
Log.e("getWeather24Hourly", "onSuccess: " + new Gson().toJson(weatherHourlyBean));
|
||||
Log.d("getWeather24Hourly", "onSuccess: " + new Gson().toJson(weatherHourlyBean));
|
||||
if (Code.OK == weatherHourlyBean.getCode()) {
|
||||
List<WeatherHourlyBean.HourlyBean> hourly = weatherHourlyBean.getHourly();
|
||||
if (hourly != null && hourly.size() != 0) {
|
||||
@@ -500,7 +501,7 @@ public class CustomFragment extends Fragment implements NetworkUtils.OnNetworkSt
|
||||
|
||||
|
||||
private void killBackgroundApp() {
|
||||
List<String> pkgList = APKUtils.queryFilterAppList(mContext);
|
||||
List<String> pkgList = ApkUtils.queryFilterAppList(mContext);
|
||||
for (String pkg : pkgList) {
|
||||
if (pkg.equalsIgnoreCase(BuildConfig.APPLICATION_ID)) continue;
|
||||
killBackgroundProcesses(pkg);
|
||||
|
||||
@@ -1,21 +1,94 @@
|
||||
package com.uiui.os.fragment;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.trello.rxlifecycle4.RxLifecycle;
|
||||
import com.trello.rxlifecycle4.android.ActivityEvent;
|
||||
import com.trello.rxlifecycle4.android.FragmentEvent;
|
||||
import com.uiui.os.R;
|
||||
import com.uiui.os.base.BaseFragment;
|
||||
import com.uiui.os.bean.ActivityBean;
|
||||
import com.uiui.os.bean.ArticleInfo;
|
||||
import com.uiui.os.bean.BaseResponse;
|
||||
import com.uiui.os.bean.DemandBean;
|
||||
import com.uiui.os.bean.GoodsInfo;
|
||||
import com.uiui.os.network.NetInterfaceManager;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
* Use the {@link SecondFragment#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class SecondFragment extends Fragment {
|
||||
public class SecondFragment extends BaseFragment {
|
||||
private static final String TAG = SecondFragment.class.getSimpleName();
|
||||
|
||||
@BindView(R.id.iv_img)
|
||||
ImageView iv_img;
|
||||
@BindView(R.id.tv_goods_name)
|
||||
TextView tv_goods_name;
|
||||
@BindView(R.id.tv_goods_desc)
|
||||
TextView tv_goods_desc;
|
||||
@BindView(R.id.tv_buying_price)
|
||||
TextView tv_buying_price;
|
||||
@BindView(R.id.progressBar)
|
||||
ProgressBar progressBar;
|
||||
@BindView(R.id.tv_snapup)
|
||||
TextView tv_snapup;
|
||||
|
||||
@BindView(R.id.iv_aimg)
|
||||
ImageView iv_aimg;
|
||||
@BindView(R.id.tv_title)
|
||||
TextView tv_title;
|
||||
@BindView(R.id.tv_content)
|
||||
TextView tv_content;
|
||||
|
||||
@BindView(R.id.iv_avatar_a)
|
||||
ImageView iv_avatar_a;
|
||||
@BindView(R.id.tv_title_a)
|
||||
TextView tv_title_a;
|
||||
|
||||
@BindView(R.id.iv_avatar_d)
|
||||
ImageView iv_avatar_d;
|
||||
@BindView(R.id.tv_title_d)
|
||||
TextView tv_title_d;
|
||||
@BindView(R.id.tv_price)
|
||||
TextView tv_price;
|
||||
|
||||
@BindView(R.id.cl_activity)
|
||||
ConstraintLayout cl_activity;
|
||||
|
||||
@BindView(R.id.cl_demand)
|
||||
ConstraintLayout cl_demand;
|
||||
|
||||
private View rootView;
|
||||
private Context mContext;
|
||||
private ContentResolver mCRv;
|
||||
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private static final String ARG_PARAM1 = "param1";
|
||||
@@ -60,6 +133,201 @@ public class SecondFragment extends Fragment {
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_second, container, false);
|
||||
rootView = inflater.inflate(R.layout.fragment_second, container, false);
|
||||
mContext = rootView.getContext();
|
||||
mCRv = mContext.getContentResolver();
|
||||
ButterKnife.bind(this, rootView);
|
||||
initView();
|
||||
initData();
|
||||
return rootView;
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
getGoods();
|
||||
getArticle();
|
||||
getActivityList();
|
||||
getDemandList();
|
||||
}
|
||||
|
||||
private void getDemandList() {
|
||||
NetInterfaceManager.getInstance().getDemandListObservable()
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycleSubject, FragmentEvent.DESTROY))
|
||||
.subscribe(new Observer<BaseResponse<List<DemandBean>>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e("getDemandList", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse<List<DemandBean>> listBaseResponse) {
|
||||
Log.e("getDemandList", "onNext: " + listBaseResponse);
|
||||
if (listBaseResponse.code == 200) {
|
||||
List<DemandBean> demandBeans = listBaseResponse.data;
|
||||
if (demandBeans != null && demandBeans.size() != 0) {
|
||||
DemandBean demandBean = demandBeans.get(0);
|
||||
setDemand(demandBean);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e("getDemandList", "onError: " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getDemandList", "onComplete: ");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void setDemand(DemandBean demandBean) {
|
||||
Glide.with(iv_avatar_d).load(demandBean.getAvatar()).into(iv_avatar_d);
|
||||
tv_title_d.setText(demandBean.getTitle());
|
||||
tv_price.setText(String.valueOf(demandBean.getPrice()));
|
||||
}
|
||||
|
||||
private void getActivityList() {
|
||||
NetInterfaceManager.getInstance().getActivityListObservable()
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycleSubject, FragmentEvent.DESTROY))
|
||||
.subscribe(new Observer<BaseResponse<List<ActivityBean>>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e("getActivityList", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse<List<ActivityBean>> listBaseResponse) {
|
||||
Log.e("getActivityList", "onNext: " + listBaseResponse);
|
||||
if (listBaseResponse.code == 200) {
|
||||
List<ActivityBean> activityBeans = listBaseResponse.data;
|
||||
if (activityBeans != null && activityBeans.size() != 0) {
|
||||
ActivityBean activityBean = activityBeans.get(0);
|
||||
setActivity(activityBean);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e("getActivityList", "onError: " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getActivityList", "onComplete: ");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setActivity(ActivityBean activity) {
|
||||
Glide.with(iv_avatar_a).load(activity.getAvatar()).into(iv_avatar_a);
|
||||
tv_title_a.setText(activity.getTitle());
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
cl_activity.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
openApp();
|
||||
}
|
||||
});
|
||||
cl_demand.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
openApp();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void openApp(){
|
||||
Intent intent = new Intent(Intent.ACTION_MAIN);
|
||||
/*知道要跳转应用的包命与目标Activity*/
|
||||
ComponentName componentName = new ComponentName("com.uiui.city", "com.uiui.city.activity.MainActivity");
|
||||
intent.setComponent(componentName);
|
||||
intent.putExtra("", "");//这里Intent传值
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
private void getGoods() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getGoodsListObservable()
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycleSubject, FragmentEvent.DESTROY))
|
||||
.subscribe(new Observer<BaseResponse<List<GoodsInfo>>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e("getGoods", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse<List<GoodsInfo>> listBaseResponse) {
|
||||
Log.e("getGoods", "onNext: " + listBaseResponse);
|
||||
if (listBaseResponse.code == 200) {
|
||||
List<GoodsInfo> goodsInfoList = listBaseResponse.data;
|
||||
if (goodsInfoList != null && goodsInfoList.size() != 0) {
|
||||
GoodsInfo goodsInfo = goodsInfoList.get(0);
|
||||
setGoodsInfo(goodsInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e("getGoods", "onError: " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getGoods", "onComplete: ");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setGoodsInfo(GoodsInfo goodsInfo) {
|
||||
Glide.with(iv_img).load(goodsInfo.getImg()).into(iv_img);
|
||||
tv_goods_name.setText(goodsInfo.getGoods_name());
|
||||
tv_goods_desc.setText(goodsInfo.getGoods_desc());
|
||||
tv_buying_price.setText(String.valueOf(goodsInfo.getBuying_price()));
|
||||
}
|
||||
|
||||
private void getArticle() {
|
||||
NetInterfaceManager.getInstance().getArticleListObservable()
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycleSubject, FragmentEvent.DESTROY))
|
||||
.subscribe(new Observer<BaseResponse<List<ArticleInfo>>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e("getArticle", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse<List<ArticleInfo>> listBaseResponse) {
|
||||
Log.e("getArticle", "onNext: " + listBaseResponse);
|
||||
if (listBaseResponse.code == 200) {
|
||||
List<ArticleInfo> articleInfos = listBaseResponse.data;
|
||||
if (articleInfos != null && articleInfos.size() != 0) {
|
||||
ArticleInfo articleInfo = articleInfos.get(0);
|
||||
setArticleInfo(articleInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e("getArticle", "onError: " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getArticle", "onComplete: ");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setArticleInfo(ArticleInfo articleInfo) {
|
||||
Glide.with(iv_aimg).load(articleInfo.getImg()).into(iv_aimg);
|
||||
tv_title.setText(articleInfo.getTitle());
|
||||
tv_content.setText(articleInfo.getContent());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,9 @@ import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
|
||||
import com.uiui.os.bean.NetDesktopIcon;
|
||||
import com.uiui.os.utils.APKUtils;
|
||||
import com.uiui.os.utils.ApkUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -57,7 +56,7 @@ public class IconPositionManager {
|
||||
List<NetDesktopIcon> dbList = getLogList();
|
||||
for (int i = 0; i < dbList.size(); i++) {
|
||||
NetDesktopIcon icon = dbList.get(i);
|
||||
if (!APKUtils.isAvailable(mContext, icon.getPackages())) {
|
||||
if (!ApkUtils.isAvailable(mContext, icon.getPackages())) {
|
||||
dbList.remove(i);
|
||||
deleteIcon(icon.getPackages());
|
||||
}
|
||||
|
||||
@@ -4,12 +4,20 @@ import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.uiui.os.bean.ActivityBean;
|
||||
import com.uiui.os.bean.AlarmClockData;
|
||||
import com.uiui.os.bean.ArticleInfo;
|
||||
import com.uiui.os.bean.BaseResponse;
|
||||
import com.uiui.os.bean.DemandBean;
|
||||
import com.uiui.os.bean.GoodsInfo;
|
||||
import com.uiui.os.bean.NetDesktopIcon;
|
||||
import com.uiui.os.network.api.ActivityListApi;
|
||||
import com.uiui.os.network.api.AlarmClockApi;
|
||||
import com.uiui.os.network.api.AppUsageRecordApi;
|
||||
import com.uiui.os.network.api.ArticleListApi;
|
||||
import com.uiui.os.network.api.DemandListApi;
|
||||
import com.uiui.os.network.api.GetDesktopApi;
|
||||
import com.uiui.os.network.api.GoodsListApi;
|
||||
import com.uiui.os.network.api.HealthCodeApi;
|
||||
import com.uiui.os.network.api.RunNewApp;
|
||||
import com.uiui.os.network.api.SOSRecordApi;
|
||||
@@ -202,6 +210,34 @@ public class NetInterfaceManager {
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<List<GoodsInfo>>> getGoodsListObservable() {
|
||||
return mRetrofit.create(GoodsListApi.class)
|
||||
.getGoodsList(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<List<ArticleInfo>>> getArticleListObservable() {
|
||||
return mRetrofit.create(ArticleListApi.class)
|
||||
.getArticleList(Utils.getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<List<ActivityBean>>> getActivityListObservable() {
|
||||
return mRetrofit.create(ActivityListApi.class)
|
||||
.getActivityList(Utils.getSerial(), 1, 1)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<List<DemandBean>>> getDemandListObservable() {
|
||||
return mRetrofit.create(DemandListApi.class)
|
||||
.getDemandList(Utils.getSerial(), 1, 1)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
|
||||
public AppUsageRecordApi getAppUsageRecordControl() {
|
||||
return mRetrofit.create(AppUsageRecordApi.class);
|
||||
|
||||
@@ -26,6 +26,10 @@ public class URLAddress {
|
||||
public static final String GET_GOODS_DETAILS = "getGoodsDetails";
|
||||
/*获取资讯详情*/
|
||||
public static final String GET_ARTICLE_DETAILS = "getArticleDetails";
|
||||
/*同城活动列表*/
|
||||
public static final String GET_ACTIVITY_LIST = "activityList";
|
||||
/*同城需求列表*/
|
||||
public static final String GET_DEMAND_LIST = "demandList";
|
||||
/*获取健康吗*/
|
||||
public static final String GET_HEALTH_CODE = "getHealthCode";
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.uiui.os.network.api;
|
||||
|
||||
import com.uiui.os.bean.ActivityBean;
|
||||
import com.uiui.os.bean.BaseResponse;
|
||||
import com.uiui.os.network.URLAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface ActivityListApi {
|
||||
@GET(URLAddress.GET_ACTIVITY_LIST)
|
||||
Observable<BaseResponse<List<ActivityBean>>> getActivityList(
|
||||
@Query("sn") String sn,
|
||||
@Query("startSize") int startSize,
|
||||
@Query("pageSize") int pageSize
|
||||
);
|
||||
}
|
||||
20
app/src/main/java/com/uiui/os/network/api/DemandListApi.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package com.uiui.os.network.api;
|
||||
|
||||
import com.uiui.os.bean.BaseResponse;
|
||||
import com.uiui.os.bean.DemandBean;
|
||||
import com.uiui.os.network.URLAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface DemandListApi {
|
||||
@GET(URLAddress.GET_DEMAND_LIST)
|
||||
Observable<BaseResponse<List<DemandBean>>> getDemandList(
|
||||
@Query("sn") String sn,
|
||||
@Query("startSize") int startSize,
|
||||
@Query("pageSize") int pageSize
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.uiui.os.receiver;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageInstaller;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
public class InstallResultReceiver extends BroadcastReceiver {
|
||||
private static final String TAG = "InstallResultReceiver";
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
// an Intent broadcast.
|
||||
//throw new UnsupportedOperationException("Not yet implemented");
|
||||
|
||||
|
||||
if (intent != null) {
|
||||
final int status = intent.getIntExtra(PackageInstaller.EXTRA_STATUS,
|
||||
PackageInstaller.STATUS_FAILURE);
|
||||
if (status == PackageInstaller.STATUS_SUCCESS) {
|
||||
// success
|
||||
String PACKAGE_NAME = intent.getStringExtra("android.content.pm.extra.PACKAGE_NAME");
|
||||
|
||||
Log.e(TAG, "APP Install Success!");
|
||||
} else {
|
||||
String msg = intent.getStringExtra(PackageInstaller.EXTRA_STATUS_MESSAGE);
|
||||
}
|
||||
}
|
||||
// String s = intent.getAction();
|
||||
// Log.e("fht", s);
|
||||
// Bundle extras = intent.getExtras();
|
||||
// Set<String> ks = extras.keySet();
|
||||
// Iterator<String> iterator = ks.iterator();
|
||||
// while (iterator.hasNext()) {
|
||||
// Log.d("KEY", iterator.next());
|
||||
// }
|
||||
String STATUS = intent.getStringExtra(PackageInstaller.EXTRA_STATUS);
|
||||
String PACKAGE_NAME = intent.getStringExtra(PackageInstaller.EXTRA_PACKAGE_NAME);
|
||||
String SESSION_ID = intent.getStringExtra(PackageInstaller.EXTRA_SESSION_ID);
|
||||
String STATUS_MESSAGE = intent.getStringExtra(PackageInstaller.EXTRA_STATUS_MESSAGE);
|
||||
String LEGACY_STATUS = intent.getStringExtra("android.content.pm.extra.LEGACY_STATUS");
|
||||
// Log.e("fht", STATUS);
|
||||
// Log.e("fht", PACKAGE_NAME);
|
||||
// Log.e("fht", SESSION_ID);
|
||||
// Log.e("fht", LEGACY_STATUS);
|
||||
// Log.e("fht", STATUS_MESSAGE);
|
||||
if (STATUS_MESSAGE != null && "INSTALL_SUCCEEDED".equals(STATUS_MESSAGE)) {
|
||||
// ToastUtil.show(PACKAGE_NAME + "安装成功");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ import com.uiui.os.base.BaseService;
|
||||
import com.uiui.os.bean.AlarmClockData;
|
||||
import com.uiui.os.bean.BaseResponse;
|
||||
import com.uiui.os.network.NetInterfaceManager;
|
||||
import com.uiui.os.utils.APKUtils;
|
||||
import com.uiui.os.utils.ApkUtils;
|
||||
import com.uiui.os.utils.CmdUtil;
|
||||
import com.uiui.os.utils.ForegroundAppUtil;
|
||||
import com.uiui.os.utils.AppUsedTimeUtils;
|
||||
@@ -76,6 +76,9 @@ public class MainService extends BaseService implements MainSContact.MainSView,
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
Log.e(TAG, "onCreate: ");
|
||||
ApkUtils.UninstallAPP(this, "com.joytv.live");
|
||||
ApkUtils.UninstallAPP(this, "com.tencent.android.qqdownloader");
|
||||
|
||||
Aria.init(this);
|
||||
Aria.download(this).register();
|
||||
mPresenter = new MainSPresenter(this);
|
||||
@@ -343,7 +346,7 @@ public class MainService extends BaseService implements MainSContact.MainSView,
|
||||
if (!TextUtils.isEmpty(packagename)) {
|
||||
NetInterfaceManager.getInstance().getAppUsageRecordControl()
|
||||
.sendappUsageRecord(Utils.getSerial(),
|
||||
APKUtils.getAppNameByPackage(context, packagename),
|
||||
ApkUtils.getAppNameByPackage(context, packagename),
|
||||
packagename,
|
||||
AppUsedTimeUtils.getInstance().getStartTime() / 1000,
|
||||
AppUsedTimeUtils.getInstance().getEndTime() / 1000)
|
||||
|
||||
@@ -103,7 +103,7 @@ public class AmapManager {
|
||||
locationClient.setLocationListener(new AMapLocationListener() {
|
||||
@Override
|
||||
public void onLocationChanged(AMapLocation aMapLocation) {
|
||||
Log.e(TAG, "onLocationChanged: " + aMapLocation.toStr());
|
||||
Log.d(TAG, "onLocationChanged: " + aMapLocation.toStr());
|
||||
if (aMapLocation.getErrorCode() == 0) {
|
||||
nowAMapLocation = aMapLocation;
|
||||
mMMKV.encode(AMAPLOCATION_JSON_KEY, aMapLocation.toStr());
|
||||
|
||||
@@ -1,28 +1,46 @@
|
||||
package com.uiui.os.utils;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageInstaller;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.os.Binder;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.uiui.os.BuildConfig;
|
||||
import com.uiui.os.bean.DesktopIcon;
|
||||
import com.uiui.os.receiver.InstallResultReceiver;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.text.Collator;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
|
||||
public class APKUtils {
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import io.reactivex.rxjava3.core.ObservableEmitter;
|
||||
import io.reactivex.rxjava3.core.ObservableOnSubscribe;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
|
||||
public class ApkUtils {
|
||||
private static HashSet<String> excludePackageName = new HashSet<String>() {{
|
||||
this.add(BuildConfig.APPLICATION_ID);
|
||||
this.add("org.chromium.browser");
|
||||
@@ -44,7 +62,7 @@ public class APKUtils {
|
||||
private static HashSet<String> allHintPackage = new HashSet<String>() {{
|
||||
this.add("com.android.uiuios");
|
||||
}};
|
||||
private static String TAG = APKUtils.class.getSimpleName();
|
||||
private static String TAG = ApkUtils.class.getSimpleName();
|
||||
|
||||
public static ArrayList<ApplicationInfo> getSystemApp(Context context) {
|
||||
PackageManager pm = context.getPackageManager();
|
||||
@@ -93,6 +111,16 @@ public class APKUtils {
|
||||
return applicationInfos;
|
||||
}
|
||||
|
||||
private static List<String> defaultSort = new ArrayList<String>() {{
|
||||
this.add("com.android.dialer");
|
||||
this.add("com.android.messaging");
|
||||
this.add("com.android.gallery3d");
|
||||
this.add("com.android.camera2");
|
||||
this.add("com.android.settings");
|
||||
this.add("com.uiui.sn");
|
||||
this.add("com.uiui.appstore");
|
||||
}};
|
||||
|
||||
/**
|
||||
* @param context
|
||||
* @return
|
||||
@@ -149,8 +177,20 @@ public class APKUtils {
|
||||
}
|
||||
});
|
||||
ArrayList<DesktopIcon> desktopIcons = new ArrayList<>();
|
||||
for (int p = 0; p < applicationInfos.size(); p++) {
|
||||
desktopIcons.add(DesktopIcon.creatDesktopIcon(context, applicationInfos.get(p), p));
|
||||
HashMap<String, ApplicationInfo> infoHashMap = new HashMap<>();
|
||||
for (ApplicationInfo applicationInfo : applicationInfos) {
|
||||
infoHashMap.put(applicationInfo.packageName, applicationInfo);
|
||||
}
|
||||
for (int i = 0; i < defaultSort.size(); i++) {
|
||||
ApplicationInfo info = infoHashMap.get(defaultSort.get(i));
|
||||
if (info != null) {
|
||||
desktopIcons.add(DesktopIcon.creatDesktopIcon(context, info, i));
|
||||
infoHashMap.remove(defaultSort.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
for (ApplicationInfo applicationInfo : infoHashMap.values()) {
|
||||
desktopIcons.add(DesktopIcon.creatDesktopIcon(context, applicationInfo));
|
||||
}
|
||||
return desktopIcons;
|
||||
}
|
||||
@@ -325,4 +365,105 @@ public class APKUtils {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 静默卸载应用
|
||||
*
|
||||
* @param context
|
||||
* @param pkg
|
||||
*/
|
||||
public static void UninstallAPP(Context context, String pkg) {
|
||||
Observable.create(new ObservableOnSubscribe<String>() {
|
||||
@Override
|
||||
public void subscribe(ObservableEmitter<String> emitter) throws Exception {
|
||||
Log.e("UninstallAPP", "call: " + Thread.currentThread().getName());
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
ApkUtils.uninstall(context, pkg);
|
||||
} else {
|
||||
ApkUtils.deleteApkInSilence(pkg);
|
||||
}
|
||||
emitter.onNext(pkg);
|
||||
}
|
||||
}).subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
Log.e("UninstallAPP", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
Log.e("UninstallAPP", "onNext: " + Thread.currentThread().getName());
|
||||
Log.e("UninstallAPP", "onNext: " + s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
Log.e("UninstallAPP", "onError: " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("UninstallAPP", "onComplete: ");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据包名卸载应用
|
||||
*
|
||||
* @param packageName 包名
|
||||
*/
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
public static void uninstall(Context context, String packageName) {
|
||||
Intent broadcastIntent = new Intent(context, InstallResultReceiver.class);
|
||||
PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 1,
|
||||
broadcastIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
PackageInstaller packageInstaller = context.getPackageManager().getPackageInstaller();
|
||||
packageInstaller.uninstall(packageName, pendingIntent.getIntentSender());
|
||||
}
|
||||
|
||||
public static void deleteApkInSilence(String packageName) {
|
||||
Class<?> pmService;
|
||||
Class<?> activityTherad;
|
||||
Method method;
|
||||
try {
|
||||
activityTherad = Class.forName("android.app.ActivityThread");
|
||||
Class<?> paramTypes[] = getParamTypes(activityTherad, "getPackageManager");
|
||||
method = activityTherad.getMethod("getPackageManager", paramTypes);
|
||||
Object PackageManagerService = method.invoke(activityTherad);
|
||||
pmService = PackageManagerService.getClass();
|
||||
Class<?> paramTypes1[] = getParamTypes(pmService, "deletePackageAsUser");
|
||||
method = pmService.getMethod("deletePackageAsUser", paramTypes1);
|
||||
//getUserId
|
||||
method.invoke(PackageManagerService, packageName, null, getUserId(Binder.getCallingUid()), 0x00000040);
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static Class<?>[] getParamTypes(Class<?> cls, String mName) {
|
||||
Class<?> cs[] = null;
|
||||
Method[] mtd = cls.getMethods();
|
||||
for (int i = 0; i < mtd.length; i++) {
|
||||
if (!mtd[i].getName().equals(mName)) {
|
||||
continue;
|
||||
}
|
||||
cs = mtd[i].getParameterTypes();
|
||||
}
|
||||
return cs;
|
||||
}
|
||||
|
||||
public static final int PER_USER_RANGE = 100000;
|
||||
|
||||
public static int getUserId(int uid) {
|
||||
return uid / PER_USER_RANGE;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 12 KiB |
14
app/src/main/res/drawable/main_pb_bg.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!--pb背景样式-->
|
||||
<item
|
||||
android:id="@android:id/background"
|
||||
android:drawable="@drawable/pgs_bar_bg" />
|
||||
<!--pb进度条样式-->
|
||||
<item android:id="@android:id/progress">
|
||||
<scale
|
||||
android:drawable="@drawable/shape_pg_sb"
|
||||
android:scaleWidth="100%" />
|
||||
</item>
|
||||
|
||||
</layer-list>
|
||||
4
app/src/main/res/drawable/pgs_bar_bg.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="8dp" />
|
||||
<solid android:color="#F1B3B3" />
|
||||
</shape>
|
||||
4
app/src/main/res/drawable/shape_pg_sb.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="8dp" />
|
||||
<solid android:color="#F44545" />
|
||||
</shape>
|
||||
@@ -19,36 +19,205 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/custom_background">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView9"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="秒杀抢购"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_img"
|
||||
android:layout_width="152dp"
|
||||
android:layout_height="152dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintStart_toStartOf="@+id/textView9"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView9" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_goods_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:maxLines="1"
|
||||
android:text="商品名称"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_img"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_img" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_goods_desc"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:maxLines="5"
|
||||
android:textColor="@color/black"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_img"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_goods_name"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_goods_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView14"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="购买信息"
|
||||
android:textColor="@color/red"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_img"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_img" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView15"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="秒杀价格"
|
||||
android:textColor="@color/red"
|
||||
app:layout_constraintStart_toStartOf="@+id/textView14"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView14" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView16"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="¥"
|
||||
android:textColor="@color/red"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/textView15"
|
||||
app:layout_constraintStart_toEndOf="@+id/textView15" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_buying_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="100.00"
|
||||
android:textColor="@color/red"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/textView16"
|
||||
app:layout_constraintStart_toEndOf="@+id/textView16" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:max="100"
|
||||
android:progress="50"
|
||||
android:progressDrawable="@drawable/main_pb_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/textView15"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView15" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text=""
|
||||
app:layout_constraintBottom_toBottomOf="@+id/progressBar"
|
||||
app:layout_constraintStart_toEndOf="@+id/progressBar"
|
||||
app:layout_constraintTop_toTopOf="@+id/progressBar"
|
||||
app:layout_constraintVertical_bias="0.5" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_snapup"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="立刻抢购"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/custom_background">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView13"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="养生资讯"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_aimg"
|
||||
android:layout_width="224dp"
|
||||
android:layout_height="126dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintStart_toStartOf="@+id/textView13"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView13" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:maxLines="1"
|
||||
android:text="sadas"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_aimg"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_aimg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="dasdasdasdsa"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_aimg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_readnow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="阅读全文"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -58,9 +227,15 @@
|
||||
android:layout_weight="2">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_activity"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/custom_background">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -69,15 +244,55 @@
|
||||
android:layout_marginTop="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="附近活动"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_avatar_a"
|
||||
android:layout_width="88dp"
|
||||
android:layout_height="88dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title_a"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="活动"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_avatar_a"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_demand"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/custom_background">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -86,9 +301,66 @@
|
||||
android:layout_marginTop="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="服务需求"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_avatar_d"
|
||||
android:layout_width="88dp"
|
||||
android:layout_height="88dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title_d"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="需求"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_avatar_d"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView17"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="价格:"
|
||||
android:textColor="@color/black"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_title_d"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title_d" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="价格"
|
||||
android:textColor="@color/black"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/textView17"
|
||||
app:layout_constraintStart_toEndOf="@+id/textView17"
|
||||
app:layout_constraintTop_toTopOf="@+id/textView17"
|
||||
app:layout_constraintVertical_bias="0.0" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout 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"
|
||||
@@ -9,18 +10,270 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="3"
|
||||
android:layout_height="0dp">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:layout_height="0dp">
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="3">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/custom_background">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView9"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="秒杀抢购"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_img"
|
||||
android:layout_width="152dp"
|
||||
android:layout_height="152dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintStart_toStartOf="@+id/textView9"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView9" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_goods_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:maxLines="1"
|
||||
android:text="商品名称"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_img"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_img" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_goods_desc"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:maxLines="5"
|
||||
android:textColor="@color/black"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_img"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_goods_name"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_goods_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView14"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="购买信息"
|
||||
android:textColor="@color/red"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_img"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_img" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView15"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="秒杀价格"
|
||||
android:textColor="@color/red"
|
||||
app:layout_constraintStart_toStartOf="@+id/textView14"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView14" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView16"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="¥"
|
||||
android:textColor="@color/red"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/textView15"
|
||||
app:layout_constraintStart_toEndOf="@+id/textView15" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_buying_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="100.00"
|
||||
android:textColor="@color/red"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/textView16"
|
||||
app:layout_constraintStart_toEndOf="@+id/textView16" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:max="100"
|
||||
android:progress="50"
|
||||
android:progressDrawable="@drawable/main_pb_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/textView15"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView15" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text=""
|
||||
app:layout_constraintBottom_toBottomOf="@+id/progressBar"
|
||||
app:layout_constraintStart_toEndOf="@+id/progressBar"
|
||||
app:layout_constraintTop_toTopOf="@+id/progressBar"
|
||||
app:layout_constraintVertical_bias="0.5" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_snapup"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="立刻抢购"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/custom_background">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView13"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="养生资讯"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_aimg"
|
||||
android:layout_width="224dp"
|
||||
android:layout_height="126dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintStart_toStartOf="@+id/textView13"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView13" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:maxLines="1"
|
||||
android:text="sadas"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_aimg"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_aimg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="dasdasdasdsa"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_aimg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_readnow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="阅读全文"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="2">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/custom_background">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="附近活动"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/custom_background">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:maxLines="1"
|
||||
android:text="服务需求"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 4.1 KiB |