version:1.2.9
fix:修复没有微信时打开报错 update:新增单独联系人页面
This commit is contained in:
@@ -15,8 +15,8 @@ android {
|
||||
applicationId "com.xxpatx.os"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 29
|
||||
versionCode 1028
|
||||
versionName "1.2.7"
|
||||
versionCode 1030
|
||||
versionName "1.2.9"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
@@ -148,8 +148,10 @@ dependencies {
|
||||
//磁盘缓存
|
||||
implementation 'com.jakewharton:disklrucache:2.0.2'
|
||||
//glide
|
||||
implementation 'com.github.bumptech.glide:glide:4.13.1'
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.13.1'
|
||||
implementation 'com.github.bumptech.glide:glide:4.15.1'
|
||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.15.1'
|
||||
implementation 'com.github.bumptech.glide:okhttp3-integration:4.15.1'
|
||||
|
||||
//RxJava
|
||||
// implementation 'io.reactivex.rxjava2:rxjava:2.2.12'
|
||||
// implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
||||
|
||||
@@ -154,6 +154,11 @@
|
||||
android:name=".activity.setting.SettingActivity"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activity.contact.ContactActivity"
|
||||
android:launchMode="singleTask"
|
||||
android:theme="@style/AppTheme"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activity.dock.DockActivity"
|
||||
android:launchMode="singleTask"
|
||||
@@ -249,6 +254,7 @@
|
||||
<activity
|
||||
android:name=".activity.contact.AddWechatContactActivity"
|
||||
android:launchMode="singleTask"
|
||||
android:theme="@style/AppTheme"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".activity.callwechat.CallWechatActivity"
|
||||
@@ -399,6 +405,10 @@
|
||||
<meta-data
|
||||
android:name="design_height_in_dp"
|
||||
android:value="640" />
|
||||
|
||||
<meta-data
|
||||
android:name="com.xxpatx.os.config.MyGlideModule"
|
||||
android:value="GlideModule" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -27,6 +27,7 @@ import com.xxpatx.os.custom.GlideEngine;
|
||||
import com.xxpatx.os.databinding.ActivityAddWechatContactBinding;
|
||||
import com.xxpatx.os.db.ContactCacheUtils;
|
||||
import com.xxpatx.os.utils.ScreenUtil;
|
||||
import com.zackratos.ultimatebarx.ultimatebarx.java.UltimateBarX;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
@@ -35,17 +36,17 @@ public class AddWechatContactActivity extends BaseMvvmActivity<AddWechatContactV
|
||||
private static final String TAG = "AddWechatContactActivity";
|
||||
|
||||
private LoadingDialog mLoadingDialog;
|
||||
private String mPictrueFilePath;
|
||||
// private String mPictrueFilePath;
|
||||
|
||||
@Override
|
||||
public boolean setNightMode() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setfitWindow() {
|
||||
return true;
|
||||
}
|
||||
// @Override
|
||||
// public boolean setfitWindow() {
|
||||
// return true;
|
||||
// }
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@@ -62,6 +63,9 @@ public class AddWechatContactActivity extends BaseMvvmActivity<AddWechatContactV
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
UltimateBarX.addStatusBarTopPadding(mViewDataBinding.clExit);
|
||||
UltimateBarX.addNavigationBarBottomPadding(mViewDataBinding.clBottom);
|
||||
|
||||
mLoadingDialog = new LoadingDialog(this);
|
||||
mLoadingDialog.setLoadingText("正在上传")
|
||||
.setSuccessText("添加成功")
|
||||
@@ -115,13 +119,13 @@ public class AddWechatContactActivity extends BaseMvvmActivity<AddWechatContactV
|
||||
.forResult(new OnResultCallbackListener<LocalMedia>() {
|
||||
@Override
|
||||
public void onResult(ArrayList<LocalMedia> result) {
|
||||
mPictrueFilePath = result.get(0).getRealPath();
|
||||
File file = new File(mPictrueFilePath);
|
||||
mViewModel.avatarFilePath = result.get(0).getRealPath();
|
||||
File file = new File(mViewModel.avatarFilePath);
|
||||
if (file.exists()) {
|
||||
RequestOptions options = new RequestOptions().transform(new RoundedCorners(ScreenUtil.dip2px(AddWechatContactActivity.this, 8F)));
|
||||
Glide.with(mViewDataBinding.nvAvatar).load(file).apply(options).into(mViewDataBinding.nvAvatar);
|
||||
} else {
|
||||
mPictrueFilePath = "";
|
||||
mViewModel.avatarFilePath = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,219 @@
|
||||
package com.xxpatx.os.activity.contact;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.hjq.toast.Toaster;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
import com.xxpatx.os.R;
|
||||
import com.xxpatx.os.adapter.ContactAdapter;
|
||||
import com.xxpatx.os.adapter.WechatContactAdapter;
|
||||
import com.xxpatx.os.base.mvvm.BaseMvvmActivity;
|
||||
import com.xxpatx.os.bean.BaseResponse;
|
||||
import com.xxpatx.os.bean.Contact;
|
||||
import com.xxpatx.os.config.CommonConfig;
|
||||
import com.xxpatx.os.databinding.ActivityContactBinding;
|
||||
import com.xxpatx.os.dialog.EditContactDialog;
|
||||
import com.zackratos.ultimatebarx.ultimatebarx.java.UltimateBarX;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ContactActivity extends BaseMvvmActivity<ContactViewModel, ActivityContactBinding> {
|
||||
private static final String TAG = "ContactActivity";
|
||||
|
||||
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||
|
||||
private ContactAdapter mContactAdapter;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_contact;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initDataBinding() {
|
||||
mViewModel.setCtx(this);
|
||||
mViewModel.setVDBinding(mViewDataBinding);
|
||||
mViewModel.setLifecycle(getLifecycleSubject());
|
||||
mViewDataBinding.setClick(new BtnClick());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
UltimateBarX.addStatusBarTopPadding(mViewDataBinding.clExit);
|
||||
UltimateBarX.addNavigationBarBottomPadding(mViewDataBinding.clBottom);
|
||||
|
||||
mContactAdapter = new ContactAdapter();
|
||||
mContactAdapter.setOnLongClick(new WechatContactAdapter.OnLongClick() {
|
||||
@Override
|
||||
public void setOnLongClickListener(Contact contact) {
|
||||
boolean disableModify = mMMKV.decodeBool(CommonConfig.DISABLE_CONTACT_MODIFY, false);
|
||||
if (disableModify) {
|
||||
Toaster.showLong("已禁用联系人修改");
|
||||
} else {
|
||||
if (contact.isSimContact()) {
|
||||
Toaster.showLong("本地联系人不支持修改");
|
||||
} else {
|
||||
showDialog(contact);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(ContactActivity.this);
|
||||
linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
|
||||
mViewDataBinding.rvContact.setLayoutManager(linearLayoutManager);
|
||||
// if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
// mViewDataBinding.rvContact.setLayoutManager(new GridLayoutManager(mContext, 3));
|
||||
// } else {
|
||||
// mViewDataBinding.rvContact.setLayoutManager(new GridLayoutManager(mContext, 2));
|
||||
// }
|
||||
mViewDataBinding.rvContact.setAdapter(mContactAdapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
mViewModel.getContactListData().observe(this, new Observer<List<Contact>>() {
|
||||
@Override
|
||||
public void onChanged(List<Contact> contacts) {
|
||||
List<Contact> sim = getSIMContacts();
|
||||
if (sim.size() != 0) {
|
||||
contacts.addAll(sim);
|
||||
}
|
||||
mContactAdapter.setContactList(contacts);
|
||||
}
|
||||
});
|
||||
|
||||
mViewModel.getDeleteData().observe(this, new Observer<BaseResponse>() {
|
||||
@Override
|
||||
public void onChanged(BaseResponse baseResponse) {
|
||||
if (baseResponse.code == 200) {
|
||||
Toaster.show("删除成功");
|
||||
} else {
|
||||
Toaster.show("删除失败:" + baseResponse.msg);
|
||||
}
|
||||
mViewModel.getContact();
|
||||
}
|
||||
});
|
||||
mViewModel.getCacheContact();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
Log.e(TAG, "onResume: ");
|
||||
mViewModel.getCacheContact();
|
||||
}
|
||||
|
||||
|
||||
public static final String NAME = "name";
|
||||
public static final String NUMBER = "number";
|
||||
|
||||
private List<Contact> getSIMContacts() {
|
||||
getAll();
|
||||
List<Contact> contactList = new ArrayList<>();
|
||||
ContentResolver resolver = getContentResolver();
|
||||
// 获取Sims卡联系人
|
||||
Uri uri = Uri.parse("content://icc/adn");
|
||||
Cursor phoneCursor = resolver.query(uri, null, null, null, null);
|
||||
if (phoneCursor != null) {
|
||||
int colName = phoneCursor.getColumnIndex(NAME);
|
||||
int colNumber = phoneCursor.getColumnIndex(NUMBER);
|
||||
while (phoneCursor.moveToNext()) {
|
||||
String number = phoneCursor.getString(colNumber);
|
||||
// 当手机号码为空的或者为空字段 跳过当前循环
|
||||
String username = phoneCursor.getString(colName);
|
||||
long id = phoneCursor.getLong(phoneCursor.getColumnIndex("_id"));
|
||||
Log.e(TAG, "getSIMContacts: number = " + number + " username = " + username + " _id = " + id);
|
||||
Contact contact = new Contact(username, number, true);
|
||||
contact.setId(id);
|
||||
contactList.add(contact);
|
||||
}
|
||||
phoneCursor.close();
|
||||
}
|
||||
return contactList;
|
||||
}
|
||||
|
||||
private void getAll() {
|
||||
ContentResolver resolver = getContentResolver();
|
||||
Cursor adnCursor = resolver.query(Uri.parse("content://icc/adn/subId/0"), null, null, null, null);
|
||||
for (String columnName : adnCursor.getColumnNames()) {
|
||||
Log.d("CursorFields: adnCursor ", columnName);
|
||||
}
|
||||
Cursor rawContactsCursor = resolver.query(Uri.parse("content://com.android.contacts/raw_contacts"), null, null, null, null);
|
||||
for (String columnName : rawContactsCursor.getColumnNames()) {
|
||||
Log.d("CursorFields: rawContactsCursor ", columnName);
|
||||
}
|
||||
Cursor dataCursor = resolver.query(Uri.parse("content://com.android.contacts/data"), null, null, null, null);
|
||||
for (String columnName : dataCursor.getColumnNames()) {
|
||||
Log.d("CursorFields: dataCursor ", columnName);
|
||||
}
|
||||
}
|
||||
|
||||
private EditContactDialog mEditContactDialog;
|
||||
|
||||
private void showDialog(Contact contact) {
|
||||
if (mEditContactDialog == null) {
|
||||
mEditContactDialog = new EditContactDialog(ContactActivity.this);
|
||||
}
|
||||
if (contact.isSimContact()) {
|
||||
mEditContactDialog.setHideDelete(true);
|
||||
} else {
|
||||
mEditContactDialog.setHideDelete(false);
|
||||
}
|
||||
mEditContactDialog
|
||||
.setPhoneNumber(contact.getMobile())
|
||||
.setOnClickBottomListener(new EditContactDialog.OnClickBottomListener() {
|
||||
@Override
|
||||
public void onEditClick() {
|
||||
Intent intent = new Intent(ContactActivity.this, EditContactActivity.class);
|
||||
intent.putExtra("Contact", contact);
|
||||
startActivity(intent);
|
||||
mEditContactDialog.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeleteClick() {
|
||||
if (contact.isSimContact()) {
|
||||
// deleteSimContact(contact.getId());
|
||||
} else {
|
||||
mViewModel.deleteContact(contact);
|
||||
}
|
||||
mEditContactDialog.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
mEditContactDialog.dismiss();
|
||||
}
|
||||
});
|
||||
Window window = mEditContactDialog.getWindow();
|
||||
window.setGravity(Gravity.BOTTOM);
|
||||
mEditContactDialog.show();
|
||||
}
|
||||
|
||||
public class BtnClick {
|
||||
public void exit(View view) {
|
||||
finish();
|
||||
}
|
||||
|
||||
public void add(View view) {
|
||||
boolean disableModify = mMMKV.decodeBool(CommonConfig.DISABLE_CONTACT_MODIFY, false);
|
||||
if (disableModify) {
|
||||
Toaster.showLong("已禁用联系人修改");
|
||||
} else {
|
||||
Intent intent = new Intent(ContactActivity.this, AddWechatContactActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
package com.xxpatx.os.activity.contact;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
import com.trello.rxlifecycle4.RxLifecycle;
|
||||
import com.trello.rxlifecycle4.android.ActivityEvent;
|
||||
import com.xxpatx.os.base.mvvm.BaseViewModel;
|
||||
import com.xxpatx.os.bean.BaseResponse;
|
||||
import com.xxpatx.os.bean.Contact;
|
||||
import com.xxpatx.os.config.CommonConfig;
|
||||
import com.xxpatx.os.databinding.ActivityContactBinding;
|
||||
import com.xxpatx.os.gson.GsonUtils;
|
||||
import com.xxpatx.os.network.NetInterfaceManager;
|
||||
import com.xxpatx.os.network.UrlAddress;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
|
||||
public class ContactViewModel extends BaseViewModel<ActivityContactBinding, ActivityEvent> {
|
||||
private static final String TAG = "ContactViewModel";
|
||||
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||
|
||||
@Override
|
||||
public ActivityContactBinding getVDBinding() {
|
||||
return binding;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
|
||||
}
|
||||
|
||||
private MutableLiveData<List<Contact>> mContactListData = new MutableLiveData<>();
|
||||
|
||||
public MutableLiveData<List<Contact>> getContactListData() {
|
||||
return mContactListData;
|
||||
}
|
||||
|
||||
public void getCacheContact() {
|
||||
String jsonString = mMMKV.getString(UrlAddress.GET_MAIL_LIST, null);
|
||||
Gson gson = new Gson();
|
||||
Type type = new TypeToken<List<Contact>>() {
|
||||
}.getType();
|
||||
if (!TextUtils.isEmpty(jsonString)) {
|
||||
List<Contact> contacts = gson.fromJson(jsonString, type);
|
||||
if (contacts != null) {
|
||||
mContactListData.setValue(contacts);
|
||||
}
|
||||
}
|
||||
getContact();
|
||||
}
|
||||
|
||||
public void getContact() {
|
||||
NetInterfaceManager.getInstance()
|
||||
.getContactListObservable()
|
||||
.compose(RxLifecycle.bindUntilEvent(getLifecycle(), ActivityEvent.DESTROY))
|
||||
.subscribe(new Observer<BaseResponse<List<Contact>>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e("getContactList", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse<List<Contact>> listBaseResponse) {
|
||||
Log.e("getContactList", "onNext: " + listBaseResponse);
|
||||
if (listBaseResponse.code == 200) {
|
||||
mMMKV.putString(UrlAddress.GET_MAIL_LIST, GsonUtils.toJSONString(listBaseResponse.data));
|
||||
mContactListData.setValue(listBaseResponse.data);
|
||||
} else {
|
||||
mMMKV.putString(UrlAddress.GET_MAIL_LIST, "");
|
||||
mContactListData.setValue(new ArrayList<>());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e("getContactList", "onError: " + e.getMessage());
|
||||
String jsonString = mMMKV.getString(UrlAddress.GET_MAIL_LIST, null);
|
||||
Gson gson = new Gson();
|
||||
Type type = new TypeToken<List<Contact>>() {
|
||||
}.getType();
|
||||
List<Contact> contacts = gson.fromJson(jsonString, type);
|
||||
if (contacts == null) {
|
||||
mContactListData.setValue(new ArrayList<>());
|
||||
} else {
|
||||
mContactListData.setValue(contacts);
|
||||
}
|
||||
onComplete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getContactList", "onComplete: ");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private MutableLiveData<BaseResponse> mDeleteData = new MutableLiveData<>();
|
||||
|
||||
public MutableLiveData<BaseResponse> getDeleteData() {
|
||||
return mDeleteData;
|
||||
}
|
||||
|
||||
public void deleteContact(Contact contact) {
|
||||
Log.e(TAG, "deleteContact: " + contact.getId());
|
||||
NetInterfaceManager.getInstance().getMailListDeleteObservable(contact.getId())
|
||||
.compose(RxLifecycle.bindUntilEvent(getLifecycle(), ActivityEvent.DESTROY))
|
||||
.subscribe(new Observer<BaseResponse>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e("deleteContact", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse baseResponse) {
|
||||
Log.e("deleteContact", "onNext: " + baseResponse);
|
||||
mDeleteData.setValue(baseResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e("deleteContact", "onError: " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("deleteContact", "onComplete: ");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@ import com.xxpatx.os.R;
|
||||
import com.xxpatx.os.activity.contact.AddWechatContactActivity;
|
||||
import com.xxpatx.os.activity.selectnumber.SelectNumberActivity;
|
||||
import com.xxpatx.os.bean.Contact;
|
||||
import com.xxpatx.os.utils.GlideLoadUtils;
|
||||
import com.xxpatx.os.utils.Utils;
|
||||
|
||||
import java.util.List;
|
||||
@@ -133,7 +134,8 @@ public class ContactAdapter extends RecyclerView.Adapter<ContactAdapter.ContactH
|
||||
contactHolder.cl_contact.setVisibility(View.VISIBLE);
|
||||
contactHolder.iv_head2.setVisibility(View.GONE);
|
||||
contactHolder.tv_phone.setText(contact.getMobile());
|
||||
Glide.with(contactHolder.iv_head).load(contact.getAvatar()).error(R.drawable.default_avatar).into(contactHolder.iv_head);
|
||||
GlideLoadUtils.getInstance().glideLoad(mContext, contact.getAvatar(), contactHolder.iv_head, R.drawable.default_avatar);
|
||||
// Glide.with(contactHolder.iv_head).load(contact.getAvatar()).error(R.drawable.default_avatar).into(contactHolder.iv_head);
|
||||
}
|
||||
// int index = position % 3;
|
||||
// switch (index) {
|
||||
|
||||
@@ -15,10 +15,12 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.hjq.toast.Toaster;
|
||||
import com.xxpatx.os.R;
|
||||
import com.xxpatx.os.activity.contact.ContactActivity;
|
||||
import com.xxpatx.os.activity.service.ServiceActivity;
|
||||
import com.xxpatx.os.bean.DailyAppBean;
|
||||
import com.xxpatx.os.config.CommonConfig;
|
||||
import com.xxpatx.os.dialog.DailyAppDialog;
|
||||
import com.xxpatx.os.manager.AppManager;
|
||||
import com.xxpatx.os.manager.AppStatusManager;
|
||||
import com.xxpatx.os.service.NotificationService;
|
||||
import com.xxpatx.os.utils.ApkUtils;
|
||||
@@ -49,9 +51,12 @@ public class DailyAppAdapter extends RecyclerView.Adapter<DailyAppAdapter.Holder
|
||||
DailyAppBean dailyAppBean = mDailyAppBeans.get(position);
|
||||
String packageName = dailyAppBean.getPackageName();
|
||||
switch (packageName) {
|
||||
case "xxpatx.os.service":
|
||||
case AppManager.SERVICE_PACKAGE:
|
||||
holder.iv_icon.setImageDrawable(mContext.getDrawable(R.drawable.icon_wechat_service));
|
||||
break;
|
||||
case AppManager.CONTACT_PACKAGE:
|
||||
holder.iv_icon.setImageDrawable(mContext.getDrawable(R.drawable.com_android_contacts));
|
||||
break;
|
||||
default:
|
||||
holder.iv_icon.setImageDrawable(dailyAppBean.getIcon(mContext));
|
||||
}
|
||||
@@ -67,9 +72,12 @@ public class DailyAppAdapter extends RecyclerView.Adapter<DailyAppAdapter.Holder
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
switch (packageName) {
|
||||
case "xxpatx.os.service":
|
||||
case AppManager.SERVICE_PACKAGE:
|
||||
mContext.startActivity(new Intent(mContext, ServiceActivity.class));
|
||||
break;
|
||||
case AppManager.CONTACT_PACKAGE:
|
||||
mContext.startActivity(new Intent(mContext, ContactActivity.class));
|
||||
break;
|
||||
default:
|
||||
ApkUtils.openPackage(mContext, packageName, dailyAppBean.getClassName());
|
||||
AppUsedTimeUtils.getInstance().setAppPackageName(packageName);
|
||||
|
||||
@@ -61,7 +61,9 @@ public class WechatContactAdapter extends RecyclerView.Adapter<WechatContactAdap
|
||||
Contact contact = mContactList.get(position);
|
||||
contactHolder.tv_name.setText(contact.getName());
|
||||
contactHolder.tv_phone.setText(contact.getMobile());
|
||||
|
||||
Glide.with(contactHolder.iv_head).load(contact.getAvatar()).error(R.drawable.default_avatar).into(contactHolder.iv_head);
|
||||
|
||||
switch (position % 6) {
|
||||
case 0:
|
||||
contactHolder.iv_bg.setImageDrawable(mContext.getDrawable(R.drawable.contact_card_backround1));
|
||||
|
||||
@@ -98,8 +98,10 @@ public class DesktopIcon implements Serializable, Parcelable {
|
||||
switch (mPackage) {
|
||||
case AppManager.ADD_NAME:
|
||||
return context.getDrawable(R.drawable.home_icon_add);
|
||||
case "xxpatx.os.service":
|
||||
case AppManager.SERVICE_PACKAGE:
|
||||
return context.getDrawable(R.drawable.icon_wechat_service);
|
||||
case AppManager.CONTACT_PACKAGE:
|
||||
return context.getDrawable(R.drawable.com_android_contacts);
|
||||
case "aios.daily.app":
|
||||
return context.getDrawable(R.drawable.icon_daily_app);
|
||||
case "aios.appstore":
|
||||
|
||||
130
app/src/main/java/com/xxpatx/os/config/MyGlideModule.java
Normal file
130
app/src/main/java/com/xxpatx/os/config/MyGlideModule.java
Normal file
@@ -0,0 +1,130 @@
|
||||
package com.xxpatx.os.config;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.GlideBuilder;
|
||||
import com.bumptech.glide.Registry;
|
||||
import com.bumptech.glide.integration.okhttp3.OkHttpUrlLoader;
|
||||
import com.bumptech.glide.load.engine.cache.DiskLruCacheFactory;
|
||||
import com.bumptech.glide.load.model.GlideUrl;
|
||||
import com.bumptech.glide.module.AppGlideModule;
|
||||
import com.xxpatx.os.utils.Utils;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.net.ssl.HostnameVerifier;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.SSLSession;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
import javax.net.ssl.TrustManager;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
|
||||
/**
|
||||
* Created by Administrator on 2017/2/9.
|
||||
*/
|
||||
@com.bumptech.glide.annotation.GlideModule
|
||||
public class MyGlideModule extends AppGlideModule {
|
||||
@Override
|
||||
public void applyOptions(final Context context, GlideBuilder builder) {
|
||||
// 设置图片的显示格式 低内存时降低图片质量
|
||||
// ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
|
||||
// if (activityManager != null){
|
||||
// ActivityManager.MemoryInfo memoryInfo = new ActivityManager.MemoryInfo();
|
||||
// activityManager.getMemoryInfo(memoryInfo);
|
||||
// builder.setDecodeFormat(memoryInfo.lowMemory ? DecodeFormat.PREFER_RGB_565 : DecodeFormat.PREFER_ARGB_8888);
|
||||
// }
|
||||
// builder.setDecodeFormat(DecodeFormat.PREFER_RGB_565);
|
||||
//设置磁盘缓存目录(和创建的缓存目录相同)
|
||||
String downloadDirectoryPath = Utils.getCacheDir(context);
|
||||
//设置缓存的大小为100M
|
||||
int cacheSize = 100 * 1024 * 1024;
|
||||
builder.setDiskCache(
|
||||
new DiskLruCacheFactory(downloadDirectoryPath, cacheSize));
|
||||
}
|
||||
|
||||
/**
|
||||
* 清单解析的开启
|
||||
* <p>
|
||||
* 这里不开启,避免添加相同的modules两次
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean isManifestParsingEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void registerComponents(Context context, Glide glide, Registry registry) {
|
||||
//设置请求方式为okhttp 并设置okhttpClient的证书及超时时间
|
||||
OkHttpUrlLoader.Factory factory = new OkHttpUrlLoader.Factory(UnsafeOkHttpClient.getUnsafeOkHttpClient());
|
||||
registry.replace(GlideUrl.class, InputStream.class, factory);
|
||||
}
|
||||
|
||||
//自定义工具类修改OkHttpClient证书和超时时间
|
||||
static class UnsafeOkHttpClient {
|
||||
public static OkHttpClient getUnsafeOkHttpClient() {
|
||||
try {
|
||||
// Create a trust manager that does not validate certificate chains
|
||||
final TrustManager[] trustAllCerts = new TrustManager[]{
|
||||
new X509TrustManager() {
|
||||
@Override
|
||||
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
|
||||
return new java.security.cert.X509Certificate[]{};
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Install the all-trusting trust manager
|
||||
final SSLContext sslContext = SSLContext.getInstance("SSL");
|
||||
sslContext.init(null, trustAllCerts, new java.security.SecureRandom());
|
||||
|
||||
// Create an ssl socket factory with our all-trusting manager
|
||||
final SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();
|
||||
|
||||
OkHttpClient.Builder builder = new OkHttpClient.Builder();
|
||||
builder.sslSocketFactory(sslSocketFactory, (X509TrustManager) trustAllCerts[0]);
|
||||
builder.hostnameVerifier(new HostnameVerifier() {
|
||||
@Override
|
||||
public boolean verify(String hostname, SSLSession session) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
builder.connectTimeout(20, TimeUnit.SECONDS);
|
||||
builder.readTimeout(20, TimeUnit.SECONDS);
|
||||
builder.writeTimeout(20, TimeUnit.SECONDS);
|
||||
|
||||
OkHttpClient okHttpClient = builder.build();
|
||||
return okHttpClient;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 禁止解析Manifest文件
|
||||
* 主要针对V3升级到v4的用户,可以提升初始化速度,避免一些潜在错误
|
||||
* @return
|
||||
*/
|
||||
/* @Override
|
||||
public boolean isManifestParsingEnabled() {
|
||||
return false;
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.trello.rxlifecycle4.RxLifecycle;
|
||||
import com.trello.rxlifecycle4.android.FragmentEvent;
|
||||
import com.xxpatx.os.BuildConfig;
|
||||
import com.xxpatx.os.R;
|
||||
import com.xxpatx.os.activity.contact.ContactActivity;
|
||||
import com.xxpatx.os.activity.dailyapp.DailyAppActivity;
|
||||
import com.xxpatx.os.activity.screenlock.ScreenLockActivity;
|
||||
import com.xxpatx.os.activity.service.ServiceActivity;
|
||||
@@ -252,9 +253,12 @@ public class AppListFragment extends BaseFragment {
|
||||
return;
|
||||
}
|
||||
switch (desktopIcon.getPackage()) {
|
||||
case "xxpatx.os.service":
|
||||
case AppManager.SERVICE_PACKAGE:
|
||||
startActivity(new Intent(mContext, ServiceActivity.class));
|
||||
break;
|
||||
case AppManager.CONTACT_PACKAGE:
|
||||
startActivity(new Intent(mContext, ContactActivity.class));
|
||||
break;
|
||||
case "aios.daily.app":
|
||||
startActivity(new Intent(mContext, DailyAppActivity.class));
|
||||
break;
|
||||
|
||||
@@ -32,6 +32,11 @@ public class AppManager {
|
||||
private static final String SHOW_PACKAGE_KEY = "SHOW_PACKAGE_KEY";
|
||||
private static final String ADD_PACKAGE_KEY = "ADD_PACKAGE_KEY";
|
||||
|
||||
/*客服中心 自定义包名*/
|
||||
public static final String SERVICE_PACKAGE = "xxpatx.os.service";
|
||||
/*联系人 自定义包名*/
|
||||
public static final String CONTACT_PACKAGE = "xxpatx.os.contact";
|
||||
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
private static AppManager sInstance;
|
||||
private Context mContext;
|
||||
|
||||
@@ -120,8 +120,13 @@ public class AppStatusManager {
|
||||
dailyAppBeanList.add(appSelectBean);
|
||||
}
|
||||
}
|
||||
if (hidedAppSet.contains("xxpatx.os.service")) {
|
||||
DailyAppBean serviceIcon = new DailyAppBean("客服中心", "xxpatx.os.service");
|
||||
if (hidedAppSet.contains(AppManager.CONTACT_PACKAGE)) {
|
||||
DailyAppBean contactIcon = new DailyAppBean("联系人", AppManager.CONTACT_PACKAGE);
|
||||
dailyAppBeanList.add(0, contactIcon);
|
||||
}
|
||||
|
||||
if (hidedAppSet.contains(AppManager.SERVICE_PACKAGE)) {
|
||||
DailyAppBean serviceIcon = new DailyAppBean("客服中心", AppManager.SERVICE_PACKAGE);
|
||||
dailyAppBeanList.add(0, serviceIcon);
|
||||
}
|
||||
|
||||
|
||||
@@ -203,7 +203,11 @@ public class WeAccessibilityService extends AccessibilityService {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
intent.setComponent(cmp);
|
||||
startActivity(intent);
|
||||
try {
|
||||
startActivity(intent);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "launchWeChat: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private boolean step(Property type, String text, Step nextStep) {
|
||||
|
||||
@@ -431,13 +431,20 @@ public class ApkUtils {
|
||||
}
|
||||
}
|
||||
|
||||
if (!AppStatusManager.getInstance().getHidedAppSet().contains("xxpatx.os.service")) {
|
||||
if (!AppStatusManager.getInstance().getHidedAppSet().contains(AppManager.SERVICE_PACKAGE)) {
|
||||
DesktopIcon dailyIcon = new DesktopIcon();
|
||||
dailyIcon.setTitle("客服中心");
|
||||
dailyIcon.setPackage("xxpatx.os.service");
|
||||
dailyIcon.setPackage(AppManager.SERVICE_PACKAGE);
|
||||
desktopIcons.add(0, dailyIcon);
|
||||
}
|
||||
|
||||
if (!AppStatusManager.getInstance().getHidedAppSet().contains(AppManager.CONTACT_PACKAGE)) {
|
||||
DesktopIcon contactIcon = new DesktopIcon();
|
||||
contactIcon.setTitle("联系人");
|
||||
contactIcon.setPackage(AppManager.CONTACT_PACKAGE);
|
||||
desktopIcons.add(1, contactIcon);
|
||||
}
|
||||
|
||||
List<ShortcutPkgInfo> shortcutPkgInfos = ShortcutUtils.getInstance().getShortcutList();
|
||||
desktopIcons.addAll(shortcutPkgInfos);
|
||||
|
||||
|
||||
@@ -3,13 +3,19 @@ package com.xxpatx.os.utils;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.DataSource;
|
||||
import com.bumptech.glide.load.engine.GlideException;
|
||||
import com.bumptech.glide.request.RequestListener;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -41,13 +47,25 @@ public class GlideLoadUtils {
|
||||
* Glide 加载 简单判空封装 防止异步加载数据时调用Glide 抛出异常
|
||||
*
|
||||
* @param context
|
||||
* @param url 加载图片的url地址 String
|
||||
* @param imageView 加载图片的ImageView 控件
|
||||
* @param url 加载图片的url地址 String
|
||||
* @param imageView 加载图片的ImageView 控件
|
||||
* @param defaultImage 图片展示错误的本地图片 id
|
||||
*/
|
||||
public void glideLoad(Context context, String url, ImageView imageView, int defaultImage) {
|
||||
if (context != null) {
|
||||
Glide.with(context).load(url).error(defaultImage).into(imageView);
|
||||
Glide.with(context).load(url).listener(new RequestListener<Drawable>() {
|
||||
@Override
|
||||
public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
|
||||
Log.e(TAG, "onLoadFailed: " + e.getMessage());
|
||||
Log.e(TAG, "onLoadFailed: " + url);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) {
|
||||
return false;
|
||||
}
|
||||
}).error(defaultImage).into(imageView);
|
||||
} else {
|
||||
Log.i(TAG, "Picture loading failed,context is null");
|
||||
}
|
||||
|
||||
@@ -366,4 +366,22 @@ public class Utils {
|
||||
String meid = telephonyManager.getDeviceId();
|
||||
return meid;
|
||||
}
|
||||
|
||||
public static String getCacheDir(Context context) {
|
||||
String cachePath;
|
||||
if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())
|
||||
|| !Environment.isExternalStorageRemovable()) {
|
||||
if (context.getExternalCacheDir() != null) {
|
||||
cachePath = context.getExternalCacheDir().getPath();
|
||||
} else if (context.getExternalFilesDir("cache") != null) {
|
||||
cachePath = context.getExternalFilesDir("cache").getPath();
|
||||
} else {
|
||||
cachePath = context.getCacheDir().getPath();
|
||||
}
|
||||
} else {
|
||||
cachePath = context.getCacheDir().getPath();
|
||||
}
|
||||
return cachePath;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 13 KiB |
@@ -17,9 +17,9 @@
|
||||
android:background="#FAF8F8">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout3"
|
||||
android:id="@+id/cl_exit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="@drawable/general_setting_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -27,9 +27,9 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_cancel"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:onClick="@{click::exit}"
|
||||
android:scaleType="centerInside"
|
||||
@@ -50,16 +50,14 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/constraintLayout3">
|
||||
app:layout_constraintBottom_toTopOf="@+id/cl_bottom"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cl_exit"
|
||||
tools:layout_editor_absoluteX="16dp">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
@@ -397,5 +395,11 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
120
app/src/main/res/layout/activity_contact.xml
Normal file
120
app/src/main/res/layout/activity_contact.xml
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".activity.contact.ContactActivity">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="com.xxpatx.os.activity.contact.ContactActivity.BtnClick" />
|
||||
</data>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_exit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:background="@drawable/general_setting_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_cancel"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:onClick="@{click::exit}"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/add_contact_back"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="联系人"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="22sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="#FAF8F8"
|
||||
app:layout_constraintBottom_toTopOf="@+id/constraintLayout17"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cl_exit">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_contact"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:listitem="@layout/item_contact" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout17"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
android:layout_weight="2"
|
||||
android:background="@drawable/contact_add_contact_bg"
|
||||
android:onClick="@{click::add}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/cl_bottom">
|
||||
|
||||
<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">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="加人"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="30sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView11"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
@@ -24,7 +24,7 @@
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/back_white"
|
||||
@@ -88,5 +88,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -77,8 +77,6 @@
|
||||
android:id="@+id/rv_contact"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
tools:listitem="@layout/item_contact"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
Reference in New Issue
Block a user