Initial commit
This commit is contained in:
186
sources/com/ubt/jimu/user/view/AddressActivity.java
Normal file
186
sources/com/ubt/jimu/user/view/AddressActivity.java
Normal file
@@ -0,0 +1,186 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import butterknife.ButterKnife;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.cache.Cache;
|
||||
import com.ubt.jimu.base.dialog.JimuSimpleDialog;
|
||||
import com.ubt.jimu.base.entities.AddressInfo;
|
||||
import com.ubt.jimu.base.http.ApiResultException;
|
||||
import com.ubt.jimu.base.http.IApiObserver;
|
||||
import com.ubt.jimu.user.repository.UserRepository;
|
||||
import com.ubt.jimu.utils.RxSchedulers;
|
||||
import com.ubt.jimu.widgets.ClearEditText;
|
||||
import com.ubt.jimu.widgets.NavigationBarView;
|
||||
import io.reactivex.disposables.CompositeDisposable;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class AddressActivity extends BaseActivity {
|
||||
private AddressInfo a = null;
|
||||
private CompositeDisposable b = new CompositeDisposable();
|
||||
EditText et_detail;
|
||||
ClearEditText nameEditText;
|
||||
NavigationBarView navBarView;
|
||||
ClearEditText telephoneEditText;
|
||||
|
||||
private void D0() {
|
||||
JimuSimpleDialog.buildSimpleDialog(this, getString(R.string.ok), getString(R.string.cancel), "", getString(R.string.activity_tip_quit_update_address), 17, new DialogInterface.OnClickListener() { // from class: com.ubt.jimu.user.view.b
|
||||
@Override // android.content.DialogInterface.OnClickListener
|
||||
public final void onClick(DialogInterface dialogInterface, int i) {
|
||||
dialogInterface.dismiss();
|
||||
}
|
||||
}, new DialogInterface.OnClickListener() { // from class: com.ubt.jimu.user.view.a
|
||||
@Override // android.content.DialogInterface.OnClickListener
|
||||
public final void onClick(DialogInterface dialogInterface, int i) {
|
||||
AddressActivity.this.a(dialogInterface, i);
|
||||
}
|
||||
}).show();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public boolean E0() {
|
||||
if (!G0()) {
|
||||
return false;
|
||||
}
|
||||
D0();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void F0() {
|
||||
UserRepository.c(Cache.getInstance().getLoginUserIntId()).compose(RxSchedulers.a()).subscribe(new IApiObserver<AddressInfo>(this) { // from class: com.ubt.jimu.user.view.AddressActivity.2
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver, io.reactivex.Observer
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onNext(AddressInfo addressInfo) {
|
||||
super.onNext(addressInfo);
|
||||
AddressActivity.this.a = addressInfo;
|
||||
if (addressInfo != null) {
|
||||
AddressActivity.this.nameEditText.setText(addressInfo.getAddressee());
|
||||
if (!TextUtils.isEmpty(AddressActivity.this.nameEditText.getText())) {
|
||||
ClearEditText clearEditText = AddressActivity.this.nameEditText;
|
||||
clearEditText.setSelection(clearEditText.getText().length());
|
||||
}
|
||||
AddressActivity.this.telephoneEditText.setText(addressInfo.getContactInfo());
|
||||
AddressActivity.this.et_detail.setText(addressInfo.getAddress());
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver
|
||||
public void onApiError(ApiResultException apiResultException) {
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver, io.reactivex.Observer
|
||||
public void onSubscribe(Disposable disposable) {
|
||||
super.onSubscribe(disposable);
|
||||
AddressActivity.this.b.b(disposable);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private boolean G0() {
|
||||
String obj = this.nameEditText.getText().toString();
|
||||
String obj2 = this.et_detail.getText().toString();
|
||||
String obj3 = this.telephoneEditText.getText().toString();
|
||||
AddressInfo addressInfo = this.a;
|
||||
return addressInfo == null ? (TextUtils.isEmpty(obj) && TextUtils.isEmpty(obj2) && TextUtils.isEmpty(obj3)) ? false : true : a(addressInfo.getAddress(), obj2) || a(this.a.getContactInfo(), obj3) || a(this.a.getAddressee(), obj);
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
this.navBarView.setRightIcon(R.drawable.ic_nav_finish);
|
||||
this.navBarView.setListener(new NavigationBarView.OnActionClickListener.Stub() { // from class: com.ubt.jimu.user.view.AddressActivity.1
|
||||
@Override // com.ubt.jimu.widgets.NavigationBarView.OnActionClickListener.Stub
|
||||
public void onLeftClick(View view) {
|
||||
if (AddressActivity.this.E0()) {
|
||||
return;
|
||||
}
|
||||
super.onLeftClick(view);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.widgets.NavigationBarView.OnActionClickListener.Stub
|
||||
public void onRightClick(View view) {
|
||||
AddressActivity.this.onConfirmAction(view);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void start(Context context) {
|
||||
context.startActivity(new Intent(context, (Class<?>) AddressActivity.class));
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
public void onBackPressed() {
|
||||
if (E0()) {
|
||||
return;
|
||||
}
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
public void onConfirmAction(View view) {
|
||||
String trim = this.nameEditText.getText().toString().trim();
|
||||
String trim2 = this.telephoneEditText.getText().toString().trim();
|
||||
String trim3 = this.et_detail.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(trim)) {
|
||||
toastError(getString(R.string.error_empty_addressee));
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(trim2)) {
|
||||
toastError(getString(R.string.error_empty_phone));
|
||||
} else if (TextUtils.isEmpty(trim3)) {
|
||||
toastError(getString(R.string.error_empty_detail_test));
|
||||
} else {
|
||||
UserRepository.b(trim3, trim, trim2).compose(RxSchedulers.a()).subscribe(new IApiObserver<String>(this) { // from class: com.ubt.jimu.user.view.AddressActivity.3
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver, io.reactivex.Observer
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onNext(String str) {
|
||||
super.onNext(str);
|
||||
AddressActivity addressActivity = AddressActivity.this;
|
||||
addressActivity.toastSuccess(addressActivity.getString(R.string.update_success));
|
||||
AddressActivity.this.finish();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver
|
||||
public void onApiError(ApiResultException apiResultException) {
|
||||
AddressActivity.this.toastError(apiResultException.getMessage());
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver, io.reactivex.Observer
|
||||
public void onSubscribe(Disposable disposable) {
|
||||
super.onSubscribe(disposable);
|
||||
AddressActivity.this.b.b(disposable);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_address);
|
||||
ButterKnife.a(this);
|
||||
initView();
|
||||
F0();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
this.b.dispose();
|
||||
this.b.a();
|
||||
}
|
||||
|
||||
private boolean a(String str, String str2) {
|
||||
return str == null || !str.equals(str2);
|
||||
}
|
||||
|
||||
public /* synthetic */ void a(DialogInterface dialogInterface, int i) {
|
||||
dialogInterface.dismiss();
|
||||
finish();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.widgets.ClearEditText;
|
||||
import com.ubt.jimu.widgets.NavigationBarView;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class AddressActivity_ViewBinding implements Unbinder {
|
||||
private AddressActivity b;
|
||||
|
||||
public AddressActivity_ViewBinding(AddressActivity addressActivity, View view) {
|
||||
this.b = addressActivity;
|
||||
addressActivity.nameEditText = (ClearEditText) Utils.b(view, R.id.nameEditText, "field 'nameEditText'", ClearEditText.class);
|
||||
addressActivity.telephoneEditText = (ClearEditText) Utils.b(view, R.id.telephoneEditText, "field 'telephoneEditText'", ClearEditText.class);
|
||||
addressActivity.et_detail = (EditText) Utils.b(view, R.id.et_detail, "field 'et_detail'", EditText.class);
|
||||
addressActivity.navBarView = (NavigationBarView) Utils.b(view, R.id.nbv_bar, "field 'navBarView'", NavigationBarView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
AddressActivity addressActivity = this.b;
|
||||
if (addressActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
addressActivity.nameEditText = null;
|
||||
addressActivity.telephoneEditText = null;
|
||||
addressActivity.et_detail = null;
|
||||
addressActivity.navBarView = null;
|
||||
}
|
||||
}
|
||||
235
sources/com/ubt/jimu/user/view/CollectionActivity.java
Normal file
235
sources/com/ubt/jimu/user/view/CollectionActivity.java
Normal file
@@ -0,0 +1,235 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import butterknife.ButterKnife;
|
||||
import com.recyclelib.URecyclerView;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.cache.Cache;
|
||||
import com.ubt.jimu.base.entities.CollectionEntities;
|
||||
import com.ubt.jimu.base.http.ApiObserver;
|
||||
import com.ubt.jimu.base.http.manager.CommunityManager;
|
||||
import com.ubt.jimu.controller.data.widget.JockstickDataConverter;
|
||||
import com.ubt.jimu.course.view.GridItemDecoration;
|
||||
import com.ubt.jimu.user.view.CollectionActivity;
|
||||
import com.ubt.jimu.user.view.adapter.CollectionAdapter;
|
||||
import com.ubt.jimu.utils.TextUtils;
|
||||
import com.ubt.jimu.widgets.LoadingView;
|
||||
import com.ubt.jimu.widgets.TitleView;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class CollectionActivity extends BaseActivity {
|
||||
private ApiObserver<CollectionEntities> a;
|
||||
private CollectionAdapter b;
|
||||
private List<CollectionEntities.RecordsBean> d;
|
||||
private String e;
|
||||
LoadingView loading;
|
||||
TitleView title;
|
||||
TextView tvCollectionDelete;
|
||||
URecyclerView urCollection;
|
||||
LinearLayout xlDelete;
|
||||
private Handler c = new Handler();
|
||||
public boolean f = false;
|
||||
private int g = 1;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
/* renamed from: F0, reason: merged with bridge method [inline-methods] */
|
||||
public void D0() {
|
||||
this.f = !this.f;
|
||||
if (this.f) {
|
||||
this.title.setTitleRight(R.mipmap.my_collection_completed);
|
||||
this.b.setEdit(true);
|
||||
this.xlDelete.setVisibility(0);
|
||||
} else {
|
||||
this.title.setTitleRight(R.mipmap.my_collection_edit);
|
||||
this.b.setEdit(false);
|
||||
this.xlDelete.setVisibility(8);
|
||||
}
|
||||
this.b.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public void G0() {
|
||||
if (Cache.getInstance().getUserId().equals(this.e)) {
|
||||
this.title.setTitleRight(R.mipmap.my_collection_edit);
|
||||
this.title.setOnRightListner(new TitleView.OnRightListener() { // from class: com.ubt.jimu.user.view.e
|
||||
@Override // com.ubt.jimu.widgets.TitleView.OnRightListener
|
||||
public final void a() {
|
||||
CollectionActivity.this.D0();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void bindClick() {
|
||||
this.xlDelete.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.CollectionActivity.1
|
||||
@Override // android.view.View.OnClickListener
|
||||
public void onClick(View view) {
|
||||
CollectionActivity.this.D0();
|
||||
CollectionActivity.this.b.a();
|
||||
CollectionActivity collectionActivity = CollectionActivity.this;
|
||||
collectionActivity.tvCollectionDelete.setText(TextUtils.a(0, collectionActivity.getString(R.string.collection_delete).length(), CollectionActivity.this.getString(R.string.collection_delete)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
static /* synthetic */ int d(CollectionActivity collectionActivity) {
|
||||
int i = collectionActivity.g;
|
||||
collectionActivity.g = i + 1;
|
||||
return i;
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
this.tvCollectionDelete.setText(TextUtils.a(0, getString(R.string.collection_delete).length(), getString(R.string.collection_delete)));
|
||||
this.e = getIntent().getStringExtra(JockstickDataConverter.ID);
|
||||
if (Cache.getInstance().getUserId().equals(this.e)) {
|
||||
this.title.setTitleText(getString(R.string.user_my_collection));
|
||||
} else {
|
||||
this.title.setTitleText(getString(R.string.user_his_collection));
|
||||
this.title.findViewById(R.id.img_right).setVisibility(8);
|
||||
}
|
||||
this.d = new ArrayList();
|
||||
this.b = new CollectionAdapter(this, this.d);
|
||||
this.urCollection.setLayoutManager(new GridLayoutManager(this, 4));
|
||||
int dimensionPixelOffset = getResources().getDimensionPixelOffset(R.dimen.user_center_collection_item_margin);
|
||||
this.urCollection.a(new GridItemDecoration(getResources().getDimensionPixelOffset(R.dimen.user_center_collection_item_margin_top), dimensionPixelOffset, 1));
|
||||
this.urCollection.setAdapter(this.b);
|
||||
this.urCollection.setLoadingMoreEnabled(true);
|
||||
this.a = new AnonymousClass2(this.loading);
|
||||
this.urCollection.setLoadingListener(new URecyclerView.LoadingListener() { // from class: com.ubt.jimu.user.view.CollectionActivity.3
|
||||
@Override // com.recyclelib.URecyclerView.LoadingListener
|
||||
public void onLoadingMore() {
|
||||
CollectionActivity.d(CollectionActivity.this);
|
||||
CollectionActivity.this.e(true);
|
||||
}
|
||||
|
||||
@Override // com.recyclelib.URecyclerView.LoadingListener
|
||||
public void onRefreshing() {
|
||||
CollectionActivity.this.g = 1;
|
||||
CollectionActivity.this.title.setTitleRight(R.mipmap.my_collection_edit);
|
||||
CollectionActivity.this.b.setEdit(false);
|
||||
CollectionActivity.this.xlDelete.setVisibility(8);
|
||||
CollectionActivity collectionActivity = CollectionActivity.this;
|
||||
collectionActivity.tvCollectionDelete.setText(TextUtils.a(0, collectionActivity.getString(R.string.collection_delete).length(), CollectionActivity.this.getString(R.string.collection_delete)));
|
||||
Iterator it = CollectionActivity.this.d.iterator();
|
||||
while (it.hasNext()) {
|
||||
((CollectionEntities.RecordsBean) it.next()).setSelect(false);
|
||||
}
|
||||
CollectionActivity.this.urCollection.setNoMore(false);
|
||||
CollectionActivity.this.e(true);
|
||||
}
|
||||
});
|
||||
e(false);
|
||||
loadComplete(this.urCollection, this.a);
|
||||
this.loading.setBackgroundViewColor(getResources().getColor(R.color.bg_F9F9F9));
|
||||
}
|
||||
|
||||
public void E0() {
|
||||
Iterator<CollectionEntities.RecordsBean> it = this.d.iterator();
|
||||
int i = 0;
|
||||
while (it.hasNext()) {
|
||||
if (it.next().isSelect()) {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
this.tvCollectionDelete.setText(String.format(getString(R.string.collection_deletes), String.valueOf(i)));
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_collection);
|
||||
ButterKnife.a(this);
|
||||
initData();
|
||||
bindClick();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
Handler handler = this.c;
|
||||
if (handler != null) {
|
||||
handler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
public void relayout() {
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public void e(boolean z) {
|
||||
this.a.refreshOrLoad(z);
|
||||
CommunityManager.create().collectionList(this.e, this.g, this.a);
|
||||
}
|
||||
|
||||
public static void a(Context context, long j) {
|
||||
Intent intent = new Intent(context, (Class<?>) CollectionActivity.class);
|
||||
intent.putExtra(JockstickDataConverter.ID, j + "");
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
/* renamed from: com.ubt.jimu.user.view.CollectionActivity$2, reason: invalid class name */
|
||||
class AnonymousClass2 extends ApiObserver<CollectionEntities> {
|
||||
AnonymousClass2(LoadingView loadingView) {
|
||||
super(loadingView);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.http.ApiObserver, io.reactivex.Observer
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onNext(CollectionEntities collectionEntities) {
|
||||
if (collectionEntities.getRecords() == null) {
|
||||
CollectionActivity.this.urCollection.setNoMore(true);
|
||||
CollectionActivity.this.c.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.d
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
CollectionActivity.AnonymousClass2.this.b();
|
||||
}
|
||||
}, 30L);
|
||||
return;
|
||||
}
|
||||
if (CollectionActivity.this.g == 1 && collectionEntities.getRecords().size() > 0) {
|
||||
CollectionActivity.this.d.clear();
|
||||
}
|
||||
CollectionActivity.this.d.addAll(collectionEntities.getRecords());
|
||||
CollectionActivity.this.b.notifyDataSetChanged();
|
||||
if (CollectionActivity.this.d.size() == 0) {
|
||||
CollectionActivity.this.c.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.c
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
CollectionActivity.AnonymousClass2.this.a();
|
||||
}
|
||||
}, 30L);
|
||||
} else {
|
||||
CollectionActivity.this.G0();
|
||||
}
|
||||
if (CollectionActivity.this.d.size() == collectionEntities.getTotal()) {
|
||||
CollectionActivity.this.urCollection.setNoMore(true);
|
||||
} else {
|
||||
CollectionActivity.this.urCollection.setNoMore(false);
|
||||
}
|
||||
}
|
||||
|
||||
public /* synthetic */ void b() {
|
||||
CollectionActivity.this.loading.h();
|
||||
CollectionActivity.this.loading.setServiceLoadingError(R.drawable.icon_favourate_empty);
|
||||
CollectionActivity.this.loading.setServiceTextError(R.string.loading_no_collection);
|
||||
}
|
||||
|
||||
public /* synthetic */ void a() {
|
||||
CollectionActivity.this.loading.h();
|
||||
CollectionActivity.this.loading.setServiceLoadingError(R.drawable.icon_favourate_empty);
|
||||
CollectionActivity.this.loading.setServiceTextError(R.string.loading_no_collection);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.recyclelib.URecyclerView;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.widgets.LoadingView;
|
||||
import com.ubt.jimu.widgets.TitleView;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class CollectionActivity_ViewBinding implements Unbinder {
|
||||
private CollectionActivity b;
|
||||
|
||||
public CollectionActivity_ViewBinding(CollectionActivity collectionActivity, View view) {
|
||||
this.b = collectionActivity;
|
||||
collectionActivity.title = (TitleView) Utils.b(view, R.id.title, "field 'title'", TitleView.class);
|
||||
collectionActivity.urCollection = (URecyclerView) Utils.b(view, R.id.ur_collection, "field 'urCollection'", URecyclerView.class);
|
||||
collectionActivity.loading = (LoadingView) Utils.b(view, R.id.loading, "field 'loading'", LoadingView.class);
|
||||
collectionActivity.xlDelete = (LinearLayout) Utils.b(view, R.id.xl_delete, "field 'xlDelete'", LinearLayout.class);
|
||||
collectionActivity.tvCollectionDelete = (TextView) Utils.b(view, R.id.tv_collection_delete, "field 'tvCollectionDelete'", TextView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
CollectionActivity collectionActivity = this.b;
|
||||
if (collectionActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
collectionActivity.title = null;
|
||||
collectionActivity.urCollection = null;
|
||||
collectionActivity.loading = null;
|
||||
collectionActivity.xlDelete = null;
|
||||
collectionActivity.tvCollectionDelete = null;
|
||||
}
|
||||
}
|
||||
209
sources/com/ubt/jimu/user/view/CountryCodeActivity.java
Normal file
209
sources/com/ubt/jimu/user/view/CountryCodeActivity.java
Normal file
@@ -0,0 +1,209 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.ButterKnife;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.entities.NSLocale;
|
||||
import com.ubt.jimu.user.view.adapter.CountryCodeAdapter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class CountryCodeActivity extends BaseActivity {
|
||||
private String a;
|
||||
private CountryCodeAdapter b;
|
||||
private List<NSLocale> c = new ArrayList();
|
||||
private Handler d = new Handler();
|
||||
RecyclerView recyclerView;
|
||||
|
||||
private void D0() {
|
||||
new Thread(new Runnable() { // from class: com.ubt.jimu.user.view.CountryCodeActivity.2
|
||||
/* JADX WARN: Code restructure failed: missing block: B:40:0x00db, code lost:
|
||||
|
||||
r0.close();
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:42:?, code lost:
|
||||
|
||||
return;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:43:0x00df, code lost:
|
||||
|
||||
r0 = move-exception;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:44:0x00e0, code lost:
|
||||
|
||||
r0.printStackTrace();
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:45:0x00e3, code lost:
|
||||
|
||||
return;
|
||||
*/
|
||||
@Override // java.lang.Runnable
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public void run() {
|
||||
/*
|
||||
r7 = this;
|
||||
r0 = 0
|
||||
com.ubt.jimu.user.view.CountryCodeActivity r1 = com.ubt.jimu.user.view.CountryCodeActivity.this // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
android.content.res.Resources r1 = r1.getResources() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
r2 = 2131755009(0x7f100001, float:1.9140885E38)
|
||||
java.io.InputStream r0 = r1.openRawResource(r2) // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
java.io.InputStreamReader r1 = new java.io.InputStreamReader // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
r1.<init>(r0) // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
r2 = 51200(0xc800, float:7.1746E-41)
|
||||
java.nio.CharBuffer r2 = java.nio.CharBuffer.allocate(r2) // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
int r1 = r1.read(r2) // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
if (r1 == 0) goto L23
|
||||
r2.flip() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
L23:
|
||||
com.ubt.jimu.user.view.CountryCodeActivity$2$1 r1 = new com.ubt.jimu.user.view.CountryCodeActivity$2$1 // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
r1.<init>(r7) // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
java.lang.reflect.Type r1 = r1.getType() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
com.google.gson.Gson r3 = new com.google.gson.Gson // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
r3.<init>() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
java.lang.String r2 = r2.toString() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
java.lang.Object r1 = r3.fromJson(r2, r1) // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
java.util.List r1 = (java.util.List) r1 // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
if (r1 == 0) goto Ld9
|
||||
int r2 = r1.size() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
if (r2 != 0) goto L45
|
||||
goto Ld9
|
||||
L45:
|
||||
java.util.Locale r2 = com.ubt.jimu.utils.LocaleUtils.e() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
java.lang.String r3 = r2.getLanguage() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
java.util.Locale r4 = java.util.Locale.CHINA // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
java.lang.String r4 = r4.getLanguage() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
boolean r3 = r3.equals(r4) // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
if (r3 == 0) goto L71
|
||||
java.util.Iterator r2 = r1.iterator() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
L5d:
|
||||
boolean r3 = r2.hasNext() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
if (r3 == 0) goto Lbc
|
||||
java.lang.Object r3 = r2.next() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
com.ubt.jimu.base.entities.NSLocale r3 = (com.ubt.jimu.base.entities.NSLocale) r3 // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
java.lang.String r4 = r3.getChineseName() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
r3.setName(r4) // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
goto L5d
|
||||
L71:
|
||||
java.lang.String r2 = r2.getLanguage() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
java.util.Locale r3 = java.util.Locale.ENGLISH // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
java.lang.String r3 = r3.getLanguage() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
boolean r2 = r2.equals(r3) // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
if (r2 == 0) goto L99
|
||||
java.util.Iterator r2 = r1.iterator() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
L85:
|
||||
boolean r3 = r2.hasNext() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
if (r3 == 0) goto Lbc
|
||||
java.lang.Object r3 = r2.next() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
com.ubt.jimu.base.entities.NSLocale r3 = (com.ubt.jimu.base.entities.NSLocale) r3 // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
java.lang.String r4 = r3.getName() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
r3.setName(r4) // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
goto L85
|
||||
L99:
|
||||
java.util.Iterator r2 = r1.iterator() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
L9d:
|
||||
boolean r3 = r2.hasNext() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
if (r3 == 0) goto Lbc
|
||||
java.lang.Object r3 = r2.next() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
com.ubt.jimu.base.entities.NSLocale r3 = (com.ubt.jimu.base.entities.NSLocale) r3 // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
java.util.Locale r4 = new java.util.Locale // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
java.lang.String r5 = ""
|
||||
java.lang.String r6 = r3.getCode() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
r4.<init>(r5, r6) // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
java.lang.String r4 = r4.getDisplayCountry() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
r3.setName(r4) // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
goto L9d
|
||||
Lbc:
|
||||
com.ubt.jimu.user.view.CountryCodeActivity r2 = com.ubt.jimu.user.view.CountryCodeActivity.this // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
java.util.List r2 = com.ubt.jimu.user.view.CountryCodeActivity.a(r2) // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
r2.addAll(r1) // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
com.ubt.jimu.user.view.CountryCodeActivity r1 = com.ubt.jimu.user.view.CountryCodeActivity.this // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
android.os.Handler r1 = com.ubt.jimu.user.view.CountryCodeActivity.c(r1) // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
com.ubt.jimu.user.view.CountryCodeActivity$2$2 r2 = new com.ubt.jimu.user.view.CountryCodeActivity$2$2 // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
r2.<init>() // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
r1.post(r2) // Catch: java.lang.Throwable -> Le4 java.lang.Exception -> Le6
|
||||
if (r0 == 0) goto Lf4
|
||||
r0.close() // Catch: java.lang.Exception -> Lf0
|
||||
goto Lf4
|
||||
Ld9:
|
||||
if (r0 == 0) goto Le3
|
||||
r0.close() // Catch: java.lang.Exception -> Ldf
|
||||
goto Le3
|
||||
Ldf:
|
||||
r0 = move-exception
|
||||
r0.printStackTrace()
|
||||
Le3:
|
||||
return
|
||||
Le4:
|
||||
r1 = move-exception
|
||||
goto Lf5
|
||||
Le6:
|
||||
r1 = move-exception
|
||||
r1.printStackTrace() // Catch: java.lang.Throwable -> Le4
|
||||
if (r0 == 0) goto Lf4
|
||||
r0.close() // Catch: java.lang.Exception -> Lf0
|
||||
goto Lf4
|
||||
Lf0:
|
||||
r0 = move-exception
|
||||
r0.printStackTrace()
|
||||
Lf4:
|
||||
return
|
||||
Lf5:
|
||||
if (r0 == 0) goto Lff
|
||||
r0.close() // Catch: java.lang.Exception -> Lfb
|
||||
goto Lff
|
||||
Lfb:
|
||||
r0 = move-exception
|
||||
r0.printStackTrace()
|
||||
Lff:
|
||||
throw r1
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.ubt.jimu.user.view.CountryCodeActivity.AnonymousClass2.run():void");
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
this.recyclerView.setLayoutManager(new LinearLayoutManager(this, 1, false));
|
||||
this.b = new CountryCodeAdapter(this, this.c, this.a);
|
||||
this.b.a(new CountryCodeAdapter.Callback() { // from class: com.ubt.jimu.user.view.CountryCodeActivity.1
|
||||
@Override // com.ubt.jimu.user.view.adapter.CountryCodeAdapter.Callback
|
||||
public void a(String str, String str2) {
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("country_code", str);
|
||||
intent.putExtra("country_name", str2);
|
||||
CountryCodeActivity.this.setResult(-1, intent);
|
||||
CountryCodeActivity.this.finish();
|
||||
}
|
||||
});
|
||||
this.recyclerView.setAdapter(this.b);
|
||||
D0();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_country_code);
|
||||
ButterKnife.a(this);
|
||||
this.a = getIntent().getStringExtra("selected_code");
|
||||
initView();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
this.d.removeCallbacksAndMessages(null);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
public void relayout() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.ubt.jimu.R;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class CountryCodeActivity_ViewBinding implements Unbinder {
|
||||
private CountryCodeActivity b;
|
||||
|
||||
public CountryCodeActivity_ViewBinding(CountryCodeActivity countryCodeActivity, View view) {
|
||||
this.b = countryCodeActivity;
|
||||
countryCodeActivity.recyclerView = (RecyclerView) Utils.b(view, R.id.recyclerView, "field 'recyclerView'", RecyclerView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
CountryCodeActivity countryCodeActivity = this.b;
|
||||
if (countryCodeActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
countryCodeActivity.recyclerView = null;
|
||||
}
|
||||
}
|
||||
211
sources/com/ubt/jimu/user/view/EmailUpdateActivity.java
Normal file
211
sources/com/ubt/jimu/user/view/EmailUpdateActivity.java
Normal file
@@ -0,0 +1,211 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import butterknife.ButterKnife;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.entities.ApiStatus;
|
||||
import com.ubt.jimu.base.entities.UserDetailInfo;
|
||||
import com.ubt.jimu.base.http.ApiResultException;
|
||||
import com.ubt.jimu.base.http.IApiObserver;
|
||||
import com.ubt.jimu.user.repository.UserRepository;
|
||||
import com.ubt.jimu.utils.RxSchedulers;
|
||||
import com.ubt.jimu.widgets.ClearEditText;
|
||||
import com.ubt.jimu.widgets.JAlertDialog;
|
||||
import com.ubt.jimu.widgets.NavigationBarView;
|
||||
import io.reactivex.disposables.CompositeDisposable;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class EmailUpdateActivity extends BaseActivity {
|
||||
private Handler a = new Handler();
|
||||
private CompositeDisposable b = new CompositeDisposable();
|
||||
private JAlertDialog c;
|
||||
ClearEditText captchaEditText;
|
||||
TextView countDownTextView;
|
||||
private CountDownTimer d;
|
||||
ClearEditText emailEditText;
|
||||
NavigationBarView navBarView;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public void D0() {
|
||||
this.d = new CountDownTimer(60000L, 1000L) { // from class: com.ubt.jimu.user.view.EmailUpdateActivity.2
|
||||
@Override // android.os.CountDownTimer
|
||||
public void onFinish() {
|
||||
EmailUpdateActivity.this.countDownTextView.setText(R.string.get_captcha);
|
||||
EmailUpdateActivity.this.countDownTextView.setClickable(true);
|
||||
EmailUpdateActivity emailUpdateActivity = EmailUpdateActivity.this;
|
||||
emailUpdateActivity.countDownTextView.setTextColor(emailUpdateActivity.getResources().getColor(R.color.txt_287EF1));
|
||||
}
|
||||
|
||||
@Override // android.os.CountDownTimer
|
||||
public void onTick(long j) {
|
||||
String format = String.format(EmailUpdateActivity.this.getResources().getString(R.string.hint_seconds), Long.valueOf(j / 1000));
|
||||
EmailUpdateActivity emailUpdateActivity = EmailUpdateActivity.this;
|
||||
emailUpdateActivity.countDownTextView.setTextColor(emailUpdateActivity.getResources().getColor(R.color.txt_98A5B6));
|
||||
EmailUpdateActivity.this.countDownTextView.setText(format);
|
||||
}
|
||||
};
|
||||
this.d.start();
|
||||
this.countDownTextView.setClickable(false);
|
||||
}
|
||||
|
||||
public void onConfirmAction(View view) {
|
||||
String trim = this.emailEditText.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(trim)) {
|
||||
toastError(getString(R.string.error_empty_email));
|
||||
return;
|
||||
}
|
||||
if (!com.ubt.jimu.utils.TextUtils.a(trim)) {
|
||||
toastError(getString(R.string.error_email_format));
|
||||
return;
|
||||
}
|
||||
String trim2 = this.captchaEditText.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(trim2)) {
|
||||
toastError(getString(R.string.error_empty_captcha));
|
||||
} else {
|
||||
a("", R.drawable.ic_loading, true);
|
||||
UserRepository.a(trim, 1, trim2).compose(RxSchedulers.a()).subscribe(new IApiObserver<UserDetailInfo>(this) { // from class: com.ubt.jimu.user.view.EmailUpdateActivity.4
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver, io.reactivex.Observer
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onNext(UserDetailInfo userDetailInfo) {
|
||||
super.onNext(userDetailInfo);
|
||||
if (EmailUpdateActivity.this.c != null) {
|
||||
EmailUpdateActivity.this.c.dismiss();
|
||||
}
|
||||
if (userDetailInfo != null) {
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("new_email", userDetailInfo.getUserEmail());
|
||||
EmailUpdateActivity.this.setResult(-1, intent);
|
||||
EmailUpdateActivity.this.finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver
|
||||
public void onApiError(final ApiResultException apiResultException) {
|
||||
EmailUpdateActivity.this.a.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.EmailUpdateActivity.4.1
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
if (EmailUpdateActivity.this.c != null) {
|
||||
EmailUpdateActivity.this.c.dismiss();
|
||||
}
|
||||
EmailUpdateActivity.this.toastError(apiResultException.getMessage());
|
||||
}
|
||||
}, 1500L);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver, io.reactivex.Observer
|
||||
public void onSubscribe(Disposable disposable) {
|
||||
super.onSubscribe(disposable);
|
||||
EmailUpdateActivity.this.b.b(disposable);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void onCountDownAction(View view) {
|
||||
String trim = this.emailEditText.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(trim)) {
|
||||
toastError(getString(R.string.error_empty_email));
|
||||
} else if (!com.ubt.jimu.utils.TextUtils.a(trim)) {
|
||||
toastError(getString(R.string.error_email_format));
|
||||
} else {
|
||||
a(getString(R.string.have_send_captcha), R.drawable.ic_loading, true);
|
||||
UserRepository.a(trim, 1, 1).compose(RxSchedulers.a()).subscribe(new IApiObserver<ApiStatus>(this) { // from class: com.ubt.jimu.user.view.EmailUpdateActivity.3
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver, io.reactivex.Observer
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onNext(ApiStatus apiStatus) {
|
||||
super.onNext(apiStatus);
|
||||
if (apiStatus.getCode() == 0) {
|
||||
EmailUpdateActivity.this.D0();
|
||||
EmailUpdateActivity.this.a.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.EmailUpdateActivity.3.1
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
if (EmailUpdateActivity.this.c != null) {
|
||||
EmailUpdateActivity.this.c.dismiss();
|
||||
}
|
||||
}
|
||||
}, 1000L);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver
|
||||
public void onApiError(final ApiResultException apiResultException) {
|
||||
EmailUpdateActivity.this.a.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.EmailUpdateActivity.3.2
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
if (EmailUpdateActivity.this.c != null) {
|
||||
EmailUpdateActivity.this.c.dismiss();
|
||||
}
|
||||
EmailUpdateActivity.this.toastError(apiResultException.getMessage());
|
||||
if (EmailUpdateActivity.this.d != null) {
|
||||
EmailUpdateActivity.this.d.cancel();
|
||||
}
|
||||
EmailUpdateActivity.this.countDownTextView.setText(R.string.get_captcha);
|
||||
EmailUpdateActivity.this.countDownTextView.setClickable(true);
|
||||
EmailUpdateActivity emailUpdateActivity = EmailUpdateActivity.this;
|
||||
emailUpdateActivity.countDownTextView.setTextColor(emailUpdateActivity.getResources().getColor(R.color.txt_287EF1));
|
||||
}
|
||||
}, 2000L);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver, io.reactivex.Observer
|
||||
public void onSubscribe(Disposable disposable) {
|
||||
super.onSubscribe(disposable);
|
||||
EmailUpdateActivity.this.b.b(disposable);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_email_update);
|
||||
ButterKnife.a(this);
|
||||
this.navBarView.setRightIcon(R.drawable.community_collection_icon);
|
||||
this.navBarView.setListener(new NavigationBarView.OnActionClickListener.Stub() { // from class: com.ubt.jimu.user.view.EmailUpdateActivity.1
|
||||
@Override // com.ubt.jimu.widgets.NavigationBarView.OnActionClickListener.Stub
|
||||
public void onRightClick(View view) {
|
||||
EmailUpdateActivity.this.onConfirmAction(view);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onDestroy() {
|
||||
Handler handler = this.a;
|
||||
if (handler != null) {
|
||||
handler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
super.onDestroy();
|
||||
this.b.dispose();
|
||||
this.b.a();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
public void relayout() {
|
||||
}
|
||||
|
||||
private void a(String str, int i, boolean z) {
|
||||
JAlertDialog jAlertDialog = this.c;
|
||||
if (jAlertDialog == null) {
|
||||
JAlertDialog.Builder builder = new JAlertDialog.Builder(this);
|
||||
builder.a(str);
|
||||
builder.a(z);
|
||||
builder.a(i);
|
||||
this.c = builder.a();
|
||||
} else {
|
||||
jAlertDialog.a(str);
|
||||
this.c.b(i);
|
||||
this.c.a(z);
|
||||
}
|
||||
this.c.show();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.DebouncingOnClickListener;
|
||||
import butterknife.internal.Utils;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.widgets.ClearEditText;
|
||||
import com.ubt.jimu.widgets.NavigationBarView;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class EmailUpdateActivity_ViewBinding implements Unbinder {
|
||||
private EmailUpdateActivity b;
|
||||
private View c;
|
||||
|
||||
public EmailUpdateActivity_ViewBinding(final EmailUpdateActivity emailUpdateActivity, View view) {
|
||||
this.b = emailUpdateActivity;
|
||||
emailUpdateActivity.emailEditText = (ClearEditText) Utils.b(view, R.id.emailEditText, "field 'emailEditText'", ClearEditText.class);
|
||||
View a = Utils.a(view, R.id.countDownTextView, "field 'countDownTextView' and method 'onCountDownAction'");
|
||||
emailUpdateActivity.countDownTextView = (TextView) Utils.a(a, R.id.countDownTextView, "field 'countDownTextView'", TextView.class);
|
||||
this.c = a;
|
||||
a.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.EmailUpdateActivity_ViewBinding.1
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
emailUpdateActivity.onCountDownAction(view2);
|
||||
}
|
||||
});
|
||||
emailUpdateActivity.captchaEditText = (ClearEditText) Utils.b(view, R.id.captchaEditText, "field 'captchaEditText'", ClearEditText.class);
|
||||
emailUpdateActivity.navBarView = (NavigationBarView) Utils.b(view, R.id.nbv_bar, "field 'navBarView'", NavigationBarView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
EmailUpdateActivity emailUpdateActivity = this.b;
|
||||
if (emailUpdateActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
emailUpdateActivity.emailEditText = null;
|
||||
emailUpdateActivity.countDownTextView = null;
|
||||
emailUpdateActivity.captchaEditText = null;
|
||||
emailUpdateActivity.navBarView = null;
|
||||
this.c.setOnClickListener(null);
|
||||
this.c = null;
|
||||
}
|
||||
}
|
||||
392
sources/com/ubt/jimu/user/view/FindPasswordActivity.java
Normal file
392
sources/com/ubt/jimu/user/view/FindPasswordActivity.java
Normal file
@@ -0,0 +1,392 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.text.TextUtils;
|
||||
import android.text.method.HideReturnsTransformationMethod;
|
||||
import android.text.method.PasswordTransformationMethod;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import butterknife.ButterKnife;
|
||||
import com.alibaba.android.arouter.facade.Postcard;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.entities.ApiStatus;
|
||||
import com.ubt.jimu.user.contract.ResetPasswordContract$Presenter;
|
||||
import com.ubt.jimu.user.contract.ResetPasswordContract$View;
|
||||
import com.ubt.jimu.user.presenter.ResetPasswordPresenter;
|
||||
import com.ubt.jimu.utils.AnimUtils;
|
||||
import com.ubt.jimu.utils.Md5Utils;
|
||||
import com.ubt.jimu.utils.SoftKeyBoardListener;
|
||||
import com.ubt.jimu.widgets.ClearEditText;
|
||||
import com.ubt.jimu.widgets.JAlertDialog;
|
||||
import com.ubt.jimu.widgets.NavigationBarView;
|
||||
import com.ubtech.utils.StringUtils;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class FindPasswordActivity extends BaseActivity implements ResetPasswordContract$View {
|
||||
private Handler a = new Handler();
|
||||
ClearEditText accountEditText;
|
||||
private ResetPasswordContract$Presenter b;
|
||||
private SoftKeyBoardListener c;
|
||||
ClearEditText captchaEditText;
|
||||
TextView countDownTextView;
|
||||
RelativeLayout countryCodeParent;
|
||||
TextView countryCodeTextView;
|
||||
private JAlertDialog d;
|
||||
private CountDownTimer e;
|
||||
ImageView eyeImageView;
|
||||
NavigationBarView navBarView;
|
||||
ClearEditText passwordEditText;
|
||||
RelativeLayout rlTips;
|
||||
|
||||
private void D0() {
|
||||
this.accountEditText.setImeOptions(5);
|
||||
this.accountEditText.setImeOptions(268435456);
|
||||
this.captchaEditText.setImeOptions(5);
|
||||
this.captchaEditText.setImeOptions(268435456);
|
||||
this.passwordEditText.setImeOptions(6);
|
||||
this.passwordEditText.setImeOptions(268435456);
|
||||
}
|
||||
|
||||
private void E0() {
|
||||
this.accountEditText.setOnFocuschangeListener(new ClearEditText.onFocuschangeListener() { // from class: com.ubt.jimu.user.view.FindPasswordActivity.1
|
||||
@Override // com.ubt.jimu.widgets.ClearEditText.onFocuschangeListener
|
||||
public void a(boolean z) {
|
||||
if (!z) {
|
||||
FindPasswordActivity findPasswordActivity = FindPasswordActivity.this;
|
||||
findPasswordActivity.o(findPasswordActivity.accountEditText.getText().toString().trim());
|
||||
} else if (FindPasswordActivity.this.rlTips.getVisibility() == 0) {
|
||||
FindPasswordActivity.this.rlTips.setVisibility(8);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.c = new SoftKeyBoardListener(this);
|
||||
SoftKeyBoardListener.a(this.c, new SoftKeyBoardListener.OnSoftKeyBoardChangeListener() { // from class: com.ubt.jimu.user.view.FindPasswordActivity.2
|
||||
@Override // com.ubt.jimu.utils.SoftKeyBoardListener.OnSoftKeyBoardChangeListener
|
||||
public void a(int i) {
|
||||
if (FindPasswordActivity.this.accountEditText.hasFocus()) {
|
||||
FindPasswordActivity.this.accountEditText.clearFocus();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.utils.SoftKeyBoardListener.OnSoftKeyBoardChangeListener
|
||||
public void b(int i) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void F0() {
|
||||
String stringExtra = getIntent().getStringExtra("account");
|
||||
if (stringExtra == null || stringExtra.length() == 0) {
|
||||
return;
|
||||
}
|
||||
this.accountEditText.setText(stringExtra);
|
||||
o(stringExtra);
|
||||
}
|
||||
|
||||
private void G0() {
|
||||
this.e = new CountDownTimer(60000L, 1000L) { // from class: com.ubt.jimu.user.view.FindPasswordActivity.4
|
||||
@Override // android.os.CountDownTimer
|
||||
public void onFinish() {
|
||||
FindPasswordActivity.this.countDownTextView.setText(R.string.get_captcha);
|
||||
FindPasswordActivity.this.countDownTextView.setClickable(true);
|
||||
}
|
||||
|
||||
@Override // android.os.CountDownTimer
|
||||
public void onTick(long j) {
|
||||
FindPasswordActivity.this.countDownTextView.setText(String.format(FindPasswordActivity.this.getResources().getString(R.string.hint_seconds), Long.valueOf(j / 1000)));
|
||||
}
|
||||
};
|
||||
this.e.start();
|
||||
this.countDownTextView.setClickable(false);
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
new ResetPasswordPresenter(this, this);
|
||||
this.b.b();
|
||||
this.navBarView.setRightIcon(R.drawable.ic_nav_finish);
|
||||
this.navBarView.setListener(new NavigationBarView.OnActionClickListener.Stub() { // from class: com.ubt.jimu.user.view.FindPasswordActivity.3
|
||||
@Override // com.ubt.jimu.widgets.NavigationBarView.OnActionClickListener.Stub
|
||||
public void onRightClick(View view) {
|
||||
super.onRightClick(view);
|
||||
FindPasswordActivity.this.onRightActionView(view);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public void o(String str) {
|
||||
if (TextUtils.isEmpty(str)) {
|
||||
this.rlTips.setVisibility(8);
|
||||
this.countryCodeParent.setVisibility(8);
|
||||
} else {
|
||||
if (StringUtils.f(str)) {
|
||||
this.rlTips.setVisibility(8);
|
||||
this.countryCodeParent.setVisibility(0);
|
||||
return;
|
||||
}
|
||||
this.countryCodeParent.setVisibility(8);
|
||||
if (str.contains("@")) {
|
||||
this.rlTips.setVisibility(8);
|
||||
} else {
|
||||
this.rlTips.setVisibility(0);
|
||||
this.rlTips.startAnimation(AnimUtils.a(5));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void start(Context context, String str, String str2) {
|
||||
Intent intent = new Intent(context, (Class<?>) FindPasswordActivity.class);
|
||||
if (str != null && str.length() != 0) {
|
||||
intent.putExtra("account", str);
|
||||
}
|
||||
if (str2 != null && str2.length() != 0) {
|
||||
intent.putExtra("country", str2);
|
||||
}
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.ResetPasswordContract$View
|
||||
public void c(String str) {
|
||||
this.countryCodeTextView.setText(str.substring(str.indexOf("+")) + " (" + str.substring(0, str.indexOf("+")) + ") ");
|
||||
String stringExtra = getIntent().getStringExtra("country");
|
||||
if (stringExtra == null || stringExtra.length() == 0) {
|
||||
return;
|
||||
}
|
||||
this.countryCodeTextView.setText(stringExtra);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.ResetPasswordContract$View
|
||||
public void d(ApiStatus apiStatus) {
|
||||
Log.i("FindPassword", "onResetSuccess");
|
||||
if (apiStatus.getCode() == 0) {
|
||||
toastSuccess(getString(R.string.update_success));
|
||||
this.a.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.FindPasswordActivity.6
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
FindPasswordActivity.this.finish();
|
||||
}
|
||||
}, 1500L);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.ResetPasswordContract$View
|
||||
public void e(final String str) {
|
||||
this.a.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.FindPasswordActivity.8
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
FindPasswordActivity.this.toastError(str);
|
||||
if (FindPasswordActivity.this.d != null) {
|
||||
FindPasswordActivity.this.d.dismiss();
|
||||
}
|
||||
if (FindPasswordActivity.this.e != null) {
|
||||
FindPasswordActivity.this.e.cancel();
|
||||
}
|
||||
FindPasswordActivity.this.countDownTextView.setText(R.string.get_captcha);
|
||||
FindPasswordActivity.this.countDownTextView.setClickable(true);
|
||||
FindPasswordActivity findPasswordActivity = FindPasswordActivity.this;
|
||||
findPasswordActivity.countDownTextView.setTextColor(findPasswordActivity.getResources().getColor(R.color.txt_287EF1));
|
||||
}
|
||||
}, 500L);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.ResetPasswordContract$View
|
||||
public void g(final String str) {
|
||||
this.a.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.FindPasswordActivity.7
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
if (FindPasswordActivity.this.d != null) {
|
||||
FindPasswordActivity.this.d.dismiss();
|
||||
}
|
||||
FindPasswordActivity.this.toastError(str);
|
||||
}
|
||||
}, 1500L);
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onActivityResult(int i, int i2, Intent intent) {
|
||||
super.onActivityResult(i, i2, intent);
|
||||
if (i2 == -1 && i != 17 && i == 18) {
|
||||
String stringExtra = intent.getStringExtra("country_code");
|
||||
String stringExtra2 = intent.getStringExtra("country_name");
|
||||
this.countryCodeTextView.setText(stringExtra + " (" + stringExtra2 + ") ");
|
||||
}
|
||||
}
|
||||
|
||||
public void onCountDownAction(View view) {
|
||||
String trim = this.accountEditText.getText().toString().trim();
|
||||
String trim2 = this.countryCodeTextView.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(trim2)) {
|
||||
findViewById(R.id.countryCodeParent).startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(trim)) {
|
||||
findViewById(R.id.accountParent).startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
if (!trim.contains("@") && !StringUtils.f(trim)) {
|
||||
this.countryCodeParent.setVisibility(8);
|
||||
this.rlTips.setVisibility(0);
|
||||
this.rlTips.startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
String replace = trim.contains("@") ? "" : trim2.substring(trim2.indexOf("+") + 1, trim2.indexOf("(") - 1).replace(" ", "");
|
||||
if (com.ubt.jimu.utils.TextUtils.b(trim) && !com.ubt.jimu.utils.TextUtils.a(trim)) {
|
||||
toastError(getString(R.string.error_email_format));
|
||||
return;
|
||||
}
|
||||
this.b.a(replace + this.accountEditText.getText().toString().trim(), 2);
|
||||
a(R.string.have_send_captcha, R.drawable.ic_loading, true);
|
||||
}
|
||||
|
||||
public void onCountryCodeAction(View view) {
|
||||
String charSequence = this.countryCodeTextView.getText().toString();
|
||||
String substring = !TextUtils.isEmpty(charSequence) ? charSequence.substring(charSequence.indexOf("+"), charSequence.indexOf("(") - 1) : null;
|
||||
Postcard a = ARouter.b().a("/account/countrycode");
|
||||
a.a("selected_code", substring);
|
||||
a.a(this, 18);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_find_password);
|
||||
ButterKnife.a(this);
|
||||
initView();
|
||||
F0();
|
||||
D0();
|
||||
E0();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onDestroy() {
|
||||
Handler handler = this.a;
|
||||
if (handler != null) {
|
||||
handler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
SoftKeyBoardListener softKeyBoardListener = this.c;
|
||||
if (softKeyBoardListener != null) {
|
||||
softKeyBoardListener.a();
|
||||
this.c = null;
|
||||
}
|
||||
RelativeLayout relativeLayout = this.rlTips;
|
||||
if (relativeLayout != null) {
|
||||
relativeLayout.clearAnimation();
|
||||
}
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
public void onEyeAction() {
|
||||
if (this.eyeImageView.isSelected()) {
|
||||
this.eyeImageView.setSelected(false);
|
||||
this.eyeImageView.setBackgroundResource(R.drawable.ic_eye_show);
|
||||
this.passwordEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
|
||||
ClearEditText clearEditText = this.passwordEditText;
|
||||
clearEditText.setSelection(clearEditText.getText().toString().length());
|
||||
return;
|
||||
}
|
||||
this.eyeImageView.setSelected(true);
|
||||
this.eyeImageView.setBackgroundResource(R.drawable.ic_eye_hide);
|
||||
this.passwordEditText.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
|
||||
ClearEditText clearEditText2 = this.passwordEditText;
|
||||
clearEditText2.setSelection(clearEditText2.getText().toString().length());
|
||||
}
|
||||
|
||||
public void onRightActionView(View view) {
|
||||
String trim = this.accountEditText.getText().toString().trim();
|
||||
String trim2 = this.countryCodeTextView.getText().toString().trim();
|
||||
String trim3 = this.captchaEditText.getText().toString().trim();
|
||||
String trim4 = this.passwordEditText.getText().toString().trim();
|
||||
if (!trim.contains("@") && TextUtils.isEmpty(trim2)) {
|
||||
this.countryCodeParent.setVisibility(0);
|
||||
this.rlTips.setVisibility(8);
|
||||
findViewById(R.id.countryCodeParent).startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
if (!trim.contains("@") && !StringUtils.f(trim)) {
|
||||
this.countryCodeParent.setVisibility(8);
|
||||
this.rlTips.setVisibility(0);
|
||||
this.rlTips.startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(trim)) {
|
||||
findViewById(R.id.accountParent).startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(trim3)) {
|
||||
findViewById(R.id.captchaParent).startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(trim4)) {
|
||||
findViewById(R.id.passwordParent).startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
if (com.ubt.jimu.utils.TextUtils.b(trim) && !com.ubt.jimu.utils.TextUtils.a(trim)) {
|
||||
toastError(getString(R.string.error_email_format));
|
||||
return;
|
||||
}
|
||||
String replace = trim.contains("@") ? "" : trim2.substring(trim2.indexOf("+") + 1, trim2.indexOf("(") - 1).replace(" ", "");
|
||||
if (trim4.length() < 6) {
|
||||
toastError(getString(R.string.password_len_error_1));
|
||||
return;
|
||||
}
|
||||
if (trim4.length() > 16) {
|
||||
toastError(getString(R.string.password_len_error_2));
|
||||
return;
|
||||
}
|
||||
if (!com.ubt.jimu.utils.TextUtils.d(trim4)) {
|
||||
toastError(getString(R.string.password_len_error_3));
|
||||
return;
|
||||
}
|
||||
this.b.a(replace + trim, Md5Utils.a(trim4), trim3);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
public void relayout() {
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.ResetPasswordContract$View
|
||||
public void b(ApiStatus apiStatus) {
|
||||
if (apiStatus.getCode() == 0) {
|
||||
G0();
|
||||
this.a.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.FindPasswordActivity.5
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
if (FindPasswordActivity.this.d != null) {
|
||||
FindPasswordActivity.this.d.dismiss();
|
||||
}
|
||||
}
|
||||
}, 1000L);
|
||||
}
|
||||
}
|
||||
|
||||
private void a(int i, int i2, boolean z) {
|
||||
JAlertDialog jAlertDialog = this.d;
|
||||
if (jAlertDialog == null) {
|
||||
JAlertDialog.Builder builder = new JAlertDialog.Builder(this);
|
||||
builder.b(i);
|
||||
builder.a(z);
|
||||
builder.a(i2);
|
||||
this.d = builder.a();
|
||||
} else {
|
||||
jAlertDialog.a(getString(i));
|
||||
this.d.b(i2);
|
||||
this.d.a(z);
|
||||
}
|
||||
this.d.show();
|
||||
}
|
||||
|
||||
@Override // com.ubtech.view.BaseView
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void setPresenter(ResetPasswordContract$Presenter resetPasswordContract$Presenter) {
|
||||
this.b = resetPasswordContract$Presenter;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.DebouncingOnClickListener;
|
||||
import butterknife.internal.Utils;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.widgets.ClearEditText;
|
||||
import com.ubt.jimu.widgets.NavigationBarView;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class FindPasswordActivity_ViewBinding implements Unbinder {
|
||||
private FindPasswordActivity b;
|
||||
private View c;
|
||||
private View d;
|
||||
private View e;
|
||||
private View f;
|
||||
|
||||
public FindPasswordActivity_ViewBinding(final FindPasswordActivity findPasswordActivity, View view) {
|
||||
this.b = findPasswordActivity;
|
||||
View a = Utils.a(view, R.id.countryCodeTextView, "field 'countryCodeTextView' and method 'onCountryCodeAction'");
|
||||
findPasswordActivity.countryCodeTextView = (TextView) Utils.a(a, R.id.countryCodeTextView, "field 'countryCodeTextView'", TextView.class);
|
||||
this.c = a;
|
||||
a.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.FindPasswordActivity_ViewBinding.1
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
findPasswordActivity.onCountryCodeAction(view2);
|
||||
}
|
||||
});
|
||||
findPasswordActivity.accountEditText = (ClearEditText) Utils.b(view, R.id.accountEditText, "field 'accountEditText'", ClearEditText.class);
|
||||
View a2 = Utils.a(view, R.id.countDownTextView, "field 'countDownTextView' and method 'onCountDownAction'");
|
||||
findPasswordActivity.countDownTextView = (TextView) Utils.a(a2, R.id.countDownTextView, "field 'countDownTextView'", TextView.class);
|
||||
this.d = a2;
|
||||
a2.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.FindPasswordActivity_ViewBinding.2
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
findPasswordActivity.onCountDownAction(view2);
|
||||
}
|
||||
});
|
||||
findPasswordActivity.captchaEditText = (ClearEditText) Utils.b(view, R.id.captchaEditText, "field 'captchaEditText'", ClearEditText.class);
|
||||
View a3 = Utils.a(view, R.id.eyeImageView, "field 'eyeImageView' and method 'onEyeAction'");
|
||||
findPasswordActivity.eyeImageView = (ImageView) Utils.a(a3, R.id.eyeImageView, "field 'eyeImageView'", ImageView.class);
|
||||
this.e = a3;
|
||||
a3.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.FindPasswordActivity_ViewBinding.3
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
findPasswordActivity.onEyeAction();
|
||||
}
|
||||
});
|
||||
findPasswordActivity.passwordEditText = (ClearEditText) Utils.b(view, R.id.passwordEditText, "field 'passwordEditText'", ClearEditText.class);
|
||||
findPasswordActivity.navBarView = (NavigationBarView) Utils.b(view, R.id.nbv_bar, "field 'navBarView'", NavigationBarView.class);
|
||||
findPasswordActivity.countryCodeParent = (RelativeLayout) Utils.b(view, R.id.countryCodeParent, "field 'countryCodeParent'", RelativeLayout.class);
|
||||
findPasswordActivity.rlTips = (RelativeLayout) Utils.b(view, R.id.rl_tips_input_error, "field 'rlTips'", RelativeLayout.class);
|
||||
View a4 = Utils.a(view, R.id.rightArrowImageView, "method 'onCountryCodeAction'");
|
||||
this.f = a4;
|
||||
a4.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.FindPasswordActivity_ViewBinding.4
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
findPasswordActivity.onCountryCodeAction(view2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
FindPasswordActivity findPasswordActivity = this.b;
|
||||
if (findPasswordActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
findPasswordActivity.countryCodeTextView = null;
|
||||
findPasswordActivity.accountEditText = null;
|
||||
findPasswordActivity.countDownTextView = null;
|
||||
findPasswordActivity.captchaEditText = null;
|
||||
findPasswordActivity.eyeImageView = null;
|
||||
findPasswordActivity.passwordEditText = null;
|
||||
findPasswordActivity.navBarView = null;
|
||||
findPasswordActivity.countryCodeParent = null;
|
||||
findPasswordActivity.rlTips = null;
|
||||
this.c.setOnClickListener(null);
|
||||
this.c = null;
|
||||
this.d.setOnClickListener(null);
|
||||
this.d = null;
|
||||
this.e.setOnClickListener(null);
|
||||
this.e = null;
|
||||
this.f.setOnClickListener(null);
|
||||
this.f = null;
|
||||
}
|
||||
}
|
||||
130
sources/com/ubt/jimu/user/view/InterestFansActivity.java
Normal file
130
sources/com/ubt/jimu/user/view/InterestFansActivity.java
Normal file
@@ -0,0 +1,130 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
import butterknife.ButterKnife;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.main.widget.TabBarView;
|
||||
import com.ubt.jimu.user.presenter.FansPresenter;
|
||||
import com.ubt.jimu.user.presenter.InterestPresenter;
|
||||
import com.ubt.jimu.user.view.fragment.FansFragment;
|
||||
import com.ubt.jimu.user.view.fragment.InterestFragment;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class InterestFansActivity extends BaseActivity implements TabBarView.OnActionListener, ViewPager.OnPageChangeListener {
|
||||
private List<Fragment> a = new ArrayList();
|
||||
private BaseFragmentAdapter b;
|
||||
private long c;
|
||||
CardView centerCardView;
|
||||
private int d;
|
||||
ViewPager interestFansViewPager;
|
||||
TabBarView tabBar;
|
||||
|
||||
class BaseFragmentAdapter extends FragmentPagerAdapter {
|
||||
private List<Fragment> a;
|
||||
|
||||
public BaseFragmentAdapter(InterestFansActivity interestFansActivity, FragmentManager fragmentManager, List<Fragment> list) {
|
||||
super(fragmentManager);
|
||||
this.a = list;
|
||||
}
|
||||
|
||||
@Override // androidx.viewpager.widget.PagerAdapter
|
||||
public int getCount() {
|
||||
return this.a.size();
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.FragmentPagerAdapter
|
||||
public Fragment getItem(int i) {
|
||||
return this.a.get(i);
|
||||
}
|
||||
}
|
||||
|
||||
private void D0() {
|
||||
Bundle bundleExtra = getIntent().getBundleExtra("extra");
|
||||
if (bundleExtra != null) {
|
||||
this.d = bundleExtra.getInt("page_index");
|
||||
this.c = bundleExtra.getLong("view_user_id");
|
||||
}
|
||||
}
|
||||
|
||||
private void E0() {
|
||||
InterestFragment a = InterestFragment.a(this.c);
|
||||
new InterestPresenter(this, a);
|
||||
FansFragment a2 = FansFragment.a(this.c);
|
||||
new FansPresenter(this, a2);
|
||||
this.a.add(a);
|
||||
this.a.add(a2);
|
||||
this.b.notifyDataSetChanged();
|
||||
this.interestFansViewPager.setCurrentItem(this.d);
|
||||
}
|
||||
|
||||
public static void a(BaseActivity baseActivity, Bundle bundle) {
|
||||
Intent intent = new Intent(baseActivity, (Class<?>) InterestFansActivity.class);
|
||||
intent.putExtra("extra", bundle);
|
||||
baseActivity.startActivity(intent);
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
this.b = new BaseFragmentAdapter(this, getSupportFragmentManager(), this.a);
|
||||
this.interestFansViewPager.setAdapter(this.b);
|
||||
this.interestFansViewPager.a(this);
|
||||
this.tabBar.setListener(this);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.main.widget.TabBarView.OnActionListener
|
||||
public void c(int i) {
|
||||
this.interestFansViewPager.setCurrentItem(i);
|
||||
}
|
||||
|
||||
public void onCenterCardView(View view) {
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_interest_fans);
|
||||
ButterKnife.a(this);
|
||||
initView();
|
||||
D0();
|
||||
E0();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
public void onDismiss(View view) {
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override // androidx.viewpager.widget.ViewPager.OnPageChangeListener
|
||||
public void onPageScrollStateChanged(int i) {
|
||||
}
|
||||
|
||||
@Override // androidx.viewpager.widget.ViewPager.OnPageChangeListener
|
||||
public void onPageScrolled(int i, float f, int i2) {
|
||||
this.tabBar.a(i, f);
|
||||
}
|
||||
|
||||
@Override // androidx.viewpager.widget.ViewPager.OnPageChangeListener
|
||||
public void onPageSelected(int i) {
|
||||
}
|
||||
|
||||
@Override // android.view.Window.Callback
|
||||
public void onPointerCaptureChanged(boolean z) {
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
public void relayout() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.DebouncingOnClickListener;
|
||||
import butterknife.internal.Utils;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.main.widget.TabBarView;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class InterestFansActivity_ViewBinding implements Unbinder {
|
||||
private InterestFansActivity b;
|
||||
private View c;
|
||||
private View d;
|
||||
|
||||
public InterestFansActivity_ViewBinding(final InterestFansActivity interestFansActivity, View view) {
|
||||
this.b = interestFansActivity;
|
||||
interestFansActivity.interestFansViewPager = (ViewPager) Utils.b(view, R.id.interestFansViewPager, "field 'interestFansViewPager'", ViewPager.class);
|
||||
View a = Utils.a(view, R.id.centerCardView, "field 'centerCardView' and method 'onCenterCardView'");
|
||||
interestFansActivity.centerCardView = (CardView) Utils.a(a, R.id.centerCardView, "field 'centerCardView'", CardView.class);
|
||||
this.c = a;
|
||||
a.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.InterestFansActivity_ViewBinding.1
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
interestFansActivity.onCenterCardView(view2);
|
||||
}
|
||||
});
|
||||
interestFansActivity.tabBar = (TabBarView) Utils.b(view, R.id.tabBar, "field 'tabBar'", TabBarView.class);
|
||||
View a2 = Utils.a(view, R.id.rootView, "method 'onDismiss'");
|
||||
this.d = a2;
|
||||
a2.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.InterestFansActivity_ViewBinding.2
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
interestFansActivity.onDismiss(view2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
InterestFansActivity interestFansActivity = this.b;
|
||||
if (interestFansActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
interestFansActivity.interestFansViewPager = null;
|
||||
interestFansActivity.centerCardView = null;
|
||||
interestFansActivity.tabBar = null;
|
||||
this.c.setOnClickListener(null);
|
||||
this.c = null;
|
||||
this.d.setOnClickListener(null);
|
||||
this.d = null;
|
||||
}
|
||||
}
|
||||
556
sources/com/ubt/jimu/user/view/LoginActivity.java
Normal file
556
sources/com/ubt/jimu/user/view/LoginActivity.java
Normal file
@@ -0,0 +1,556 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.text.method.PasswordTransformationMethod;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import butterknife.ButterKnife;
|
||||
import com.alibaba.android.arouter.facade.Postcard;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.facebook.AccessToken;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.cache.SharePreferenceHelper;
|
||||
import com.ubt.jimu.base.db.user.UserDbHandler;
|
||||
import com.ubt.jimu.base.entities.User;
|
||||
import com.ubt.jimu.base.event.MessageEvent;
|
||||
import com.ubt.jimu.sync.OfflineDataUploadTool;
|
||||
import com.ubt.jimu.transport.update.MergeTool;
|
||||
import com.ubt.jimu.user.contract.LoginContract$Presenter;
|
||||
import com.ubt.jimu.user.contract.LoginContract$View;
|
||||
import com.ubt.jimu.user.model.RefHolder;
|
||||
import com.ubt.jimu.user.presenter.LoginPresenter;
|
||||
import com.ubt.jimu.utils.AnimUtils;
|
||||
import com.ubt.jimu.utils.DeviceUtils;
|
||||
import com.ubt.jimu.utils.LogUtils;
|
||||
import com.ubt.jimu.utils.Md5Utils;
|
||||
import com.ubt.jimu.utils.NetWorkUtil;
|
||||
import com.ubt.jimu.utils.ShortcutHelper;
|
||||
import com.ubt.jimu.utils.SoftKeyBoardListener;
|
||||
import com.ubt.jimu.widgets.ClearEditText;
|
||||
import com.ubt.jimu.widgets.JAlertDialog;
|
||||
import com.ubtech.handler.HandlerHub;
|
||||
import com.ubtech.utils.StringUtils;
|
||||
import com.ubtech.utils.XLog;
|
||||
import com.ubtrobot.ubtlib.social.SocialTool;
|
||||
import com.ubtrobot.ubtlib.social.UbtSocial;
|
||||
import com.ubtrobot.ubtlib.social.UbtSocialAuthListener;
|
||||
import com.ubtrobot.ubtlib.social.UbtSocialType;
|
||||
import java.util.Map;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class LoginActivity extends BaseActivity implements LoginContract$View {
|
||||
private LoginContract$Presenter a;
|
||||
private UbtSocial b;
|
||||
private SoftKeyBoardListener c;
|
||||
RelativeLayout countryCodeParent;
|
||||
TextView countryCodeTextView;
|
||||
private UbtSocialAuthListener d = new UbtSocialAuthListener() { // from class: com.ubt.jimu.user.view.LoginActivity.2
|
||||
@Override // com.ubtrobot.ubtlib.social.UbtSocialAuthListener
|
||||
public void a(Map<String, String> map) {
|
||||
RefHolder.a(map);
|
||||
LoginActivity.this.a.a(map.get(AccessToken.ACCESS_TOKEN_KEY), map.get("ubtsocial_app_id"), map.get("social_type"), map.get("ubtsocial_user_id"));
|
||||
LoginActivity.this.A();
|
||||
}
|
||||
|
||||
@Override // com.ubtrobot.ubtlib.social.UbtSocialAuthListener
|
||||
public void onCancel() {
|
||||
SocialTool.a((Activity) LoginActivity.this, "用户取消");
|
||||
if (LoginActivity.this.b != null) {
|
||||
LoginActivity.this.b.a((UbtSocialAuthListener) null);
|
||||
LoginActivity.this.b.a((UbtSocialAuthListener) null);
|
||||
LoginActivity.this.b = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubtrobot.ubtlib.social.UbtSocialAuthListener
|
||||
public void a(Throwable th) {
|
||||
SocialTool.a((Activity) LoginActivity.this, "授权失败");
|
||||
if (LoginActivity.this.b != null) {
|
||||
LoginActivity.this.b.a((UbtSocialAuthListener) null);
|
||||
LoginActivity.this.b = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
private JAlertDialog e;
|
||||
ImageView facebookImageView;
|
||||
TextView findPwdTextView;
|
||||
Button loginLayout;
|
||||
ClearEditText passwordEditText;
|
||||
ClearEditText phoneEditText;
|
||||
ImageView qqImageView;
|
||||
RelativeLayout rlTips;
|
||||
ImageView twitterImageView;
|
||||
ImageView wechatImageView;
|
||||
|
||||
private void F0() {
|
||||
this.phoneEditText.setImeOptions(5);
|
||||
this.phoneEditText.setImeOptions(268435456);
|
||||
this.passwordEditText.setImeOptions(6);
|
||||
this.passwordEditText.setImeOptions(268435456);
|
||||
}
|
||||
|
||||
private void G0() {
|
||||
this.c = new SoftKeyBoardListener(this);
|
||||
SoftKeyBoardListener.a(this.c, new SoftKeyBoardListener.OnSoftKeyBoardChangeListener() { // from class: com.ubt.jimu.user.view.LoginActivity.1
|
||||
@Override // com.ubt.jimu.utils.SoftKeyBoardListener.OnSoftKeyBoardChangeListener
|
||||
public void a(int i) {
|
||||
if (LoginActivity.this.phoneEditText.hasFocus()) {
|
||||
LoginActivity.this.phoneEditText.clearFocus();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.utils.SoftKeyBoardListener.OnSoftKeyBoardChangeListener
|
||||
public void b(int i) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void H0() {
|
||||
Map<String, String> b = RefHolder.b();
|
||||
if (b == null) {
|
||||
hideLoading();
|
||||
return;
|
||||
}
|
||||
String str = b.get("nick_name");
|
||||
String str2 = b.get("head_image");
|
||||
LoginContract$Presenter loginContract$Presenter = this.a;
|
||||
String str3 = b.get(AccessToken.ACCESS_TOKEN_KEY);
|
||||
String str4 = b.get("ubtsocial_app_id");
|
||||
String str5 = b.get("social_type");
|
||||
String str6 = b.get("ubtsocial_user_id");
|
||||
String str7 = b.get("ubtsocial_user_id");
|
||||
if (TextUtils.isEmpty(str)) {
|
||||
str = "";
|
||||
}
|
||||
loginContract$Presenter.a(str3, str4, str5, str6, str7, str, TextUtils.isEmpty(str2) ? "" : str2);
|
||||
RefHolder.a();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public void f(final User user) {
|
||||
LogUtils.c("登录成功:" + user);
|
||||
HandlerHub.a().post(new Runnable() { // from class: com.ubt.jimu.user.view.h
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
LoginActivity.this.e(user);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void g(final User user) {
|
||||
h(user);
|
||||
ShortcutHelper.b(this);
|
||||
MergeTool.a(this, new MergeTool.IMergeListener() { // from class: com.ubt.jimu.user.view.LoginActivity.7
|
||||
@Override // com.ubt.jimu.transport.update.MergeTool.IMergeListener
|
||||
public void a(boolean z) {
|
||||
LoginActivity.this.f(user);
|
||||
LogUtils.c("数据合并:" + z);
|
||||
if (z) {
|
||||
OfflineDataUploadTool.h().d();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.transport.update.MergeTool.IMergeListener
|
||||
public void onFailed() {
|
||||
LogUtils.c("合并失败");
|
||||
LoginActivity.this.f(user);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.transport.update.MergeTool.IMergeListener
|
||||
public void onStart() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void h(User user) {
|
||||
if (user != null) {
|
||||
SharePreferenceHelper sharePreferenceHelper = new SharePreferenceHelper();
|
||||
sharePreferenceHelper.put(SharePreferenceHelper.AUTHOR_TOKEN, user.getToken());
|
||||
sharePreferenceHelper.put(SharePreferenceHelper.SP_KEY_USER_ID, String.valueOf(user.getUserId()));
|
||||
UserDbHandler.save(user);
|
||||
}
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
new LoginPresenter(this, this);
|
||||
View.OnClickListener onClickListener = new View.OnClickListener() { // from class: com.ubt.jimu.user.view.LoginActivity.3
|
||||
@Override // android.view.View.OnClickListener
|
||||
public void onClick(View view) {
|
||||
UbtSocialType ubtSocialType;
|
||||
switch (view.getId()) {
|
||||
case R.id.facebookImageView /* 2131296599 */:
|
||||
ubtSocialType = UbtSocialType.FACEBOOK;
|
||||
break;
|
||||
case R.id.qqImageView /* 2131297278 */:
|
||||
ubtSocialType = UbtSocialType.QQ;
|
||||
break;
|
||||
case R.id.twitterImageView /* 2131297886 */:
|
||||
ubtSocialType = UbtSocialType.TWITTER;
|
||||
break;
|
||||
case R.id.wechatImageView /* 2131297975 */:
|
||||
ubtSocialType = UbtSocialType.WECHAT;
|
||||
break;
|
||||
default:
|
||||
ubtSocialType = null;
|
||||
break;
|
||||
}
|
||||
LoginActivity loginActivity = LoginActivity.this;
|
||||
loginActivity.b = UbtSocial.a(loginActivity, ubtSocialType);
|
||||
if (LoginActivity.this.b.b()) {
|
||||
LoginActivity.this.b.a(LoginActivity.this.d);
|
||||
LoginActivity.this.b.a();
|
||||
} else {
|
||||
LoginActivity loginActivity2 = LoginActivity.this;
|
||||
loginActivity2.toastError(loginActivity2.getString(R.string.app_not_install));
|
||||
}
|
||||
}
|
||||
};
|
||||
this.qqImageView.setOnClickListener(onClickListener);
|
||||
this.wechatImageView.setOnClickListener(onClickListener);
|
||||
this.twitterImageView.setOnClickListener(onClickListener);
|
||||
this.facebookImageView.setOnClickListener(onClickListener);
|
||||
this.loginLayout.setEnabled(false);
|
||||
this.phoneEditText.addTextChangedListener(new TextWatcher() { // from class: com.ubt.jimu.user.view.LoginActivity.4
|
||||
@Override // android.text.TextWatcher
|
||||
public void afterTextChanged(Editable editable) {
|
||||
if (TextUtils.isEmpty(editable.toString().trim())) {
|
||||
LoginActivity.this.loginLayout.setEnabled(false);
|
||||
} else {
|
||||
if (LoginActivity.this.loginLayout.isEnabled() || TextUtils.isEmpty(LoginActivity.this.countryCodeTextView.getText().toString().trim()) || TextUtils.isEmpty(LoginActivity.this.passwordEditText.getText().toString().trim())) {
|
||||
return;
|
||||
}
|
||||
LoginActivity.this.loginLayout.setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.text.TextWatcher
|
||||
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
|
||||
}
|
||||
|
||||
@Override // android.text.TextWatcher
|
||||
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
|
||||
}
|
||||
});
|
||||
this.phoneEditText.setOnFocuschangeListener(new ClearEditText.onFocuschangeListener() { // from class: com.ubt.jimu.user.view.LoginActivity.5
|
||||
@Override // com.ubt.jimu.widgets.ClearEditText.onFocuschangeListener
|
||||
public void a(boolean z) {
|
||||
if (z) {
|
||||
if (LoginActivity.this.rlTips.getVisibility() == 0) {
|
||||
LoginActivity.this.rlTips.setVisibility(8);
|
||||
}
|
||||
} else if (TextUtils.isEmpty(LoginActivity.this.phoneEditText.getText().toString().trim())) {
|
||||
LoginActivity.this.rlTips.setVisibility(8);
|
||||
LoginActivity.this.countryCodeParent.setVisibility(8);
|
||||
} else {
|
||||
if (StringUtils.f(LoginActivity.this.phoneEditText.getText().toString().trim())) {
|
||||
LoginActivity.this.rlTips.setVisibility(8);
|
||||
LoginActivity.this.countryCodeParent.setVisibility(0);
|
||||
return;
|
||||
}
|
||||
LoginActivity.this.countryCodeParent.setVisibility(8);
|
||||
if (LoginActivity.this.phoneEditText.getText().toString().trim().contains("@")) {
|
||||
LoginActivity.this.rlTips.setVisibility(8);
|
||||
} else {
|
||||
LoginActivity.this.rlTips.setVisibility(0);
|
||||
LoginActivity.this.rlTips.startAnimation(AnimUtils.a(5));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
this.passwordEditText.addTextChangedListener(new TextWatcher() { // from class: com.ubt.jimu.user.view.LoginActivity.6
|
||||
@Override // android.text.TextWatcher
|
||||
public void afterTextChanged(Editable editable) {
|
||||
if (TextUtils.isEmpty(editable.toString().trim())) {
|
||||
LoginActivity.this.loginLayout.setEnabled(false);
|
||||
} else {
|
||||
if (LoginActivity.this.loginLayout.isEnabled() || TextUtils.isEmpty(LoginActivity.this.countryCodeTextView.getText().toString().trim()) || TextUtils.isEmpty(LoginActivity.this.phoneEditText.getText().toString().trim())) {
|
||||
return;
|
||||
}
|
||||
LoginActivity.this.loginLayout.setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.text.TextWatcher
|
||||
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
|
||||
}
|
||||
|
||||
@Override // android.text.TextWatcher
|
||||
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
|
||||
}
|
||||
});
|
||||
this.passwordEditText.setTypeface(Typeface.DEFAULT);
|
||||
this.passwordEditText.setTransformationMethod(new PasswordTransformationMethod());
|
||||
F0();
|
||||
}
|
||||
|
||||
public static void start(Context context) {
|
||||
ARouter.b().a("/account/login").t();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.LoginContract$View
|
||||
public void A() {
|
||||
HandlerHub.a().post(new Runnable() { // from class: com.ubt.jimu.user.view.g
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
LoginActivity.this.E0();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public /* synthetic */ void D0() {
|
||||
if (this.e == null || isFinishing() || isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
this.e.dismiss();
|
||||
this.e = null;
|
||||
}
|
||||
|
||||
public /* synthetic */ void E0() {
|
||||
JAlertDialog jAlertDialog = this.e;
|
||||
if ((jAlertDialog != null && jAlertDialog.isShowing()) || isFinishing() || isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
JAlertDialog.Builder builder = new JAlertDialog.Builder(this);
|
||||
builder.a(R.drawable.ic_loading);
|
||||
builder.b(R.string.state_login);
|
||||
builder.a(true);
|
||||
this.e = builder.a();
|
||||
this.e.show();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.LoginContract$View
|
||||
public void d(boolean z) {
|
||||
if (!z) {
|
||||
H0();
|
||||
return;
|
||||
}
|
||||
hideLoading();
|
||||
Postcard a = ARouter.b().a("/account/register");
|
||||
a.a("back_path", "/account/login");
|
||||
a.a("loginType", 2);
|
||||
a.a(this, 20);
|
||||
}
|
||||
|
||||
public /* synthetic */ void e(User user) {
|
||||
JAlertDialog jAlertDialog = this.e;
|
||||
if (jAlertDialog != null) {
|
||||
jAlertDialog.dismiss();
|
||||
}
|
||||
if (user != null) {
|
||||
XLog.c(this.TAG, user.toString());
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("user", user);
|
||||
setResult(-1, intent);
|
||||
EventBus.b().b(new MessageEvent(0));
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
protected void hideLoading() {
|
||||
super.hideLoading();
|
||||
JAlertDialog jAlertDialog = this.e;
|
||||
if (jAlertDialog == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
jAlertDialog.dismiss();
|
||||
this.e = null;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.LoginContract$View
|
||||
public void j(String str) {
|
||||
JAlertDialog jAlertDialog = this.e;
|
||||
if (jAlertDialog != null) {
|
||||
if (TextUtils.isEmpty(str)) {
|
||||
str = getString(R.string.login_fail);
|
||||
}
|
||||
jAlertDialog.a(str);
|
||||
}
|
||||
HandlerHub.a().postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.f
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
LoginActivity.this.D0();
|
||||
}
|
||||
}, 1000L);
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onActivityResult(int i, int i2, Intent intent) {
|
||||
super.onActivityResult(i, i2, intent);
|
||||
if (19 == i) {
|
||||
if (-1 == i2) {
|
||||
User user = (User) intent.getSerializableExtra("user");
|
||||
h(user);
|
||||
if (user != null) {
|
||||
A();
|
||||
LogUtils.c("onActivityResult:" + user.getToken());
|
||||
this.a.a(user, DeviceUtils.a((Context) this));
|
||||
}
|
||||
} else {
|
||||
hideLoading();
|
||||
}
|
||||
}
|
||||
UbtSocial ubtSocial = this.b;
|
||||
if (ubtSocial != null) {
|
||||
ubtSocial.a(i, i2, intent);
|
||||
}
|
||||
if (i2 == -1 && i != 17 && i == 18) {
|
||||
String stringExtra = intent.getStringExtra("country_code");
|
||||
String stringExtra2 = intent.getStringExtra("country_name");
|
||||
this.countryCodeTextView.setText(stringExtra + " (" + stringExtra2 + ") ");
|
||||
}
|
||||
}
|
||||
|
||||
public void onCountryCodeAction(View view) {
|
||||
String charSequence = this.countryCodeTextView.getText().toString();
|
||||
String substring = !TextUtils.isEmpty(charSequence) ? charSequence.substring(charSequence.indexOf("+"), charSequence.lastIndexOf("(") - 1) : null;
|
||||
Postcard a = ARouter.b().a("/account/countrycode");
|
||||
a.a("selected_code", substring);
|
||||
a.a(this, 18);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_login);
|
||||
ButterKnife.a(this);
|
||||
EventBus.b().c(this);
|
||||
initView();
|
||||
G0();
|
||||
this.a.b();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onDestroy() {
|
||||
EventBus.b().d(this);
|
||||
SoftKeyBoardListener softKeyBoardListener = this.c;
|
||||
if (softKeyBoardListener != null) {
|
||||
softKeyBoardListener.a();
|
||||
this.c = null;
|
||||
}
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
public void onFindPasswordAction(View view) {
|
||||
FindPasswordActivity.start(this, this.phoneEditText.getText().toString().trim(), this.countryCodeTextView.getText().toString().trim());
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onHandleUiEvent(MessageEvent messageEvent) {
|
||||
int type = messageEvent.getType();
|
||||
if (type == 0) {
|
||||
finish();
|
||||
} else if (type == 4 || type == 7) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
public void onLoginAction(View view) {
|
||||
if (!NetWorkUtil.b(this)) {
|
||||
toastError(getString(R.string.network_error));
|
||||
return;
|
||||
}
|
||||
String trim = this.phoneEditText.getText().toString().trim();
|
||||
String trim2 = this.countryCodeTextView.getText().toString().trim();
|
||||
if (!trim.contains("@") && TextUtils.isEmpty(trim2)) {
|
||||
this.countryCodeParent.setVisibility(0);
|
||||
this.rlTips.setVisibility(8);
|
||||
this.countryCodeParent.startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
String replace = trim.contains("@") ? "" : trim2.substring(trim2.indexOf("+") + 1, trim2.indexOf("(") - 1).replace(" ", "");
|
||||
if (!trim.contains("@") && !StringUtils.f(trim)) {
|
||||
this.countryCodeParent.setVisibility(8);
|
||||
this.rlTips.setVisibility(0);
|
||||
this.rlTips.startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
String trim3 = this.passwordEditText.getText().toString().trim();
|
||||
if (trim3.length() < 6) {
|
||||
toastError(getString(R.string.password_len_error_1));
|
||||
return;
|
||||
}
|
||||
if (trim3.length() > 16) {
|
||||
toastError(getString(R.string.password_len_error_2));
|
||||
return;
|
||||
}
|
||||
if (!com.ubt.jimu.utils.TextUtils.d(trim3)) {
|
||||
toastError(getString(R.string.password_len_error_3));
|
||||
return;
|
||||
}
|
||||
this.a.b(replace + trim, Md5Utils.a(trim3));
|
||||
}
|
||||
|
||||
public void onRegisterAction(View view) {
|
||||
Postcard a = ARouter.b().a("/account/register");
|
||||
a.a("back_path", "/account/login");
|
||||
a.a("loginType", 1);
|
||||
a.a(this, 17);
|
||||
}
|
||||
|
||||
@Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onSaveInstanceState(Bundle bundle) {
|
||||
super.onSaveInstanceState(bundle);
|
||||
}
|
||||
|
||||
public static void start(Context context, int i) {
|
||||
ARouter.b().a("/account/login").a((Activity) context, i);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.LoginContract$View
|
||||
public void b(User user) {
|
||||
String str;
|
||||
hideLoading();
|
||||
String trim = this.phoneEditText.getText().toString().trim();
|
||||
String trim2 = this.countryCodeTextView.getText().toString().trim();
|
||||
String str2 = "";
|
||||
if (trim.contains("@")) {
|
||||
str = "1";
|
||||
} else {
|
||||
str2 = trim2.substring(trim2.indexOf("+") + 1, trim2.indexOf("(") - 1).replace(" ", "");
|
||||
str = "0";
|
||||
}
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("account", str2 + trim);
|
||||
bundle.putString("account_type", str);
|
||||
bundle.putSerializable("user", user);
|
||||
Postcard a = ARouter.b().a("/account/captcha");
|
||||
a.a("extra", bundle);
|
||||
a.a(this, 19);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.LoginContract$View
|
||||
public void c(User user) {
|
||||
hideLoading();
|
||||
g(user);
|
||||
}
|
||||
|
||||
@Override // com.ubtech.view.BaseView
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void setPresenter(LoginContract$Presenter loginContract$Presenter) {
|
||||
this.a = loginContract$Presenter;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.LoginContract$View
|
||||
public void c(String str) {
|
||||
this.countryCodeTextView.setText(str.substring(str.indexOf("+")) + " (" + str.substring(0, str.indexOf("+")) + ") ");
|
||||
}
|
||||
}
|
||||
107
sources/com/ubt/jimu/user/view/LoginActivity_ViewBinding.java
Normal file
107
sources/com/ubt/jimu/user/view/LoginActivity_ViewBinding.java
Normal file
@@ -0,0 +1,107 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.DebouncingOnClickListener;
|
||||
import butterknife.internal.Utils;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.widgets.ClearEditText;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class LoginActivity_ViewBinding implements Unbinder {
|
||||
private LoginActivity b;
|
||||
private View c;
|
||||
private View d;
|
||||
private View e;
|
||||
private View f;
|
||||
private View g;
|
||||
|
||||
public LoginActivity_ViewBinding(final LoginActivity loginActivity, View view) {
|
||||
this.b = loginActivity;
|
||||
loginActivity.phoneEditText = (ClearEditText) Utils.b(view, R.id.phoneEditText, "field 'phoneEditText'", ClearEditText.class);
|
||||
loginActivity.passwordEditText = (ClearEditText) Utils.b(view, R.id.passwordEditText, "field 'passwordEditText'", ClearEditText.class);
|
||||
View a = Utils.a(view, R.id.countryCodeTextView, "field 'countryCodeTextView' and method 'onCountryCodeAction'");
|
||||
loginActivity.countryCodeTextView = (TextView) Utils.a(a, R.id.countryCodeTextView, "field 'countryCodeTextView'", TextView.class);
|
||||
this.c = a;
|
||||
a.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.LoginActivity_ViewBinding.1
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
loginActivity.onCountryCodeAction(view2);
|
||||
}
|
||||
});
|
||||
View a2 = Utils.a(view, R.id.loginLayout, "field 'loginLayout' and method 'onLoginAction'");
|
||||
loginActivity.loginLayout = (Button) Utils.a(a2, R.id.loginLayout, "field 'loginLayout'", Button.class);
|
||||
this.d = a2;
|
||||
a2.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.LoginActivity_ViewBinding.2
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
loginActivity.onLoginAction(view2);
|
||||
}
|
||||
});
|
||||
loginActivity.qqImageView = (ImageView) Utils.b(view, R.id.qqImageView, "field 'qqImageView'", ImageView.class);
|
||||
loginActivity.wechatImageView = (ImageView) Utils.b(view, R.id.wechatImageView, "field 'wechatImageView'", ImageView.class);
|
||||
loginActivity.twitterImageView = (ImageView) Utils.b(view, R.id.twitterImageView, "field 'twitterImageView'", ImageView.class);
|
||||
loginActivity.facebookImageView = (ImageView) Utils.b(view, R.id.facebookImageView, "field 'facebookImageView'", ImageView.class);
|
||||
View a3 = Utils.a(view, R.id.findPwdTextView, "field 'findPwdTextView' and method 'onFindPasswordAction'");
|
||||
loginActivity.findPwdTextView = (TextView) Utils.a(a3, R.id.findPwdTextView, "field 'findPwdTextView'", TextView.class);
|
||||
this.e = a3;
|
||||
a3.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.LoginActivity_ViewBinding.3
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
loginActivity.onFindPasswordAction(view2);
|
||||
}
|
||||
});
|
||||
loginActivity.countryCodeParent = (RelativeLayout) Utils.b(view, R.id.countryCodeParent, "field 'countryCodeParent'", RelativeLayout.class);
|
||||
loginActivity.rlTips = (RelativeLayout) Utils.b(view, R.id.rl_tips_input_error, "field 'rlTips'", RelativeLayout.class);
|
||||
View a4 = Utils.a(view, R.id.rightArrowImageView, "method 'onCountryCodeAction'");
|
||||
this.f = a4;
|
||||
a4.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.LoginActivity_ViewBinding.4
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
loginActivity.onCountryCodeAction(view2);
|
||||
}
|
||||
});
|
||||
View a5 = Utils.a(view, R.id.registerTextView, "method 'onRegisterAction'");
|
||||
this.g = a5;
|
||||
a5.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.LoginActivity_ViewBinding.5
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
loginActivity.onRegisterAction(view2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
LoginActivity loginActivity = this.b;
|
||||
if (loginActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
loginActivity.phoneEditText = null;
|
||||
loginActivity.passwordEditText = null;
|
||||
loginActivity.countryCodeTextView = null;
|
||||
loginActivity.loginLayout = null;
|
||||
loginActivity.qqImageView = null;
|
||||
loginActivity.wechatImageView = null;
|
||||
loginActivity.twitterImageView = null;
|
||||
loginActivity.facebookImageView = null;
|
||||
loginActivity.findPwdTextView = null;
|
||||
loginActivity.countryCodeParent = null;
|
||||
loginActivity.rlTips = null;
|
||||
this.c.setOnClickListener(null);
|
||||
this.c = null;
|
||||
this.d.setOnClickListener(null);
|
||||
this.d = null;
|
||||
this.e.setOnClickListener(null);
|
||||
this.e = null;
|
||||
this.f.setOnClickListener(null);
|
||||
this.f = null;
|
||||
this.g.setOnClickListener(null);
|
||||
this.g = null;
|
||||
}
|
||||
}
|
||||
36
sources/com/ubt/jimu/user/view/MyPublishActivity.java
Normal file
36
sources/com/ubt/jimu/user/view/MyPublishActivity.java
Normal file
@@ -0,0 +1,36 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import butterknife.ButterKnife;
|
||||
import com.recyclelib.URecyclerView;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.widgets.LoadingView;
|
||||
import com.ubt.jimu.widgets.screenAdaptive.XRelativeLayout;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class MyPublishActivity extends BaseActivity {
|
||||
ImageView imgRight;
|
||||
LoadingView loading;
|
||||
XRelativeLayout titleBackground;
|
||||
TextView tvReturn;
|
||||
TextView tvTitle;
|
||||
URecyclerView urPublish;
|
||||
|
||||
private void bindClick() {
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_mypublish);
|
||||
ButterKnife.a(this);
|
||||
bindClick();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
public void relayout() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.recyclelib.URecyclerView;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.widgets.LoadingView;
|
||||
import com.ubt.jimu.widgets.screenAdaptive.XRelativeLayout;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class MyPublishActivity_ViewBinding implements Unbinder {
|
||||
private MyPublishActivity b;
|
||||
|
||||
public MyPublishActivity_ViewBinding(MyPublishActivity myPublishActivity, View view) {
|
||||
this.b = myPublishActivity;
|
||||
myPublishActivity.loading = (LoadingView) Utils.b(view, R.id.loading, "field 'loading'", LoadingView.class);
|
||||
myPublishActivity.urPublish = (URecyclerView) Utils.b(view, R.id.ur_publish, "field 'urPublish'", URecyclerView.class);
|
||||
myPublishActivity.titleBackground = (XRelativeLayout) Utils.b(view, R.id.title_background, "field 'titleBackground'", XRelativeLayout.class);
|
||||
myPublishActivity.tvReturn = (TextView) Utils.b(view, R.id.tv_return, "field 'tvReturn'", TextView.class);
|
||||
myPublishActivity.tvTitle = (TextView) Utils.b(view, R.id.tv_title, "field 'tvTitle'", TextView.class);
|
||||
myPublishActivity.imgRight = (ImageView) Utils.b(view, R.id.img_right, "field 'imgRight'", ImageView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
MyPublishActivity myPublishActivity = this.b;
|
||||
if (myPublishActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
myPublishActivity.loading = null;
|
||||
myPublishActivity.urPublish = null;
|
||||
myPublishActivity.titleBackground = null;
|
||||
myPublishActivity.tvReturn = null;
|
||||
myPublishActivity.tvTitle = null;
|
||||
myPublishActivity.imgRight = null;
|
||||
}
|
||||
}
|
||||
40
sources/com/ubt/jimu/user/view/PostListActivity.java
Normal file
40
sources/com/ubt/jimu/user/view/PostListActivity.java
Normal file
@@ -0,0 +1,40 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import butterknife.ButterKnife;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.user.presenter.PostPresenter;
|
||||
import com.ubt.jimu.user.view.fragment.PostListFragment;
|
||||
import com.ubtech.utils.ActivityUtils;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class PostListActivity extends BaseActivity {
|
||||
private void D0() {
|
||||
if (((PostListFragment) ActivityUtils.a(getSupportFragmentManager(), "tag_post_fragment")) == null) {
|
||||
PostListFragment b = PostListFragment.b();
|
||||
ActivityUtils.b(getSupportFragmentManager(), b, R.id.contentFrame, "tag_post_fragment");
|
||||
new PostPresenter(this, b);
|
||||
}
|
||||
}
|
||||
|
||||
public void onBackAction(View view) {
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_post_list);
|
||||
ButterKnife.a(this);
|
||||
D0();
|
||||
}
|
||||
|
||||
public void onPostAction(View view) {
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
public void relayout() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.view.View;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.DebouncingOnClickListener;
|
||||
import butterknife.internal.Utils;
|
||||
import com.ubt.jimu.R;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class PostListActivity_ViewBinding implements Unbinder {
|
||||
private PostListActivity b;
|
||||
private View c;
|
||||
private View d;
|
||||
|
||||
public PostListActivity_ViewBinding(final PostListActivity postListActivity, View view) {
|
||||
this.b = postListActivity;
|
||||
View a = Utils.a(view, R.id.backImageView, "method 'onBackAction'");
|
||||
this.c = a;
|
||||
a.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.PostListActivity_ViewBinding.1
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
postListActivity.onBackAction(view2);
|
||||
}
|
||||
});
|
||||
View a2 = Utils.a(view, R.id.postImageView, "method 'onPostAction'");
|
||||
this.d = a2;
|
||||
a2.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.PostListActivity_ViewBinding.2
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
postListActivity.onPostAction(view2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
if (this.b == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
this.c.setOnClickListener(null);
|
||||
this.c = null;
|
||||
this.d.setOnClickListener(null);
|
||||
this.d = null;
|
||||
}
|
||||
}
|
||||
80
sources/com/ubt/jimu/user/view/PraiseActivity.java
Normal file
80
sources/com/ubt/jimu/user/view/PraiseActivity.java
Normal file
@@ -0,0 +1,80 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import butterknife.ButterKnife;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.JimuApplication;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.user.presenter.PraisePresenter;
|
||||
import com.ubt.jimu.user.view.fragment.PraiseFragment;
|
||||
import com.ubtech.utils.ActivityUtils;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class PraiseActivity extends BaseActivity {
|
||||
private long a;
|
||||
CardView centerCardView;
|
||||
|
||||
private void D0() {
|
||||
Bundle bundleExtra = getIntent().getBundleExtra("extra");
|
||||
if (bundleExtra != null) {
|
||||
this.a = bundleExtra.getLong("view_user_id");
|
||||
}
|
||||
}
|
||||
|
||||
private void E0() {
|
||||
if (((PraiseFragment) ActivityUtils.a(getSupportFragmentManager(), "tag_fragment_praise")) == null) {
|
||||
PraiseFragment a = PraiseFragment.a(this.a);
|
||||
ActivityUtils.a(getSupportFragmentManager(), a, R.id.contentFrame, "tag_fragment_praise");
|
||||
new PraisePresenter(this, a);
|
||||
}
|
||||
}
|
||||
|
||||
public static void a(UserCenterActivity userCenterActivity, Bundle bundle) {
|
||||
Intent intent = new Intent(userCenterActivity, (Class<?>) PraiseActivity.class);
|
||||
intent.putExtra("extra", bundle);
|
||||
userCenterActivity.startActivity(intent);
|
||||
}
|
||||
|
||||
public void onCenterCardView(View view) {
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_praise);
|
||||
ButterKnife.a(this);
|
||||
D0();
|
||||
relayout();
|
||||
E0();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
public void onDismiss(View view) {
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
public void relayout() {
|
||||
float f;
|
||||
float f2;
|
||||
if (JimuApplication.l().i()) {
|
||||
f = 0.549f;
|
||||
f2 = 0.54f;
|
||||
} else {
|
||||
f = 0.562f;
|
||||
f2 = 0.712f;
|
||||
}
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) this.centerCardView.getLayoutParams();
|
||||
layoutParams.width = (int) (getScreenWidth() * f);
|
||||
layoutParams.height = (int) (getScreenHeight() * f2);
|
||||
this.centerCardView.setLayoutParams(layoutParams);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.DebouncingOnClickListener;
|
||||
import butterknife.internal.Utils;
|
||||
import com.ubt.jimu.R;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class PraiseActivity_ViewBinding implements Unbinder {
|
||||
private PraiseActivity b;
|
||||
private View c;
|
||||
private View d;
|
||||
|
||||
public PraiseActivity_ViewBinding(final PraiseActivity praiseActivity, View view) {
|
||||
this.b = praiseActivity;
|
||||
View a = Utils.a(view, R.id.centerCardView, "field 'centerCardView' and method 'onCenterCardView'");
|
||||
praiseActivity.centerCardView = (CardView) Utils.a(a, R.id.centerCardView, "field 'centerCardView'", CardView.class);
|
||||
this.c = a;
|
||||
a.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.PraiseActivity_ViewBinding.1
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
praiseActivity.onCenterCardView(view2);
|
||||
}
|
||||
});
|
||||
View a2 = Utils.a(view, R.id.rootView, "method 'onDismiss'");
|
||||
this.d = a2;
|
||||
a2.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.PraiseActivity_ViewBinding.2
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
praiseActivity.onDismiss(view2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
PraiseActivity praiseActivity = this.b;
|
||||
if (praiseActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
praiseActivity.centerCardView = null;
|
||||
this.c.setOnClickListener(null);
|
||||
this.c = null;
|
||||
this.d.setOnClickListener(null);
|
||||
this.d = null;
|
||||
}
|
||||
}
|
||||
71
sources/com/ubt/jimu/user/view/RankListActivity.java
Normal file
71
sources/com/ubt/jimu/user/view/RankListActivity.java
Normal file
@@ -0,0 +1,71 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import butterknife.ButterKnife;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.JimuApplication;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.user.presenter.RankPresenter;
|
||||
import com.ubt.jimu.user.view.fragment.RankFragment;
|
||||
import com.ubtech.utils.ActivityUtils;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class RankListActivity extends BaseActivity {
|
||||
private long a;
|
||||
CardView centerCardView;
|
||||
FrameLayout rootView;
|
||||
|
||||
private void D0() {
|
||||
this.a = getIntent().getBundleExtra("extra").getLong("view_user_id");
|
||||
}
|
||||
|
||||
private void E0() {
|
||||
if (((RankFragment) ActivityUtils.a(getSupportFragmentManager(), "tag_fragment_rank")) == null) {
|
||||
RankFragment a = RankFragment.a(this.a);
|
||||
ActivityUtils.a(getSupportFragmentManager(), a, R.id.contentFrame, "tag_fragment_rank");
|
||||
new RankPresenter(this, a);
|
||||
}
|
||||
}
|
||||
|
||||
public void onCenterCardView(View view) {
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_rank_list);
|
||||
ButterKnife.a(this);
|
||||
D0();
|
||||
relayout();
|
||||
E0();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
public void onDismiss(View view) {
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
public void relayout() {
|
||||
float f;
|
||||
float f2;
|
||||
if (JimuApplication.l().i()) {
|
||||
f = 0.549f;
|
||||
f2 = 0.54f;
|
||||
} else {
|
||||
f = 0.562f;
|
||||
f2 = 0.712f;
|
||||
}
|
||||
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) this.centerCardView.getLayoutParams();
|
||||
layoutParams.width = (int) (getScreenWidth() * f);
|
||||
layoutParams.height = (int) (getScreenHeight() * f2);
|
||||
this.centerCardView.setLayoutParams(layoutParams);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.DebouncingOnClickListener;
|
||||
import butterknife.internal.Utils;
|
||||
import com.ubt.jimu.R;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class RankListActivity_ViewBinding implements Unbinder {
|
||||
private RankListActivity b;
|
||||
private View c;
|
||||
private View d;
|
||||
|
||||
public RankListActivity_ViewBinding(final RankListActivity rankListActivity, View view) {
|
||||
this.b = rankListActivity;
|
||||
View a = Utils.a(view, R.id.rootView, "field 'rootView' and method 'onDismiss'");
|
||||
rankListActivity.rootView = (FrameLayout) Utils.a(a, R.id.rootView, "field 'rootView'", FrameLayout.class);
|
||||
this.c = a;
|
||||
a.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.RankListActivity_ViewBinding.1
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
rankListActivity.onDismiss(view2);
|
||||
}
|
||||
});
|
||||
View a2 = Utils.a(view, R.id.centerCardView, "field 'centerCardView' and method 'onCenterCardView'");
|
||||
rankListActivity.centerCardView = (CardView) Utils.a(a2, R.id.centerCardView, "field 'centerCardView'", CardView.class);
|
||||
this.d = a2;
|
||||
a2.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.RankListActivity_ViewBinding.2
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
rankListActivity.onCenterCardView(view2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
RankListActivity rankListActivity = this.b;
|
||||
if (rankListActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
rankListActivity.rootView = null;
|
||||
rankListActivity.centerCardView = null;
|
||||
this.c.setOnClickListener(null);
|
||||
this.c = null;
|
||||
this.d.setOnClickListener(null);
|
||||
this.d = null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import com.alibaba.android.arouter.facade.service.SerializationService;
|
||||
import com.alibaba.android.arouter.facade.template.ISyringe;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class RegisterActivity$$ARouter$$Autowired implements ISyringe {
|
||||
private SerializationService serializationService;
|
||||
|
||||
@Override // com.alibaba.android.arouter.facade.template.ISyringe
|
||||
public void inject(Object obj) {
|
||||
this.serializationService = (SerializationService) ARouter.b().a(SerializationService.class);
|
||||
RegisterActivity registerActivity = (RegisterActivity) obj;
|
||||
registerActivity.loginType = registerActivity.getIntent().getIntExtra("loginType", registerActivity.loginType);
|
||||
}
|
||||
}
|
||||
991
sources/com/ubt/jimu/user/view/RegisterActivity.java
Normal file
991
sources/com/ubt/jimu/user/view/RegisterActivity.java
Normal file
@@ -0,0 +1,991 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.text.SpannableString;
|
||||
import android.text.TextUtils;
|
||||
import android.text.method.HideReturnsTransformationMethod;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.text.method.PasswordTransformationMethod;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.NumberPicker;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ViewFlipper;
|
||||
import butterknife.ButterKnife;
|
||||
import com.alibaba.android.arouter.facade.Postcard;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.facebook.AccessToken;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.activity.PresenterActivity;
|
||||
import com.ubt.jimu.base.cache.SharePreferenceHelper;
|
||||
import com.ubt.jimu.base.db.user.UserDbHandler;
|
||||
import com.ubt.jimu.base.entities.ApiStatus;
|
||||
import com.ubt.jimu.base.entities.User;
|
||||
import com.ubt.jimu.base.event.MessageEvent;
|
||||
import com.ubt.jimu.user.Constant;
|
||||
import com.ubt.jimu.user.contract.RegisterContract$Presenter;
|
||||
import com.ubt.jimu.user.contract.RegisterContract$View;
|
||||
import com.ubt.jimu.user.model.RefHolder;
|
||||
import com.ubt.jimu.user.presenter.RegisterPresenter;
|
||||
import com.ubt.jimu.user.repository.GdprWorker;
|
||||
import com.ubt.jimu.user.view.RegisterActivity;
|
||||
import com.ubt.jimu.user.view.picker.LoopListener;
|
||||
import com.ubt.jimu.user.view.picker.LoopView;
|
||||
import com.ubt.jimu.utils.AnimUtils;
|
||||
import com.ubt.jimu.utils.LocaleUtils;
|
||||
import com.ubt.jimu.utils.ShortcutHelper;
|
||||
import com.ubt.jimu.utils.SoftKeyBoardListener;
|
||||
import com.ubt.jimu.widgets.ClearEditText;
|
||||
import com.ubt.jimu.widgets.ClickableSpanListener;
|
||||
import com.ubt.jimu.widgets.JAlertDialog;
|
||||
import com.ubt.jimu.widgets.NavigationBarView;
|
||||
import com.ubt.jimu.widgets.UDialog;
|
||||
import com.ubtech.utils.StringUtils;
|
||||
import com.ubtrobot.log.ALog;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class RegisterActivity extends PresenterActivity<RegisterContract$Presenter> implements RegisterContract$View {
|
||||
private static Handler i = new Handler();
|
||||
ClearEditText accountEditText;
|
||||
private SoftKeyBoardListener b;
|
||||
ClearEditText captchaEditText;
|
||||
CheckBox cbPolicy;
|
||||
TextView countDownTextView;
|
||||
RelativeLayout countryCodeParent;
|
||||
TextView countryCodeTextView;
|
||||
protected String e;
|
||||
ClearEditText emailEditText;
|
||||
ImageView eyeImageView;
|
||||
private JAlertDialog f;
|
||||
private CountDownTimer g;
|
||||
ClearEditText guardianEditText;
|
||||
TextView guardianEmailTextView;
|
||||
ImageView guardianEyeImageView;
|
||||
ClearEditText guardianPasswordEditText;
|
||||
private BroadcastReceiver h;
|
||||
protected int loginType;
|
||||
NavigationBarView navigationBarView;
|
||||
ClearEditText page3PasswordEditText;
|
||||
LoopView pickerUserAge;
|
||||
LinearLayout policyLayout;
|
||||
RelativeLayout rlTips;
|
||||
View rootView;
|
||||
TextView tvPolicy;
|
||||
ViewFlipper viewFlipper;
|
||||
private volatile boolean c = false;
|
||||
private AtomicInteger d = new AtomicInteger(0);
|
||||
|
||||
/* renamed from: com.ubt.jimu.user.view.RegisterActivity$12, reason: invalid class name */
|
||||
class AnonymousClass12 extends BroadcastReceiver {
|
||||
AnonymousClass12() {
|
||||
}
|
||||
|
||||
public /* synthetic */ void a(View view) {
|
||||
RegisterActivity.this.E0();
|
||||
}
|
||||
|
||||
public /* synthetic */ void b(View view) {
|
||||
RegisterActivity.this.d.set(4);
|
||||
RegisterActivity.this.navigationBarView.setRightIcon(R.drawable.ic_nav_finish);
|
||||
RegisterActivity.this.policyLayout.setVisibility(0);
|
||||
RegisterActivity registerActivity = RegisterActivity.this;
|
||||
registerActivity.viewFlipper.setDisplayedChild(registerActivity.d.get());
|
||||
if (TextUtils.isEmpty(RegisterActivity.this.guardianEmailTextView.getText().toString().trim())) {
|
||||
RegisterActivity registerActivity2 = RegisterActivity.this;
|
||||
registerActivity2.guardianEmailTextView.setText(registerActivity2.emailEditText.getText().toString().trim());
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.content.BroadcastReceiver
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (intent.getAction().equals("com.jimu.action_guardian_email")) {
|
||||
Log.i("pushReceiver", "onReceive");
|
||||
RefHolder.a((String) null);
|
||||
RegisterActivity registerActivity = RegisterActivity.this;
|
||||
if (2 == registerActivity.loginType) {
|
||||
UDialog.Builder builder = new UDialog.Builder(registerActivity);
|
||||
builder.a(R.string.email_3rdlogin_checked_success);
|
||||
builder.a(R.string.confirm, new View.OnClickListener() { // from class: com.ubt.jimu.user.view.j
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
RegisterActivity.AnonymousClass12.this.a(view);
|
||||
}
|
||||
});
|
||||
builder.a().show();
|
||||
return;
|
||||
}
|
||||
UDialog.Builder builder2 = new UDialog.Builder(registerActivity);
|
||||
builder2.a(R.string.email_checked_success);
|
||||
builder2.a(R.string.confirm, new View.OnClickListener() { // from class: com.ubt.jimu.user.view.i
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
RegisterActivity.AnonymousClass12.this.b(view);
|
||||
}
|
||||
});
|
||||
builder2.a().show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* renamed from: com.ubt.jimu.user.view.RegisterActivity$6, reason: invalid class name */
|
||||
class AnonymousClass6 implements GdprWorker.IUserPackInfo {
|
||||
AnonymousClass6() {
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.repository.GdprWorker.IUserPackInfo
|
||||
public void a() {
|
||||
RegisterActivity.i.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.k
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
RegisterActivity.AnonymousClass6.this.b();
|
||||
}
|
||||
}, 2000L);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.repository.GdprWorker.IUserPackInfo
|
||||
public void a(String str, String str2, int i, String str3) {
|
||||
}
|
||||
|
||||
public /* synthetic */ void b() {
|
||||
if (RegisterActivity.this.f != null) {
|
||||
RegisterActivity.this.f.dismiss();
|
||||
}
|
||||
EventBus.b().b(new MessageEvent(0));
|
||||
RegisterActivity.this.finish();
|
||||
}
|
||||
}
|
||||
|
||||
/* renamed from: com.ubt.jimu.user.view.RegisterActivity$9, reason: invalid class name */
|
||||
class AnonymousClass9 implements GdprWorker.IUserPackInfo {
|
||||
AnonymousClass9() {
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.repository.GdprWorker.IUserPackInfo
|
||||
public void a() {
|
||||
RegisterActivity.i.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.l
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
RegisterActivity.AnonymousClass9.this.b();
|
||||
}
|
||||
}, 2000L);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.repository.GdprWorker.IUserPackInfo
|
||||
public void a(String str, String str2, int i, String str3) {
|
||||
}
|
||||
|
||||
public /* synthetic */ void b() {
|
||||
if (RegisterActivity.this.f != null) {
|
||||
RegisterActivity.this.f.dismiss();
|
||||
}
|
||||
RegisterActivity.this.Q0();
|
||||
UserCenterActivity.start(RegisterActivity.this);
|
||||
RegisterActivity.this.finish();
|
||||
}
|
||||
}
|
||||
|
||||
public RegisterActivity() {
|
||||
new NumberPicker.Formatter(this) { // from class: com.ubt.jimu.user.view.RegisterActivity.1
|
||||
@Override // android.widget.NumberPicker.Formatter
|
||||
public String format(int i2) {
|
||||
return i2 + "";
|
||||
}
|
||||
};
|
||||
this.h = new AnonymousClass12();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public boolean E0() {
|
||||
Map<String, String> b = RefHolder.b();
|
||||
if (b == null) {
|
||||
return false;
|
||||
}
|
||||
String str = b.get("nick_name");
|
||||
String str2 = b.get("head_image");
|
||||
((RegisterContract$Presenter) this.a).a(b.get(AccessToken.ACCESS_TOKEN_KEY), b.get("ubtsocial_app_id"), b.get("social_type"), b.get("ubtsocial_user_id"), b.get("ubtsocial_user_id"), TextUtils.isEmpty(str) ? "" : str, TextUtils.isEmpty(str2) ? "" : str2);
|
||||
RefHolder.a();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void F0() {
|
||||
Intent intent = getIntent();
|
||||
int intExtra = intent.getIntExtra(SharePreferenceHelper.SP_KEY_FLIPPER_PAGE_INDEX, 0);
|
||||
if (intExtra > 0) {
|
||||
this.viewFlipper.setDisplayedChild(intExtra);
|
||||
this.d.set(intExtra);
|
||||
a((Context) this);
|
||||
}
|
||||
this.guardianEmailTextView.setText(intent.getStringExtra(SharePreferenceHelper.SP_KEY_REGISTER_ACCOUNT));
|
||||
}
|
||||
|
||||
private void G0() {
|
||||
this.accountEditText.setImeOptions(5);
|
||||
this.accountEditText.setImeOptions(268435456);
|
||||
this.captchaEditText.setImeOptions(5);
|
||||
this.captchaEditText.setImeOptions(268435456);
|
||||
this.page3PasswordEditText.setImeOptions(6);
|
||||
this.page3PasswordEditText.setImeOptions(268435456);
|
||||
this.guardianEditText.setImeOptions(5);
|
||||
this.guardianEditText.setImeOptions(268435456);
|
||||
this.emailEditText.setImeOptions(6);
|
||||
this.emailEditText.setImeOptions(268435456);
|
||||
}
|
||||
|
||||
private void H0() {
|
||||
this.accountEditText.setOnFocuschangeListener(new ClearEditText.onFocuschangeListener() { // from class: com.ubt.jimu.user.view.RegisterActivity.2
|
||||
@Override // com.ubt.jimu.widgets.ClearEditText.onFocuschangeListener
|
||||
public void a(boolean z) {
|
||||
if (z) {
|
||||
if (RegisterActivity.this.rlTips.getVisibility() == 0) {
|
||||
RegisterActivity.this.rlTips.setVisibility(8);
|
||||
}
|
||||
} else if (TextUtils.isEmpty(RegisterActivity.this.accountEditText.getText().toString().trim())) {
|
||||
RegisterActivity.this.rlTips.setVisibility(8);
|
||||
RegisterActivity.this.countryCodeParent.setVisibility(8);
|
||||
} else {
|
||||
if (StringUtils.f(RegisterActivity.this.accountEditText.getText().toString().trim())) {
|
||||
RegisterActivity.this.rlTips.setVisibility(8);
|
||||
RegisterActivity.this.countryCodeParent.setVisibility(0);
|
||||
return;
|
||||
}
|
||||
RegisterActivity.this.countryCodeParent.setVisibility(8);
|
||||
if (RegisterActivity.this.accountEditText.getText().toString().trim().contains("@")) {
|
||||
RegisterActivity.this.rlTips.setVisibility(8);
|
||||
} else {
|
||||
RegisterActivity.this.rlTips.setVisibility(0);
|
||||
RegisterActivity.this.rlTips.startAnimation(AnimUtils.a(5));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
this.b = new SoftKeyBoardListener(this);
|
||||
SoftKeyBoardListener.a(this.b, new SoftKeyBoardListener.OnSoftKeyBoardChangeListener() { // from class: com.ubt.jimu.user.view.RegisterActivity.3
|
||||
@Override // com.ubt.jimu.utils.SoftKeyBoardListener.OnSoftKeyBoardChangeListener
|
||||
public void a(int i2) {
|
||||
if (RegisterActivity.this.accountEditText.hasFocus()) {
|
||||
RegisterActivity.this.accountEditText.clearFocus();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.utils.SoftKeyBoardListener.OnSoftKeyBoardChangeListener
|
||||
public void b(int i2) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private boolean I0() {
|
||||
try {
|
||||
return Integer.valueOf(this.pickerUserAge.getCurrentItemValue()).intValue() >= 16;
|
||||
} catch (NumberFormatException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private void J0() {
|
||||
if (this.pickerUserAge.getCurrentItem() == 0) {
|
||||
findViewById(R.id.tvChooseAge).startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
if (2 == this.loginType && !this.cbPolicy.isChecked()) {
|
||||
this.policyLayout.startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
if (2 != this.loginType) {
|
||||
if (!I0()) {
|
||||
this.d.set(2);
|
||||
this.navigationBarView.setRightIcon(R.drawable.ic_nav_next);
|
||||
return;
|
||||
} else {
|
||||
this.d.incrementAndGet();
|
||||
this.viewFlipper.setDisplayedChild(this.d.get());
|
||||
this.policyLayout.setVisibility(0);
|
||||
this.navigationBarView.setRightIcon(R.drawable.ic_nav_finish);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!I0()) {
|
||||
this.d.set(2);
|
||||
this.navigationBarView.setRightIcon(R.drawable.ic_nav_next);
|
||||
this.policyLayout.setVisibility(8);
|
||||
} else {
|
||||
if (E0()) {
|
||||
return;
|
||||
}
|
||||
setResult(0);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
private void K0() {
|
||||
String trim = this.accountEditText.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(trim)) {
|
||||
findViewById(R.id.accountParent).startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
String trim2 = this.countryCodeTextView.getText().toString().trim();
|
||||
if (!trim.contains("@") && TextUtils.isEmpty(trim2)) {
|
||||
findViewById(R.id.countryCodeParent).startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
if (com.ubt.jimu.utils.TextUtils.b(trim) && !com.ubt.jimu.utils.TextUtils.a(trim)) {
|
||||
toastError(getString(R.string.error_email_format));
|
||||
return;
|
||||
}
|
||||
this.e = (trim.contains("@") ? "" : trim2.substring(trim2.indexOf("+") + 1, trim2.indexOf("(") - 1).replace(" ", "")) + trim;
|
||||
this.d.incrementAndGet();
|
||||
this.viewFlipper.setDisplayedChild(this.d.get());
|
||||
this.policyLayout.setVisibility(0);
|
||||
this.navigationBarView.setRightIcon(R.drawable.ic_nav_finish);
|
||||
}
|
||||
|
||||
private void L0() {
|
||||
String str;
|
||||
String str2;
|
||||
String trim = this.accountEditText.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(trim)) {
|
||||
findViewById(R.id.accountParent).startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
String trim2 = this.countryCodeTextView.getText().toString().trim();
|
||||
if (!trim.contains("@") && TextUtils.isEmpty(trim2)) {
|
||||
this.countryCodeParent.setVisibility(0);
|
||||
this.rlTips.setVisibility(8);
|
||||
findViewById(R.id.countryCodeParent).startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
if (!trim.contains("@") && !StringUtils.f(trim)) {
|
||||
this.countryCodeParent.setVisibility(8);
|
||||
this.rlTips.setVisibility(0);
|
||||
this.rlTips.startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
if (com.ubt.jimu.utils.TextUtils.b(trim) && !com.ubt.jimu.utils.TextUtils.a(trim)) {
|
||||
toastError(getString(R.string.error_email_format));
|
||||
return;
|
||||
}
|
||||
this.e = (trim.contains("@") ? "" : trim2.substring(trim2.indexOf("+") + 1, trim2.indexOf("(") - 1).replace(" ", "")) + trim;
|
||||
String trim3 = this.captchaEditText.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(trim3)) {
|
||||
findViewById(R.id.captchaParent).startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
String trim4 = this.page3PasswordEditText.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(trim4)) {
|
||||
findViewById(R.id.page3PasswordParent).startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
if (trim4.length() < 6) {
|
||||
toastError(getString(R.string.password_len_error_1));
|
||||
return;
|
||||
}
|
||||
if (trim4.length() > 16) {
|
||||
toastError(getString(R.string.password_len_error_2));
|
||||
return;
|
||||
}
|
||||
if (!com.ubt.jimu.utils.TextUtils.d(trim4)) {
|
||||
toastError(getString(R.string.password_len_error_3));
|
||||
return;
|
||||
}
|
||||
if (!this.cbPolicy.isChecked()) {
|
||||
this.policyLayout.startAnimation(AnimUtils.a(5));
|
||||
toastError(getResources().getString(R.string.error_read_policy_first));
|
||||
return;
|
||||
}
|
||||
String charSequence = this.countryCodeTextView.getText().toString();
|
||||
if (charSequence != null) {
|
||||
String trim5 = charSequence.trim();
|
||||
String replace = trim5.substring(trim5.indexOf("+") + 1, trim5.indexOf("(") - 1).replace(" ", "");
|
||||
str2 = trim5.substring(trim5.indexOf("(") + 1, trim5.lastIndexOf(")"));
|
||||
str = replace;
|
||||
} else {
|
||||
str = null;
|
||||
str2 = null;
|
||||
}
|
||||
((RegisterContract$Presenter) this.a).a(str, str2, this.e, trim4, trim3);
|
||||
}
|
||||
|
||||
private void M0() {
|
||||
String trim = this.guardianEditText.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(trim)) {
|
||||
findViewById(R.id.guardianParent).startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
String trim2 = this.emailEditText.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(trim2)) {
|
||||
findViewById(R.id.emailEditText).startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
if (!trim2.contains("@") || !com.ubt.jimu.utils.TextUtils.a(trim2)) {
|
||||
toastError(getString(R.string.error_email_format));
|
||||
return;
|
||||
}
|
||||
if (this.c) {
|
||||
return;
|
||||
}
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
R0();
|
||||
this.c = true;
|
||||
((RegisterContract$Presenter) this.a).a(trim, trim2, simpleDateFormat.format(new Date(calendar.getTimeInMillis())), 2 != this.loginType);
|
||||
}
|
||||
|
||||
private void N0() {
|
||||
EventBus.b().b(new MessageEvent(4));
|
||||
finish();
|
||||
}
|
||||
|
||||
private void O0() {
|
||||
String trim = this.guardianPasswordEditText.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(trim)) {
|
||||
findViewById(R.id.guardianPasswordParent).startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
if (trim.length() < 6) {
|
||||
toastError(getString(R.string.password_len_error_1));
|
||||
return;
|
||||
}
|
||||
if (trim.length() > 16) {
|
||||
toastError(getString(R.string.password_len_error_2));
|
||||
return;
|
||||
}
|
||||
if (!com.ubt.jimu.utils.TextUtils.d(trim)) {
|
||||
toastError(getString(R.string.password_len_error_3));
|
||||
} else if (!this.cbPolicy.isChecked()) {
|
||||
this.policyLayout.startAnimation(AnimUtils.a(5));
|
||||
} else {
|
||||
((RegisterContract$Presenter) this.a).d(this.guardianEmailTextView.getText().toString().trim(), trim);
|
||||
}
|
||||
}
|
||||
|
||||
private void P0() {
|
||||
IntentFilter intentFilter = new IntentFilter();
|
||||
intentFilter.addAction("com.jimu.action_guardian_email");
|
||||
registerReceiver(this.h, intentFilter);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public void Q0() {
|
||||
SharePreferenceHelper sharePreferenceHelper = new SharePreferenceHelper();
|
||||
sharePreferenceHelper.put(SharePreferenceHelper.SP_KEY_REGISTER_ACCOUNT, "");
|
||||
sharePreferenceHelper.put(SharePreferenceHelper.SP_KEY_REGISTER_BIRTHDAY, "");
|
||||
sharePreferenceHelper.put(SharePreferenceHelper.SP_KEY_FLIPPER_PAGE_INDEX, 0);
|
||||
}
|
||||
|
||||
private void R0() {
|
||||
SharePreferenceHelper sharePreferenceHelper = new SharePreferenceHelper();
|
||||
sharePreferenceHelper.put(SharePreferenceHelper.SP_KEY_REGISTER_ACCOUNT, this.emailEditText.getText().toString().trim());
|
||||
sharePreferenceHelper.put(SharePreferenceHelper.SP_KEY_FLIPPER_PAGE_INDEX, 4);
|
||||
String charSequence = this.countryCodeTextView.getText().toString();
|
||||
if (TextUtils.isEmpty(charSequence)) {
|
||||
return;
|
||||
}
|
||||
sharePreferenceHelper.put(SharePreferenceHelper.SP_KEY_REGISTER_COUNTRY, charSequence.trim());
|
||||
}
|
||||
|
||||
private void S0() {
|
||||
this.g = new CountDownTimer(60000L, 1000L) { // from class: com.ubt.jimu.user.view.RegisterActivity.11
|
||||
@Override // android.os.CountDownTimer
|
||||
public void onFinish() {
|
||||
RegisterActivity.this.countDownTextView.setText(R.string.get_captcha);
|
||||
RegisterActivity.this.countDownTextView.setClickable(true);
|
||||
RegisterActivity registerActivity = RegisterActivity.this;
|
||||
registerActivity.countDownTextView.setTextColor(registerActivity.getResources().getColor(R.color.txt_287EF1));
|
||||
}
|
||||
|
||||
@Override // android.os.CountDownTimer
|
||||
public void onTick(long j) {
|
||||
String format = String.format(RegisterActivity.this.getResources().getString(R.string.hint_seconds), Long.valueOf(j / 1000));
|
||||
RegisterActivity registerActivity = RegisterActivity.this;
|
||||
registerActivity.countDownTextView.setTextColor(registerActivity.getResources().getColor(R.color.txt_98A5B6));
|
||||
RegisterActivity.this.countDownTextView.setText(format);
|
||||
}
|
||||
};
|
||||
this.g.start();
|
||||
this.countDownTextView.setClickable(false);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.RegisterContract$View
|
||||
public void F() {
|
||||
a(R.string.waiting, R.drawable.ic_loading, true);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.RegisterContract$View
|
||||
public void H() {
|
||||
JAlertDialog jAlertDialog = this.f;
|
||||
if (jAlertDialog != null) {
|
||||
jAlertDialog.a(getString(R.string.register_fail));
|
||||
}
|
||||
i.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.RegisterActivity.10
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
if (RegisterActivity.this.f != null) {
|
||||
RegisterActivity.this.f.dismiss();
|
||||
}
|
||||
}
|
||||
}, 1000L);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.RegisterContract$View
|
||||
public void Q() {
|
||||
a(R.string.register_ing, R.drawable.ic_loading, true);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.RegisterContract$View
|
||||
public void T() {
|
||||
Log.i(this.TAG, "onStartSendCaptcha");
|
||||
a(R.string.have_send_captcha, R.drawable.ic_loading, false);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.RegisterContract$View
|
||||
public void i(String str) {
|
||||
this.c = false;
|
||||
toastError(str);
|
||||
}
|
||||
|
||||
public void initView() {
|
||||
G0();
|
||||
this.viewFlipper.setDisplayedChild(0);
|
||||
((RegisterContract$Presenter) this.a).b();
|
||||
P0();
|
||||
F0();
|
||||
String string = getString(R.string.terms_for_usage);
|
||||
String string2 = getString(R.string.add_policy);
|
||||
String string3 = getString(R.string.child_privaty_policy_register);
|
||||
String string4 = getString(R.string.registration_statments, new Object[]{string, string2});
|
||||
if (LocaleUtils.g()) {
|
||||
string4 = getString(R.string.registration_statments, new Object[]{string + getString(R.string.comma) + string2, string3});
|
||||
}
|
||||
this.navigationBarView.setListener(new NavigationBarView.OnActionClickListener.Stub() { // from class: com.ubt.jimu.user.view.RegisterActivity.4
|
||||
@Override // com.ubt.jimu.widgets.NavigationBarView.OnActionClickListener.Stub
|
||||
public void onLeftClick(View view) {
|
||||
RegisterActivity.this.onBackAction(view);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.widgets.NavigationBarView.OnActionClickListener.Stub
|
||||
public void onRightClick(View view) {
|
||||
RegisterActivity.this.onRightActionView(view);
|
||||
}
|
||||
});
|
||||
SpannableString spannableString = new SpannableString(string4);
|
||||
spannableString.setSpan(new ClickableSpanListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.m
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
RegisterActivity.this.a(view);
|
||||
}
|
||||
}, true, getResources().getColor(R.color.txt_287EF1)), string4.indexOf(string2), string4.indexOf(string2) + string2.length(), 33);
|
||||
spannableString.setSpan(new ClickableSpanListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.o
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
RegisterActivity.this.b(view);
|
||||
}
|
||||
}, true, getResources().getColor(R.color.txt_287EF1)), string4.indexOf(string), string4.indexOf(string) + string.length(), 33);
|
||||
if (LocaleUtils.g()) {
|
||||
spannableString.setSpan(new ClickableSpanListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.n
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
RegisterActivity.this.c(view);
|
||||
}
|
||||
}, true, getResources().getColor(R.color.txt_287EF1)), string4.indexOf(string3), string4.indexOf(string3) + string3.length(), 33);
|
||||
}
|
||||
this.tvPolicy.setText(spannableString);
|
||||
this.tvPolicy.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
if (1 == this.loginType) {
|
||||
this.policyLayout.setVisibility(8);
|
||||
} else {
|
||||
this.policyLayout.setVisibility(0);
|
||||
}
|
||||
List<String> b = b(0, 101);
|
||||
b.set(0, getString(R.string.please_chose));
|
||||
this.pickerUserAge.setArrayList(b);
|
||||
this.pickerUserAge.setListener(new LoopListener() { // from class: com.ubt.jimu.user.view.RegisterActivity.5
|
||||
@Override // com.ubt.jimu.user.view.picker.LoopListener
|
||||
public void a(int i2) {
|
||||
ALog.a(((BaseActivity) RegisterActivity.this).TAG).d("select number item:" + i2 + " num:" + RegisterActivity.this.pickerUserAge.getCurrentItemValue());
|
||||
}
|
||||
});
|
||||
this.pickerUserAge.setCurrentItem(0);
|
||||
this.pickerUserAge.b();
|
||||
this.pickerUserAge.setTextSize(17.0f);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.RegisterContract$View
|
||||
public void k(String str) {
|
||||
Log.i(this.TAG, "onRegisterFail");
|
||||
JAlertDialog jAlertDialog = this.f;
|
||||
if (jAlertDialog != null) {
|
||||
if (TextUtils.isEmpty(str)) {
|
||||
str = getString(R.string.register_fail);
|
||||
}
|
||||
jAlertDialog.a(str);
|
||||
}
|
||||
i.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.RegisterActivity.7
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
if (RegisterActivity.this.f != null) {
|
||||
RegisterActivity.this.f.dismiss();
|
||||
}
|
||||
}
|
||||
}, 1000L);
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onActivityResult(int i2, int i3, Intent intent) {
|
||||
super.onActivityResult(i2, i3, intent);
|
||||
if (i3 == -1 && i2 == 18) {
|
||||
String stringExtra = intent.getStringExtra("country_code");
|
||||
String stringExtra2 = intent.getStringExtra("country_name");
|
||||
this.countryCodeTextView.setText(stringExtra + " (" + stringExtra2 + ") ");
|
||||
}
|
||||
}
|
||||
|
||||
public void onBackAction(View view) {
|
||||
if (I0()) {
|
||||
if (this.d.get() <= 0 || this.d.get() > 1) {
|
||||
if (this.d.get() == 0) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
this.d.decrementAndGet();
|
||||
this.viewFlipper.setDisplayedChild(this.d.get());
|
||||
if (this.d.get() == 1) {
|
||||
this.policyLayout.setVisibility(0);
|
||||
} else {
|
||||
this.policyLayout.setVisibility(8);
|
||||
}
|
||||
this.navigationBarView.setRightIcon(R.drawable.ic_nav_next);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (this.d.get() == 4) {
|
||||
this.d.decrementAndGet();
|
||||
this.viewFlipper.setDisplayedChild(this.d.get());
|
||||
this.navigationBarView.setRightText(R.string.guest_visit);
|
||||
this.policyLayout.setVisibility(8);
|
||||
return;
|
||||
}
|
||||
if (this.d.get() == 3) {
|
||||
this.d.decrementAndGet();
|
||||
this.viewFlipper.setDisplayedChild(this.d.get());
|
||||
this.navigationBarView.setRightIcon(R.drawable.ic_nav_next);
|
||||
} else {
|
||||
if (this.d.get() != 2 && this.d.get() != 5) {
|
||||
if (this.d.get() == 0) {
|
||||
this.navigationBarView.setRightIcon(R.drawable.ic_nav_next);
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.d.set(0);
|
||||
this.viewFlipper.setDisplayedChild(this.d.get());
|
||||
this.navigationBarView.setRightIcon(R.drawable.ic_nav_next);
|
||||
if (2 == this.loginType) {
|
||||
this.policyLayout.setVisibility(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onCaptchaAction(View view) {
|
||||
if (TextUtils.isEmpty(this.accountEditText.getText().toString().trim())) {
|
||||
findViewById(R.id.accountParent).startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
String trim = this.accountEditText.getText().toString().trim();
|
||||
String trim2 = this.countryCodeTextView.getText().toString().trim();
|
||||
if (!trim.contains("@") && TextUtils.isEmpty(trim2)) {
|
||||
findViewById(R.id.countryCodeParent).startAnimation(AnimUtils.a(5));
|
||||
return;
|
||||
}
|
||||
if (!trim.contains("@") && !StringUtils.f(trim)) {
|
||||
this.countryCodeParent.setVisibility(8);
|
||||
this.rlTips.setVisibility(0);
|
||||
this.rlTips.startAnimation(AnimUtils.a(5));
|
||||
} else {
|
||||
if (com.ubt.jimu.utils.TextUtils.b(trim) && !com.ubt.jimu.utils.TextUtils.a(trim)) {
|
||||
toastError(getString(R.string.error_email_format));
|
||||
return;
|
||||
}
|
||||
this.e = (trim.contains("@") ? "" : trim2.substring(trim2.indexOf("+") + 1, trim2.indexOf("(") - 1).replace(" ", "")) + trim;
|
||||
a(R.string.have_send_captcha, R.drawable.ic_camera, false);
|
||||
((RegisterContract$Presenter) this.a).a(this.e, 1);
|
||||
}
|
||||
}
|
||||
|
||||
public void onCountryCodeAction(View view) {
|
||||
String charSequence = this.countryCodeTextView.getText().toString();
|
||||
String substring = !TextUtils.isEmpty(charSequence) ? charSequence.substring(charSequence.indexOf("+"), charSequence.indexOf("(") - 1) : null;
|
||||
Postcard a = ARouter.b().a("/account/countrycode");
|
||||
a.a("selected_code", substring);
|
||||
a.a(this, 18);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setPresenter(new RegisterPresenter(this, this));
|
||||
setContentView(R.layout.activity_register);
|
||||
ARouter.b().a(this);
|
||||
ButterKnife.a(this);
|
||||
initView();
|
||||
H0();
|
||||
((RegisterContract$Presenter) this.a).subscribe();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onDestroy() {
|
||||
P p = this.a;
|
||||
if (p != 0) {
|
||||
((RegisterContract$Presenter) p).unSubscribe();
|
||||
}
|
||||
BroadcastReceiver broadcastReceiver = this.h;
|
||||
if (broadcastReceiver != null) {
|
||||
unregisterReceiver(broadcastReceiver);
|
||||
}
|
||||
Handler handler = i;
|
||||
if (handler != null) {
|
||||
handler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
this.b.a();
|
||||
this.b = null;
|
||||
RelativeLayout relativeLayout = this.rlTips;
|
||||
if (relativeLayout != null) {
|
||||
relativeLayout.clearAnimation();
|
||||
}
|
||||
CountDownTimer countDownTimer = this.g;
|
||||
if (countDownTimer != null) {
|
||||
countDownTimer.cancel();
|
||||
}
|
||||
((RegisterContract$Presenter) this.a).unSubscribe();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
public void onEyeAction(View view) {
|
||||
if (this.eyeImageView.isSelected()) {
|
||||
this.eyeImageView.setSelected(false);
|
||||
this.eyeImageView.setBackgroundResource(R.drawable.ic_eye_show);
|
||||
this.page3PasswordEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
|
||||
ClearEditText clearEditText = this.page3PasswordEditText;
|
||||
clearEditText.setSelection(clearEditText.getText().toString().length());
|
||||
return;
|
||||
}
|
||||
this.eyeImageView.setSelected(true);
|
||||
this.eyeImageView.setBackgroundResource(R.drawable.ic_eye_hide);
|
||||
this.page3PasswordEditText.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
|
||||
ClearEditText clearEditText2 = this.page3PasswordEditText;
|
||||
clearEditText2.setSelection(clearEditText2.getText().toString().length());
|
||||
}
|
||||
|
||||
public void onGuardianEyeAction(View view) {
|
||||
if (this.guardianEyeImageView.isSelected()) {
|
||||
this.guardianEyeImageView.setSelected(false);
|
||||
this.guardianEyeImageView.setBackgroundResource(R.drawable.ic_eye_show);
|
||||
this.guardianPasswordEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
|
||||
this.guardianPasswordEditText.setSelection(this.page3PasswordEditText.getText().toString().length());
|
||||
return;
|
||||
}
|
||||
this.guardianEyeImageView.setSelected(true);
|
||||
this.guardianEyeImageView.setBackgroundResource(R.drawable.ic_eye_hide);
|
||||
this.guardianPasswordEditText.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
|
||||
this.guardianPasswordEditText.setSelection(this.page3PasswordEditText.getText().toString().length());
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
public void onRightActionView(View view) {
|
||||
int i2 = this.d.get();
|
||||
if (i2 == 0) {
|
||||
J0();
|
||||
} else if (i2 == 1) {
|
||||
L0();
|
||||
} else if (i2 == 2) {
|
||||
M0();
|
||||
} else if (i2 == 3) {
|
||||
N0();
|
||||
} else if (i2 == 4) {
|
||||
O0();
|
||||
} else if (i2 == 5) {
|
||||
K0();
|
||||
}
|
||||
if (this.d.get() != 1) {
|
||||
this.viewFlipper.setDisplayedChild(this.d.get());
|
||||
}
|
||||
if (this.d.get() == 4) {
|
||||
this.navigationBarView.setRightIcon(R.drawable.ic_nav_finish);
|
||||
} else if (this.d.get() == 3) {
|
||||
this.navigationBarView.setRightText(R.string.guest_visit);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
public void relayout() {
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
/* renamed from: d, reason: merged with bridge method [inline-methods] */
|
||||
public void c(View view) {
|
||||
Postcard a = ARouter.b().a("/page/web");
|
||||
a.a("url", Constant.b);
|
||||
a.a("title", "");
|
||||
a.a("type", 0);
|
||||
a.a("show_title", false);
|
||||
a.t();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
/* renamed from: e, reason: merged with bridge method [inline-methods] */
|
||||
public void a(View view) {
|
||||
Postcard a = ARouter.b().a("/page/web");
|
||||
a.a("url", Constant.a);
|
||||
a.a("title", "");
|
||||
a.a("type", 0);
|
||||
a.a("show_title", false);
|
||||
a.t();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
/* renamed from: f, reason: merged with bridge method [inline-methods] */
|
||||
public void b(View view) {
|
||||
Postcard a = ARouter.b().a("/page/web");
|
||||
a.a("url", Constant.a(LocaleUtils.c()));
|
||||
a.a("title", "");
|
||||
a.a("type", 0);
|
||||
a.a("show_title", false);
|
||||
a.t();
|
||||
}
|
||||
|
||||
private static List<String> b(int i2, int i3) {
|
||||
String[] strArr = new String[i3];
|
||||
for (int i4 = i2; i4 < i2 + i3; i4++) {
|
||||
strArr[i4 - i2] = String.valueOf(i4);
|
||||
}
|
||||
return Arrays.asList(strArr);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.RegisterContract$View
|
||||
public void a(Context context) {
|
||||
Intent intent = new Intent();
|
||||
intent.setAction("com.jimu.action_guardian_email");
|
||||
context.sendBroadcast(intent);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.RegisterContract$View
|
||||
public void c(String str) {
|
||||
this.countryCodeTextView.setText(str.substring(str.indexOf("+")) + " (" + str.substring(0, str.indexOf("+")) + ") ");
|
||||
}
|
||||
|
||||
private void a(int i2, int i3, boolean z) {
|
||||
JAlertDialog jAlertDialog = this.f;
|
||||
if (jAlertDialog == null) {
|
||||
JAlertDialog.Builder builder = new JAlertDialog.Builder(this);
|
||||
builder.b(i2);
|
||||
builder.a(z);
|
||||
builder.a(i3);
|
||||
this.f = builder.a();
|
||||
} else {
|
||||
jAlertDialog.a(getString(i2));
|
||||
this.f.b(i3);
|
||||
this.f.a(z);
|
||||
}
|
||||
this.f.show();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.RegisterContract$View
|
||||
public void b(ApiStatus apiStatus) {
|
||||
if (apiStatus.getCode() == 0) {
|
||||
S0();
|
||||
JAlertDialog jAlertDialog = this.f;
|
||||
if (jAlertDialog != null) {
|
||||
jAlertDialog.dismiss();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.RegisterContract$View
|
||||
public void d(User user) {
|
||||
if (user == null) {
|
||||
return;
|
||||
}
|
||||
ShortcutHelper.b(this);
|
||||
new GdprWorker().b(new AnonymousClass6());
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.RegisterContract$View
|
||||
public void e(final String str) {
|
||||
i.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.RegisterActivity.8
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
if (RegisterActivity.this.f != null) {
|
||||
RegisterActivity.this.f.dismiss();
|
||||
}
|
||||
RegisterActivity.this.toastError(str);
|
||||
if (RegisterActivity.this.g != null) {
|
||||
RegisterActivity.this.g.cancel();
|
||||
}
|
||||
RegisterActivity.this.countDownTextView.setText(R.string.get_captcha);
|
||||
RegisterActivity.this.countDownTextView.setClickable(true);
|
||||
RegisterActivity registerActivity = RegisterActivity.this;
|
||||
registerActivity.countDownTextView.setTextColor(registerActivity.getResources().getColor(R.color.txt_287EF1));
|
||||
}
|
||||
}, 2000L);
|
||||
}
|
||||
|
||||
private void e(User user) {
|
||||
if (user != null) {
|
||||
SharePreferenceHelper sharePreferenceHelper = new SharePreferenceHelper();
|
||||
sharePreferenceHelper.put(SharePreferenceHelper.AUTHOR_TOKEN, user.getToken());
|
||||
sharePreferenceHelper.put(SharePreferenceHelper.SP_KEY_USER_ID, String.valueOf(user.getUserId()));
|
||||
UserDbHandler.save(user);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.RegisterContract$View
|
||||
public void f(ApiStatus apiStatus) {
|
||||
if (apiStatus != null && apiStatus.getCode() == 0) {
|
||||
this.d.incrementAndGet();
|
||||
this.navigationBarView.setRightText(R.string.guest_visit);
|
||||
this.viewFlipper.setDisplayedChild(this.d.get());
|
||||
}
|
||||
this.c = false;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.RegisterContract$View
|
||||
public void a(User user) {
|
||||
if (user == null) {
|
||||
return;
|
||||
}
|
||||
e(user);
|
||||
EventBus.b().b(new MessageEvent(7));
|
||||
ShortcutHelper.b(this);
|
||||
new GdprWorker().b(new AnonymousClass9());
|
||||
}
|
||||
}
|
||||
140
sources/com/ubt/jimu/user/view/RegisterActivity_ViewBinding.java
Normal file
140
sources/com/ubt/jimu/user/view/RegisterActivity_ViewBinding.java
Normal file
@@ -0,0 +1,140 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ViewFlipper;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.DebouncingOnClickListener;
|
||||
import butterknife.internal.Utils;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.user.view.picker.LoopView;
|
||||
import com.ubt.jimu.widgets.ClearEditText;
|
||||
import com.ubt.jimu.widgets.NavigationBarView;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class RegisterActivity_ViewBinding implements Unbinder {
|
||||
private RegisterActivity b;
|
||||
private View c;
|
||||
private View d;
|
||||
private View e;
|
||||
private View f;
|
||||
private View g;
|
||||
private View h;
|
||||
|
||||
public RegisterActivity_ViewBinding(final RegisterActivity registerActivity, View view) {
|
||||
this.b = registerActivity;
|
||||
registerActivity.navigationBarView = (NavigationBarView) Utils.b(view, R.id.nbv_bar, "field 'navigationBarView'", NavigationBarView.class);
|
||||
registerActivity.viewFlipper = (ViewFlipper) Utils.b(view, R.id.viewFlipper, "field 'viewFlipper'", ViewFlipper.class);
|
||||
registerActivity.policyLayout = (LinearLayout) Utils.b(view, R.id.policyLayout, "field 'policyLayout'", LinearLayout.class);
|
||||
registerActivity.pickerUserAge = (LoopView) Utils.b(view, R.id.np_age, "field 'pickerUserAge'", LoopView.class);
|
||||
registerActivity.tvPolicy = (TextView) Utils.b(view, R.id.tvPolicy, "field 'tvPolicy'", TextView.class);
|
||||
registerActivity.accountEditText = (ClearEditText) Utils.b(view, R.id.accountEditText, "field 'accountEditText'", ClearEditText.class);
|
||||
View a = Utils.a(view, R.id.countryCodeTextView, "field 'countryCodeTextView' and method 'onCountryCodeAction'");
|
||||
registerActivity.countryCodeTextView = (TextView) Utils.a(a, R.id.countryCodeTextView, "field 'countryCodeTextView'", TextView.class);
|
||||
this.c = a;
|
||||
a.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.RegisterActivity_ViewBinding.1
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
registerActivity.onCountryCodeAction(view2);
|
||||
}
|
||||
});
|
||||
View a2 = Utils.a(view, R.id.eyeImageView, "field 'eyeImageView' and method 'onEyeAction'");
|
||||
registerActivity.eyeImageView = (ImageView) Utils.a(a2, R.id.eyeImageView, "field 'eyeImageView'", ImageView.class);
|
||||
this.d = a2;
|
||||
a2.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.RegisterActivity_ViewBinding.2
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
registerActivity.onEyeAction(view2);
|
||||
}
|
||||
});
|
||||
View a3 = Utils.a(view, R.id.guardianEyeImageView, "field 'guardianEyeImageView' and method 'onGuardianEyeAction'");
|
||||
registerActivity.guardianEyeImageView = (ImageView) Utils.a(a3, R.id.guardianEyeImageView, "field 'guardianEyeImageView'", ImageView.class);
|
||||
this.e = a3;
|
||||
a3.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.RegisterActivity_ViewBinding.3
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
registerActivity.onGuardianEyeAction(view2);
|
||||
}
|
||||
});
|
||||
registerActivity.page3PasswordEditText = (ClearEditText) Utils.b(view, R.id.page3PasswordEditText, "field 'page3PasswordEditText'", ClearEditText.class);
|
||||
registerActivity.captchaEditText = (ClearEditText) Utils.b(view, R.id.captchaEditText, "field 'captchaEditText'", ClearEditText.class);
|
||||
View a4 = Utils.a(view, R.id.countryCodeParent, "field 'countryCodeParent' and method 'onCountryCodeAction'");
|
||||
registerActivity.countryCodeParent = (RelativeLayout) Utils.a(a4, R.id.countryCodeParent, "field 'countryCodeParent'", RelativeLayout.class);
|
||||
this.f = a4;
|
||||
a4.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.RegisterActivity_ViewBinding.4
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
registerActivity.onCountryCodeAction(view2);
|
||||
}
|
||||
});
|
||||
View a5 = Utils.a(view, R.id.countDownTextView, "field 'countDownTextView' and method 'onCaptchaAction'");
|
||||
registerActivity.countDownTextView = (TextView) Utils.a(a5, R.id.countDownTextView, "field 'countDownTextView'", TextView.class);
|
||||
this.g = a5;
|
||||
a5.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.RegisterActivity_ViewBinding.5
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
registerActivity.onCaptchaAction(view2);
|
||||
}
|
||||
});
|
||||
registerActivity.rlTips = (RelativeLayout) Utils.b(view, R.id.rl_tips_input_error, "field 'rlTips'", RelativeLayout.class);
|
||||
registerActivity.emailEditText = (ClearEditText) Utils.b(view, R.id.emailEditText, "field 'emailEditText'", ClearEditText.class);
|
||||
registerActivity.guardianEditText = (ClearEditText) Utils.b(view, R.id.guardianEditText, "field 'guardianEditText'", ClearEditText.class);
|
||||
registerActivity.rootView = Utils.a(view, R.id.rootView, "field 'rootView'");
|
||||
registerActivity.guardianEmailTextView = (TextView) Utils.b(view, R.id.guardianEmailTextView, "field 'guardianEmailTextView'", TextView.class);
|
||||
registerActivity.guardianPasswordEditText = (ClearEditText) Utils.b(view, R.id.guardianPasswordEditText, "field 'guardianPasswordEditText'", ClearEditText.class);
|
||||
registerActivity.cbPolicy = (CheckBox) Utils.b(view, R.id.cbPolicy, "field 'cbPolicy'", CheckBox.class);
|
||||
View a6 = Utils.a(view, R.id.rightArrowImageView, "method 'onCountryCodeAction'");
|
||||
this.h = a6;
|
||||
a6.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.RegisterActivity_ViewBinding.6
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
registerActivity.onCountryCodeAction(view2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
RegisterActivity registerActivity = this.b;
|
||||
if (registerActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
registerActivity.navigationBarView = null;
|
||||
registerActivity.viewFlipper = null;
|
||||
registerActivity.policyLayout = null;
|
||||
registerActivity.pickerUserAge = null;
|
||||
registerActivity.tvPolicy = null;
|
||||
registerActivity.accountEditText = null;
|
||||
registerActivity.countryCodeTextView = null;
|
||||
registerActivity.eyeImageView = null;
|
||||
registerActivity.guardianEyeImageView = null;
|
||||
registerActivity.page3PasswordEditText = null;
|
||||
registerActivity.captchaEditText = null;
|
||||
registerActivity.countryCodeParent = null;
|
||||
registerActivity.countDownTextView = null;
|
||||
registerActivity.rlTips = null;
|
||||
registerActivity.emailEditText = null;
|
||||
registerActivity.guardianEditText = null;
|
||||
registerActivity.rootView = null;
|
||||
registerActivity.guardianEmailTextView = null;
|
||||
registerActivity.guardianPasswordEditText = null;
|
||||
registerActivity.cbPolicy = null;
|
||||
this.c.setOnClickListener(null);
|
||||
this.c = null;
|
||||
this.d.setOnClickListener(null);
|
||||
this.d = null;
|
||||
this.e.setOnClickListener(null);
|
||||
this.e = null;
|
||||
this.f.setOnClickListener(null);
|
||||
this.f = null;
|
||||
this.g.setOnClickListener(null);
|
||||
this.g = null;
|
||||
this.h.setOnClickListener(null);
|
||||
this.h = null;
|
||||
}
|
||||
}
|
||||
287
sources/com/ubt/jimu/user/view/TelephoneUpdateActivity.java
Normal file
287
sources/com/ubt/jimu/user/view/TelephoneUpdateActivity.java
Normal file
@@ -0,0 +1,287 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import butterknife.ButterKnife;
|
||||
import com.alibaba.android.arouter.facade.Postcard;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.entities.ApiStatus;
|
||||
import com.ubt.jimu.base.entities.UserDetailInfo;
|
||||
import com.ubt.jimu.base.http.ApiResultException;
|
||||
import com.ubt.jimu.base.http.IApiObserver;
|
||||
import com.ubt.jimu.user.repository.UserRepository;
|
||||
import com.ubt.jimu.utils.LocaleUtils;
|
||||
import com.ubt.jimu.utils.RxSchedulers;
|
||||
import com.ubt.jimu.widgets.ClearEditText;
|
||||
import com.ubt.jimu.widgets.JAlertDialog;
|
||||
import com.ubt.jimu.widgets.NavigationBarView;
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.ObservableEmitter;
|
||||
import io.reactivex.ObservableOnSubscribe;
|
||||
import io.reactivex.Observer;
|
||||
import io.reactivex.disposables.CompositeDisposable;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class TelephoneUpdateActivity extends BaseActivity implements NavigationBarView.OnActionClickListener {
|
||||
private CompositeDisposable a = new CompositeDisposable();
|
||||
private Handler b = new Handler();
|
||||
private CountDownTimer c;
|
||||
ClearEditText captchaEditText;
|
||||
TextView countDownTextView;
|
||||
TextView countryCodeTextView;
|
||||
private JAlertDialog d;
|
||||
NavigationBarView navBarView;
|
||||
EditText telephoneEditText;
|
||||
|
||||
private void D0() {
|
||||
Observable.create(new ObservableOnSubscribe<String>() { // from class: com.ubt.jimu.user.view.TelephoneUpdateActivity.5
|
||||
@Override // io.reactivex.ObservableOnSubscribe
|
||||
public void subscribe(ObservableEmitter<String> observableEmitter) throws Exception {
|
||||
observableEmitter.onNext(LocaleUtils.a(TelephoneUpdateActivity.this));
|
||||
observableEmitter.onComplete();
|
||||
}
|
||||
}).compose(RxSchedulers.a()).subscribe(new Observer<String>() { // from class: com.ubt.jimu.user.view.TelephoneUpdateActivity.4
|
||||
@Override // io.reactivex.Observer
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onNext(String str) {
|
||||
TelephoneUpdateActivity.this.countryCodeTextView.setText(str);
|
||||
}
|
||||
|
||||
@Override // io.reactivex.Observer
|
||||
public void onComplete() {
|
||||
}
|
||||
|
||||
@Override // io.reactivex.Observer
|
||||
public void onError(Throwable th) {
|
||||
}
|
||||
|
||||
@Override // io.reactivex.Observer
|
||||
public void onSubscribe(Disposable disposable) {
|
||||
TelephoneUpdateActivity.this.a.b(disposable);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public void E0() {
|
||||
this.c = new CountDownTimer(60000L, 1000L) { // from class: com.ubt.jimu.user.view.TelephoneUpdateActivity.2
|
||||
@Override // android.os.CountDownTimer
|
||||
public void onFinish() {
|
||||
TelephoneUpdateActivity.this.countDownTextView.setText(R.string.get_captcha);
|
||||
TelephoneUpdateActivity.this.countDownTextView.setClickable(true);
|
||||
TelephoneUpdateActivity telephoneUpdateActivity = TelephoneUpdateActivity.this;
|
||||
telephoneUpdateActivity.countDownTextView.setTextColor(telephoneUpdateActivity.getResources().getColor(R.color.txt_287EF1));
|
||||
}
|
||||
|
||||
@Override // android.os.CountDownTimer
|
||||
public void onTick(long j) {
|
||||
String format = String.format(TelephoneUpdateActivity.this.getResources().getString(R.string.hint_seconds), Long.valueOf(j / 1000));
|
||||
TelephoneUpdateActivity telephoneUpdateActivity = TelephoneUpdateActivity.this;
|
||||
telephoneUpdateActivity.countDownTextView.setTextColor(telephoneUpdateActivity.getResources().getColor(R.color.txt_98A5B6));
|
||||
TelephoneUpdateActivity.this.countDownTextView.setText(format);
|
||||
}
|
||||
};
|
||||
this.c.start();
|
||||
this.countDownTextView.setClickable(false);
|
||||
}
|
||||
|
||||
private void onConfirmAction(View view) {
|
||||
if (e(false)) {
|
||||
String trim = this.countryCodeTextView.getText().toString().trim();
|
||||
String str = trim.substring(trim.indexOf("+") + 1, trim.length()) + this.telephoneEditText.getText().toString().trim();
|
||||
String trim2 = this.captchaEditText.getText().toString().trim();
|
||||
a("", R.drawable.ic_loading, true);
|
||||
UserRepository.a(str, 0, trim2).compose(RxSchedulers.a()).subscribe(new IApiObserver<UserDetailInfo>(this) { // from class: com.ubt.jimu.user.view.TelephoneUpdateActivity.3
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver, io.reactivex.Observer
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onNext(UserDetailInfo userDetailInfo) {
|
||||
super.onNext(userDetailInfo);
|
||||
if (TelephoneUpdateActivity.this.d != null) {
|
||||
TelephoneUpdateActivity.this.d.dismiss();
|
||||
}
|
||||
if (userDetailInfo == null || userDetailInfo == null) {
|
||||
return;
|
||||
}
|
||||
TelephoneUpdateActivity telephoneUpdateActivity = TelephoneUpdateActivity.this;
|
||||
telephoneUpdateActivity.toastSuccess(telephoneUpdateActivity.getString(R.string.update_success));
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("new_telephone", userDetailInfo.getUserPhone());
|
||||
TelephoneUpdateActivity.this.setResult(-1, intent);
|
||||
TelephoneUpdateActivity.this.finish();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver
|
||||
public void onApiError(final ApiResultException apiResultException) {
|
||||
TelephoneUpdateActivity.this.b.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.TelephoneUpdateActivity.3.1
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
if (TelephoneUpdateActivity.this.d != null) {
|
||||
TelephoneUpdateActivity.this.d.dismiss();
|
||||
}
|
||||
TelephoneUpdateActivity.this.toastError(apiResultException.getMessage());
|
||||
}
|
||||
}, 1500L);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver, io.reactivex.Observer
|
||||
public void onSubscribe(Disposable disposable) {
|
||||
super.onSubscribe(disposable);
|
||||
TelephoneUpdateActivity.this.a.b(disposable);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onActivityResult(int i, int i2, Intent intent) {
|
||||
super.onActivityResult(i, i2, intent);
|
||||
if (i2 == -1 && intent != null && i == 1) {
|
||||
String stringExtra = intent.getStringExtra("country_code");
|
||||
String stringExtra2 = intent.getStringExtra("country_name");
|
||||
this.countryCodeTextView.setText(stringExtra2 + stringExtra);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.widgets.NavigationBarView.OnActionClickListener
|
||||
public void onClick(View view) {
|
||||
int id = view.getId();
|
||||
if (id == R.id.iv_left) {
|
||||
finish();
|
||||
} else {
|
||||
if (id != R.id.iv_right) {
|
||||
return;
|
||||
}
|
||||
onConfirmAction(view);
|
||||
}
|
||||
}
|
||||
|
||||
public void onCountDownAction(View view) {
|
||||
if (e(true)) {
|
||||
String trim = this.countryCodeTextView.getText().toString().trim();
|
||||
String trim2 = this.telephoneEditText.getText().toString().trim();
|
||||
String substring = trim.substring(trim.indexOf("+") + 1, trim.length());
|
||||
a(getString(R.string.have_send_captcha), R.drawable.ic_loading, true);
|
||||
UserRepository.a(substring + trim2, 0, 1).compose(RxSchedulers.a()).subscribe(new IApiObserver<ApiStatus>(this) { // from class: com.ubt.jimu.user.view.TelephoneUpdateActivity.1
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver, io.reactivex.Observer
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onNext(ApiStatus apiStatus) {
|
||||
super.onNext(apiStatus);
|
||||
if (apiStatus.getCode() == 0) {
|
||||
TelephoneUpdateActivity.this.E0();
|
||||
TelephoneUpdateActivity.this.b.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.TelephoneUpdateActivity.1.1
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
if (TelephoneUpdateActivity.this.d != null) {
|
||||
TelephoneUpdateActivity.this.d.dismiss();
|
||||
}
|
||||
}
|
||||
}, 1000L);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver
|
||||
public void onApiError(final ApiResultException apiResultException) {
|
||||
TelephoneUpdateActivity.this.b.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.TelephoneUpdateActivity.1.2
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
if (TelephoneUpdateActivity.this.d != null) {
|
||||
TelephoneUpdateActivity.this.d.dismiss();
|
||||
}
|
||||
TelephoneUpdateActivity.this.toastError(apiResultException.getMessage());
|
||||
if (TelephoneUpdateActivity.this.c != null) {
|
||||
TelephoneUpdateActivity.this.c.cancel();
|
||||
}
|
||||
TelephoneUpdateActivity.this.countDownTextView.setText(R.string.get_captcha);
|
||||
TelephoneUpdateActivity.this.countDownTextView.setClickable(true);
|
||||
TelephoneUpdateActivity telephoneUpdateActivity = TelephoneUpdateActivity.this;
|
||||
telephoneUpdateActivity.countDownTextView.setTextColor(telephoneUpdateActivity.getResources().getColor(R.color.txt_287EF1));
|
||||
}
|
||||
}, 2000L);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver, io.reactivex.Observer
|
||||
public void onSubscribe(Disposable disposable) {
|
||||
super.onSubscribe(disposable);
|
||||
TelephoneUpdateActivity.this.a.b(disposable);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void onCountryCodeAction(View view) {
|
||||
String charSequence = this.countryCodeTextView.getText().toString();
|
||||
String substring = !TextUtils.isEmpty(charSequence) ? charSequence.substring(charSequence.indexOf("+")) : null;
|
||||
Postcard a = ARouter.b().a("/account/countrycode");
|
||||
a.a("selected_code", substring);
|
||||
a.a(this, 1);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_telephone_update);
|
||||
ButterKnife.a(this);
|
||||
this.navBarView.setRightIcon(R.drawable.community_collection_icon);
|
||||
this.navBarView.setListener(this);
|
||||
D0();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onDestroy() {
|
||||
this.b.removeCallbacksAndMessages(null);
|
||||
super.onDestroy();
|
||||
this.a.dispose();
|
||||
this.a.a();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
public void relayout() {
|
||||
}
|
||||
|
||||
private void a(String str, int i, boolean z) {
|
||||
JAlertDialog jAlertDialog = this.d;
|
||||
if (jAlertDialog == null) {
|
||||
JAlertDialog.Builder builder = new JAlertDialog.Builder(this);
|
||||
builder.a(str);
|
||||
builder.a(z);
|
||||
builder.a(i);
|
||||
this.d = builder.a();
|
||||
} else {
|
||||
jAlertDialog.a(str);
|
||||
this.d.b(i);
|
||||
this.d.a(z);
|
||||
}
|
||||
this.d.show();
|
||||
}
|
||||
|
||||
private boolean e(boolean z) {
|
||||
if (TextUtils.isEmpty(this.countryCodeTextView.getText().toString().trim())) {
|
||||
toastError(getString(R.string.error_empty_phone_code));
|
||||
return false;
|
||||
}
|
||||
String trim = this.telephoneEditText.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(trim)) {
|
||||
toastError(getString(R.string.error_empty_phone));
|
||||
return false;
|
||||
}
|
||||
if (!com.ubt.jimu.utils.TextUtils.c(trim)) {
|
||||
toastError(getString(R.string.error_phone_format));
|
||||
return false;
|
||||
}
|
||||
String trim2 = this.captchaEditText.getText().toString().trim();
|
||||
if (z || !TextUtils.isEmpty(trim2)) {
|
||||
return true;
|
||||
}
|
||||
toastError(getString(R.string.error_empty_captcha));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.DebouncingOnClickListener;
|
||||
import butterknife.internal.Utils;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.widgets.ClearEditText;
|
||||
import com.ubt.jimu.widgets.NavigationBarView;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class TelephoneUpdateActivity_ViewBinding implements Unbinder {
|
||||
private TelephoneUpdateActivity b;
|
||||
private View c;
|
||||
private View d;
|
||||
|
||||
public TelephoneUpdateActivity_ViewBinding(final TelephoneUpdateActivity telephoneUpdateActivity, View view) {
|
||||
this.b = telephoneUpdateActivity;
|
||||
View a = Utils.a(view, R.id.countryCodeTextView, "field 'countryCodeTextView' and method 'onCountryCodeAction'");
|
||||
telephoneUpdateActivity.countryCodeTextView = (TextView) Utils.a(a, R.id.countryCodeTextView, "field 'countryCodeTextView'", TextView.class);
|
||||
this.c = a;
|
||||
a.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.TelephoneUpdateActivity_ViewBinding.1
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
telephoneUpdateActivity.onCountryCodeAction(view2);
|
||||
}
|
||||
});
|
||||
telephoneUpdateActivity.telephoneEditText = (EditText) Utils.b(view, R.id.telephoneEditText, "field 'telephoneEditText'", EditText.class);
|
||||
View a2 = Utils.a(view, R.id.countDownTextView, "field 'countDownTextView' and method 'onCountDownAction'");
|
||||
telephoneUpdateActivity.countDownTextView = (TextView) Utils.a(a2, R.id.countDownTextView, "field 'countDownTextView'", TextView.class);
|
||||
this.d = a2;
|
||||
a2.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.TelephoneUpdateActivity_ViewBinding.2
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
telephoneUpdateActivity.onCountDownAction(view2);
|
||||
}
|
||||
});
|
||||
telephoneUpdateActivity.captchaEditText = (ClearEditText) Utils.b(view, R.id.captchaEditText, "field 'captchaEditText'", ClearEditText.class);
|
||||
telephoneUpdateActivity.navBarView = (NavigationBarView) Utils.b(view, R.id.nbv_bar, "field 'navBarView'", NavigationBarView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
TelephoneUpdateActivity telephoneUpdateActivity = this.b;
|
||||
if (telephoneUpdateActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
telephoneUpdateActivity.countryCodeTextView = null;
|
||||
telephoneUpdateActivity.telephoneEditText = null;
|
||||
telephoneUpdateActivity.countDownTextView = null;
|
||||
telephoneUpdateActivity.captchaEditText = null;
|
||||
telephoneUpdateActivity.navBarView = null;
|
||||
this.c.setOnClickListener(null);
|
||||
this.c = null;
|
||||
this.d.setOnClickListener(null);
|
||||
this.d = null;
|
||||
}
|
||||
}
|
||||
615
sources/com/ubt/jimu/user/view/UserCenterActivity.java
Normal file
615
sources/com/ubt/jimu/user/view/UserCenterActivity.java
Normal file
@@ -0,0 +1,615 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.RequestBuilder;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.recyclelib.URecyclerView;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.JimuApplication;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.ViewImpl;
|
||||
import com.ubt.jimu.base.UbtActivityStack;
|
||||
import com.ubt.jimu.base.cache.Cache;
|
||||
import com.ubt.jimu.base.db.diy.DiyDBModel;
|
||||
import com.ubt.jimu.base.db.user.UserDbHandler;
|
||||
import com.ubt.jimu.base.entities.Constant;
|
||||
import com.ubt.jimu.base.entities.DraftsListBean;
|
||||
import com.ubt.jimu.base.entities.FollowEntities;
|
||||
import com.ubt.jimu.base.entities.User;
|
||||
import com.ubt.jimu.base.entities.UserExtraInfo;
|
||||
import com.ubt.jimu.base.event.MessageEvent;
|
||||
import com.ubt.jimu.base.http.ApiObserver;
|
||||
import com.ubt.jimu.base.http.manager.CommunityManager;
|
||||
import com.ubt.jimu.base.util.FileUtil;
|
||||
import com.ubt.jimu.community.view.MyDraftsActivity;
|
||||
import com.ubt.jimu.community.view.MyIssueActivity;
|
||||
import com.ubt.jimu.community.view.PublishCommunityActivity;
|
||||
import com.ubt.jimu.diy.DiyRobotDbHandler;
|
||||
import com.ubt.jimu.diy.DiyRobotFile;
|
||||
import com.ubt.jimu.unity.ModelType;
|
||||
import com.ubt.jimu.user.contract.UserInfoContract$Presenter;
|
||||
import com.ubt.jimu.user.contract.UserInfoContract$View;
|
||||
import com.ubt.jimu.user.presenter.UserInfoPresenter;
|
||||
import com.ubt.jimu.user.setting.view.CommonSettingActivity;
|
||||
import com.ubt.jimu.user.view.adapter.PostAndDiyAdapter;
|
||||
import com.ubt.jimu.utils.AnimUtils;
|
||||
import com.ubt.jimu.utils.LogUtils;
|
||||
import com.ubt.jimu.utils.SPUtils;
|
||||
import com.ubt.jimu.widgets.NavigationBarView;
|
||||
import com.ubtech.utils.DensityUtils;
|
||||
import com.ubtech.utils.XLog;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class UserCenterActivity extends BaseActivity implements UserInfoContract$View, ViewImpl, PostAndDiyAdapter.IPostOrDiyListener {
|
||||
private static final String m = UserCenterActivity.class.getSimpleName();
|
||||
private Unbinder a;
|
||||
private UserInfoContract$Presenter b;
|
||||
ImageView backImageView;
|
||||
Button btnLogin;
|
||||
TextView collectTextView;
|
||||
private User e;
|
||||
ImageView editImageView;
|
||||
private long f;
|
||||
TextView fansTextView;
|
||||
private GridLayoutManager h;
|
||||
private PostAndDiyAdapter i;
|
||||
ImageView imgCollect;
|
||||
ImageView imgFans;
|
||||
ImageView imgInterest;
|
||||
ImageView imgNotLogin;
|
||||
ImageView imgPraise;
|
||||
TextView interestTextView;
|
||||
ImageView iv_follow;
|
||||
private List<ViewHolderItem> k;
|
||||
private ViewHolderItem l;
|
||||
LinearLayout leftBottomLayout;
|
||||
LinearLayout leftLayout;
|
||||
LinearLayout levelParent;
|
||||
ProgressBar levelProgressBar;
|
||||
TextView levelTextView;
|
||||
NavigationBarView navBarView;
|
||||
TextView nicknameTextView;
|
||||
TextView percentTextView;
|
||||
ImageView portraitImageView;
|
||||
TextView praiseTextView;
|
||||
TextView rankTextView;
|
||||
TextView rateTextView;
|
||||
URecyclerView recyclerView;
|
||||
View rootView;
|
||||
FrameLayout unLoginLayout;
|
||||
TextView userTitleTextView;
|
||||
boolean c = false;
|
||||
boolean d = false;
|
||||
private long g = -1;
|
||||
private List<ViewHolderItem> j = new ArrayList();
|
||||
|
||||
public class GridItemDecoration extends RecyclerView.ItemDecoration {
|
||||
private int a;
|
||||
private int b;
|
||||
|
||||
public GridItemDecoration(UserCenterActivity userCenterActivity, int i, int i2) {
|
||||
new ColorDrawable();
|
||||
this.a = i;
|
||||
this.b = i2;
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.ItemDecoration
|
||||
public void getItemOffsets(Rect rect, View view, RecyclerView recyclerView, RecyclerView.State state) {
|
||||
GridLayoutManager gridLayoutManager = (GridLayoutManager) recyclerView.getLayoutManager();
|
||||
GridLayoutManager.LayoutParams layoutParams = (GridLayoutManager.LayoutParams) view.getLayoutParams();
|
||||
recyclerView.e(view);
|
||||
recyclerView.getChildCount();
|
||||
gridLayoutManager.N();
|
||||
layoutParams.f();
|
||||
int e = layoutParams.e();
|
||||
if (gridLayoutManager.K() == 1) {
|
||||
if (e % 2 == 0) {
|
||||
rect.left = this.b;
|
||||
int i = this.a;
|
||||
rect.right = i;
|
||||
rect.top = i;
|
||||
return;
|
||||
}
|
||||
int i2 = this.a;
|
||||
rect.left = i2;
|
||||
rect.right = this.b;
|
||||
rect.top = i2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public UserCenterActivity() {
|
||||
new ArrayList();
|
||||
this.k = new ArrayList();
|
||||
}
|
||||
|
||||
private void D0() {
|
||||
if (JimuApplication.l().i()) {
|
||||
this.imgInterest.setImageResource(R.mipmap.ic_interest_pad);
|
||||
this.imgFans.setImageResource(R.mipmap.ic_fans_pad);
|
||||
this.imgCollect.setImageResource(R.mipmap.ic_collection_pad);
|
||||
this.imgPraise.setImageResource(R.mipmap.ic_praise_pad);
|
||||
}
|
||||
}
|
||||
|
||||
private void E0() {
|
||||
this.h = new GridLayoutManager(this, 2);
|
||||
this.i = new PostAndDiyAdapter(this, this.j, this);
|
||||
this.j.add(new ViewHolderItem(DiyRobotFile.TYPE_MODEL, getString(R.string.title_user_diy), ""));
|
||||
int dimensionPixelSize = getResources().getDimensionPixelSize(R.dimen.user_center_right_padding_left_right);
|
||||
this.recyclerView.a(new GridItemDecoration(this, getResources().getDimensionPixelSize(R.dimen.user_center_right_item_center), dimensionPixelSize));
|
||||
this.recyclerView.setHasFixedSize(true);
|
||||
this.recyclerView.setAdapter(this.i);
|
||||
this.recyclerView.setPullRefreshEnabled(false);
|
||||
this.recyclerView.setLoadingMoreEnabled(false);
|
||||
this.h.a(new GridLayoutManager.SpanSizeLookup() { // from class: com.ubt.jimu.user.view.UserCenterActivity.3
|
||||
@Override // androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup
|
||||
public int getSpanSize(int i) {
|
||||
if (i == 0) {
|
||||
return 1;
|
||||
}
|
||||
int i2 = i - 1;
|
||||
if (((ViewHolderItem) UserCenterActivity.this.j.get(i2)).a == 261 || ((ViewHolderItem) UserCenterActivity.this.j.get(i2)).a == 259) {
|
||||
return 1;
|
||||
}
|
||||
return UserCenterActivity.this.h.N();
|
||||
}
|
||||
});
|
||||
this.recyclerView.setLayoutManager(this.h);
|
||||
}
|
||||
|
||||
private void F0() {
|
||||
this.f = getIntent().getLongExtra("view_user_id", 0L);
|
||||
this.e = UserDbHandler.getUser();
|
||||
User user = this.e;
|
||||
if (user != null) {
|
||||
this.g = user.getUserId();
|
||||
}
|
||||
boolean z = true;
|
||||
this.d = this.g > 0;
|
||||
long j = this.g;
|
||||
if ((j <= 0 || j != this.f) && this.f > 0) {
|
||||
z = false;
|
||||
}
|
||||
this.c = z;
|
||||
e(this.e);
|
||||
}
|
||||
|
||||
private void G0() {
|
||||
boolean z = this.d || this.f > 0;
|
||||
this.unLoginLayout.setVisibility(z ? 8 : 0);
|
||||
this.leftLayout.setVisibility(z ? 0 : 8);
|
||||
boolean z2 = this.d;
|
||||
boolean z3 = !z2 || (z2 && !this.c);
|
||||
this.iv_follow.setVisibility((this.c || !this.d) ? 8 : 0);
|
||||
this.editImageView.setVisibility(z3 ? 8 : 0);
|
||||
if (z) {
|
||||
return;
|
||||
}
|
||||
List<Activity> activityTask = UbtActivityStack.getInstance().getActivityTask(JimuApplication.l());
|
||||
boolean z4 = false;
|
||||
for (int i = 0; i < activityTask.size(); i++) {
|
||||
if (activityTask.get(i).getClass().getSimpleName().equals(LoginActivity.class.getSimpleName())) {
|
||||
z4 = true;
|
||||
}
|
||||
}
|
||||
if (z4) {
|
||||
return;
|
||||
}
|
||||
LoginActivity.start(this, FileUtil.ZIP_BUFFER_SIZE);
|
||||
}
|
||||
|
||||
private void f(User user) {
|
||||
if (user != null) {
|
||||
this.g = user.getUserId();
|
||||
F0();
|
||||
G0();
|
||||
relayout();
|
||||
e(user);
|
||||
this.b.subscribe();
|
||||
}
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
F0();
|
||||
LogUtils.c("initView~~~~~~~~~~~~~~~~");
|
||||
G0();
|
||||
this.navBarView.setRightIcon(R.mipmap.setting);
|
||||
this.navBarView.setListener(new NavigationBarView.OnActionClickListener.Stub() { // from class: com.ubt.jimu.user.view.UserCenterActivity.1
|
||||
@Override // com.ubt.jimu.widgets.NavigationBarView.OnActionClickListener.Stub
|
||||
public void onRightClick(View view) {
|
||||
UserCenterActivity.this.startActivity(new Intent(UserCenterActivity.this, (Class<?>) CommonSettingActivity.class));
|
||||
}
|
||||
});
|
||||
if (JimuApplication.l().i()) {
|
||||
this.imgNotLogin.setImageResource(R.drawable.icon_no_login);
|
||||
}
|
||||
D0();
|
||||
}
|
||||
|
||||
public static void start(Activity activity) {
|
||||
a(activity, 0L);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.UserInfoContract$View
|
||||
public void E() {
|
||||
this.j.remove(this.l);
|
||||
this.j.removeAll(this.k);
|
||||
this.k.clear();
|
||||
this.l = new ViewHolderItem(260, "", "");
|
||||
ViewHolderItem viewHolderItem = this.l;
|
||||
viewHolderItem.f = this.c;
|
||||
this.j.add(viewHolderItem);
|
||||
this.i.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.UserInfoContract$View
|
||||
public long S() {
|
||||
long j = this.g;
|
||||
if (j == -1) {
|
||||
return 0L;
|
||||
}
|
||||
return j;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.ViewImpl
|
||||
public View getRootView() {
|
||||
return this.rootView;
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onActivityResult(int i, int i2, Intent intent) {
|
||||
super.onActivityResult(i, i2, intent);
|
||||
LogUtils.c("用户中心返回:" + i);
|
||||
if (i == 4096) {
|
||||
if (intent == null) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
User user = (User) intent.getSerializableExtra("user");
|
||||
if (user == null) {
|
||||
finish();
|
||||
} else {
|
||||
f(user);
|
||||
LogUtils.c("onActivityResult~~~~~~~~~~~~~~~~~~~");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onBackAction(View view) {
|
||||
finish();
|
||||
}
|
||||
|
||||
public void onCollectAction(View view) {
|
||||
CollectionActivity.a(this, d());
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_user_center);
|
||||
this.a = ButterKnife.a(this);
|
||||
initView();
|
||||
E0();
|
||||
new UserInfoPresenter(this, this);
|
||||
EventBus.b().c(this);
|
||||
if (this.d || this.f > 0) {
|
||||
this.b.subscribe();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onDestroy() {
|
||||
UserInfoContract$Presenter userInfoContract$Presenter = this.b;
|
||||
if (userInfoContract$Presenter != null) {
|
||||
userInfoContract$Presenter.unSubscribe();
|
||||
}
|
||||
ProgressBar progressBar = this.levelProgressBar;
|
||||
if (progressBar != null) {
|
||||
progressBar.clearAnimation();
|
||||
}
|
||||
Unbinder unbinder = this.a;
|
||||
if (unbinder != null) {
|
||||
unbinder.unbind();
|
||||
this.a = null;
|
||||
}
|
||||
super.onDestroy();
|
||||
EventBus.b().d(this);
|
||||
}
|
||||
|
||||
public void onFansAction(View view) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putLong("view_user_id", d());
|
||||
bundle.putInt("page_index", 1);
|
||||
InterestFansActivity.a(this, bundle);
|
||||
}
|
||||
|
||||
public void onInterestAction(View view) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt("page_index", 0);
|
||||
bundle.putLong("view_user_id", d());
|
||||
InterestFansActivity.a(this, bundle);
|
||||
}
|
||||
|
||||
public void onIvFollow(View view) {
|
||||
CommunityManager.create().subscriptionAdd((int) d(), new ApiObserver<FollowEntities>(null) { // from class: com.ubt.jimu.user.view.UserCenterActivity.2
|
||||
@Override // com.ubt.jimu.base.http.ApiObserver, io.reactivex.Observer
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onNext(FollowEntities followEntities) {
|
||||
super.onNext(followEntities);
|
||||
UserCenterActivity.this.b.a(UserCenterActivity.this.g, UserCenterActivity.this.f);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void onLoginAction(View view) {
|
||||
this.g = 10L;
|
||||
LoginActivity.start(this, FileUtil.ZIP_BUFFER_SIZE);
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onLoginOrLogoutMessageEvent(MessageEvent messageEvent) {
|
||||
XLog.c(m, "onLoginOrLogoutMessageEvent:" + messageEvent.getType());
|
||||
int type = messageEvent.getType();
|
||||
if (type != 0) {
|
||||
if (type == 1) {
|
||||
this.g = 0L;
|
||||
this.e = null;
|
||||
this.d = false;
|
||||
this.c = false;
|
||||
LogUtils.c("onLoginOrLogoutMessageEvent~~~~~~~");
|
||||
G0();
|
||||
relayout();
|
||||
return;
|
||||
}
|
||||
if (type == 4) {
|
||||
finish();
|
||||
return;
|
||||
} else if (type == 6) {
|
||||
e(UserDbHandler.getUser());
|
||||
return;
|
||||
} else if (type != 7) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
initView();
|
||||
this.b.subscribe();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.view.adapter.PostAndDiyAdapter.IPostOrDiyListener
|
||||
public void onNewDiy(View view) {
|
||||
if (this.c) {
|
||||
ARouter.b().a("/diy/usercreatives").t();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onNewIntent(Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
LogUtils.c("onNewIntent~~~~~~~~~~~~~~~");
|
||||
UbtActivityStack.getInstance().getActivityTask(getApplication());
|
||||
this.f = intent.getLongExtra("view_user_id", 0L);
|
||||
this.e = UserDbHandler.getUser();
|
||||
User user = this.e;
|
||||
if (user != null) {
|
||||
this.g = user.getUserId();
|
||||
}
|
||||
boolean z = true;
|
||||
this.d = this.g > 0;
|
||||
long j = this.g;
|
||||
if ((j <= 0 || j != this.f) && this.f > 0) {
|
||||
z = false;
|
||||
}
|
||||
this.c = z;
|
||||
e(this.e);
|
||||
G0();
|
||||
relayout();
|
||||
if (this.d || this.f > 0) {
|
||||
this.b.subscribe();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.view.adapter.PostAndDiyAdapter.IPostOrDiyListener
|
||||
public void onNewPost(View view) {
|
||||
DraftsListBean draftsListBean = (DraftsListBean) SPUtils.b(Constant.Publish.DRAFTS, Constant.Publish.DRAFTS_KEY + Cache.getInstance().getUserId());
|
||||
startActivity((draftsListBean == null || draftsListBean.getLinkedHashMap().size() == 0) ? new Intent(this, (Class<?>) PublishCommunityActivity.class) : new Intent(this, (Class<?>) MyDraftsActivity.class));
|
||||
}
|
||||
|
||||
public void onPraiseAction(View view) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt("page_index", 1);
|
||||
bundle.putLong("view_user_id", d());
|
||||
PraiseActivity.a(this, bundle);
|
||||
}
|
||||
|
||||
public void onRankAction(View view) {
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
@Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
}
|
||||
|
||||
public void onUserPortraitAction(View view) {
|
||||
if (this.d && this.c) {
|
||||
if (this.g > 0) {
|
||||
UserDetailInfoActivity.start(this);
|
||||
} else {
|
||||
LoginActivity.start(this, FileUtil.ZIP_BUFFER_SIZE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.UserInfoContract$View
|
||||
public void r(List<DiyDBModel> list) {
|
||||
this.j.remove(this.l);
|
||||
this.j.removeAll(this.k);
|
||||
this.k.clear();
|
||||
if (list == null || list.size() == 0) {
|
||||
this.l = new ViewHolderItem(260, "", "");
|
||||
ViewHolderItem viewHolderItem = this.l;
|
||||
viewHolderItem.f = this.c;
|
||||
this.j.add(viewHolderItem);
|
||||
} else {
|
||||
int i = 0;
|
||||
for (int i2 = 0; i2 < list.size() && i <= 3; i2++) {
|
||||
DiyDBModel diyDBModel = list.get(i2);
|
||||
String logPath = DiyRobotDbHandler.getLogPath(ModelType.PLAYER_DATA, diyDBModel.getCustomModelId());
|
||||
File file = new File(logPath);
|
||||
if (TextUtils.isEmpty(logPath) || !file.exists()) {
|
||||
if (!TextUtils.isEmpty(diyDBModel.getCompressImagePath())) {
|
||||
logPath = diyDBModel.getCompressImagePath();
|
||||
}
|
||||
}
|
||||
i++;
|
||||
ViewHolderItem viewHolderItem2 = new ViewHolderItem(261, "", logPath);
|
||||
diyDBModel.getCustomModelId();
|
||||
this.k.add(viewHolderItem2);
|
||||
}
|
||||
this.j.addAll(this.k);
|
||||
}
|
||||
this.i.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
public void relayout() {
|
||||
}
|
||||
|
||||
public static void a(Context context, long j) {
|
||||
Intent intent = new Intent(context, (Class<?>) UserCenterActivity.class);
|
||||
intent.putExtra("view_user_id", j);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
private void b(UserExtraInfo userExtraInfo) {
|
||||
String str;
|
||||
if (userExtraInfo == null) {
|
||||
return;
|
||||
}
|
||||
this.userTitleTextView.setText(userExtraInfo.getTitle());
|
||||
this.interestTextView.setText(String.valueOf(userExtraInfo.getSubscriptionNum()));
|
||||
this.fansTextView.setText(String.valueOf(userExtraInfo.getFansNum()));
|
||||
this.collectTextView.setText(String.valueOf(userExtraInfo.getCollectNum()));
|
||||
this.praiseTextView.setText(String.valueOf(userExtraInfo.getPraiseNum()));
|
||||
this.levelTextView.setText(String.valueOf("LV" + userExtraInfo.getLevel()));
|
||||
if (TextUtils.isEmpty(userExtraInfo.getRate())) {
|
||||
str = "0";
|
||||
} else {
|
||||
str = userExtraInfo.getRate() + "%";
|
||||
}
|
||||
boolean z = false;
|
||||
String format = String.format(getString(R.string.rate_format), str);
|
||||
this.rateTextView.setText(com.ubt.jimu.utils.TextUtils.a(format, str, format.indexOf(str), getResources().getColor(R.color.txt_E21463)));
|
||||
this.rankTextView.setText(String.valueOf(userExtraInfo.getRank()));
|
||||
this.nicknameTextView.setText(userExtraInfo.getNickName());
|
||||
DensityUtils.a(this, 100);
|
||||
RequestBuilder<Drawable> a = Glide.a((FragmentActivity) this).a(userExtraInfo.getUserImage());
|
||||
a.a(RequestOptions.N().b(R.drawable.community_img_official).a(R.drawable.community_img_official));
|
||||
a.a(this.portraitImageView);
|
||||
this.percentTextView.setText(userExtraInfo.getCurExp() + "/" + userExtraInfo.getExpLength());
|
||||
if (userExtraInfo.getCurExp() > 0 && userExtraInfo.getExpLength() > 0) {
|
||||
int curExp = (int) ((userExtraInfo.getCurExp() * 100) / (userExtraInfo.getExpLength() * 1.0f));
|
||||
this.levelProgressBar.setProgress(curExp);
|
||||
AnimUtils.a(this.levelProgressBar, curExp);
|
||||
}
|
||||
if (!this.c && this.d) {
|
||||
z = true;
|
||||
}
|
||||
if (z) {
|
||||
this.iv_follow.setImageResource(userExtraInfo.getIsSubscribed() == 1 ? R.mipmap.ic_interest : R.mipmap.ic_have_not_interest);
|
||||
}
|
||||
}
|
||||
|
||||
private void e(User user) {
|
||||
if (user == null) {
|
||||
return;
|
||||
}
|
||||
boolean z = this.d;
|
||||
if (!z || (z && !this.c)) {
|
||||
return;
|
||||
}
|
||||
this.nicknameTextView.setText(user.getNickName());
|
||||
this.portraitImageView.setBackgroundResource(R.drawable.user_center_protrait_bg);
|
||||
RequestBuilder<Drawable> a = Glide.a((FragmentActivity) this).a(user.getUserImage());
|
||||
a.a(RequestOptions.N().b(R.drawable.community_img_official).a(R.drawable.community_img_official));
|
||||
a.a(this.portraitImageView);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.UserInfoContract$View
|
||||
public long d() {
|
||||
long j = this.f;
|
||||
return j == 0 ? this.g : j;
|
||||
}
|
||||
|
||||
public static class ViewHolderItem {
|
||||
public int a;
|
||||
public String b;
|
||||
public String c;
|
||||
public boolean d = false;
|
||||
public boolean e = true;
|
||||
public boolean f = true;
|
||||
|
||||
public ViewHolderItem() {
|
||||
}
|
||||
|
||||
public ViewHolderItem(int i, String str, String str2) {
|
||||
this.a = i;
|
||||
this.b = str;
|
||||
this.c = str2;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubtech.view.BaseView
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void setPresenter(UserInfoContract$Presenter userInfoContract$Presenter) {
|
||||
this.b = userInfoContract$Presenter;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.UserInfoContract$View
|
||||
public void a(UserExtraInfo userExtraInfo) {
|
||||
XLog.c(m, userExtraInfo.toString());
|
||||
b(userExtraInfo);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.view.adapter.PostAndDiyAdapter.IPostOrDiyListener
|
||||
public void a(ViewHolderItem viewHolderItem) {
|
||||
ARouter.b().a("/diy/usercreatives").t();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.view.adapter.PostAndDiyAdapter.IPostOrDiyListener
|
||||
public void b(ViewHolderItem viewHolderItem) {
|
||||
MyIssueActivity.start(this, d() + "");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.DebouncingOnClickListener;
|
||||
import butterknife.internal.Utils;
|
||||
import com.recyclelib.URecyclerView;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.widgets.NavigationBarView;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class UserCenterActivity_ViewBinding implements Unbinder {
|
||||
private UserCenterActivity b;
|
||||
private View c;
|
||||
private View d;
|
||||
private View e;
|
||||
private View f;
|
||||
private View g;
|
||||
private View h;
|
||||
private View i;
|
||||
private View j;
|
||||
private View k;
|
||||
private View l;
|
||||
private View m;
|
||||
|
||||
public UserCenterActivity_ViewBinding(final UserCenterActivity userCenterActivity, View view) {
|
||||
this.b = userCenterActivity;
|
||||
View a = Utils.a(view, R.id.backImageView, "field 'backImageView' and method 'onBackAction'");
|
||||
userCenterActivity.backImageView = (ImageView) Utils.a(a, R.id.backImageView, "field 'backImageView'", ImageView.class);
|
||||
this.c = a;
|
||||
a.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserCenterActivity_ViewBinding.1
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userCenterActivity.onBackAction(view2);
|
||||
}
|
||||
});
|
||||
userCenterActivity.leftLayout = (LinearLayout) Utils.b(view, R.id.leftLayout, "field 'leftLayout'", LinearLayout.class);
|
||||
View a2 = Utils.a(view, R.id.portraitImageView, "field 'portraitImageView' and method 'onUserPortraitAction'");
|
||||
userCenterActivity.portraitImageView = (ImageView) Utils.a(a2, R.id.portraitImageView, "field 'portraitImageView'", ImageView.class);
|
||||
this.d = a2;
|
||||
a2.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserCenterActivity_ViewBinding.2
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userCenterActivity.onUserPortraitAction(view2);
|
||||
}
|
||||
});
|
||||
View a3 = Utils.a(view, R.id.nicknameTextView, "field 'nicknameTextView' and method 'onUserPortraitAction'");
|
||||
userCenterActivity.nicknameTextView = (TextView) Utils.a(a3, R.id.nicknameTextView, "field 'nicknameTextView'", TextView.class);
|
||||
this.e = a3;
|
||||
a3.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserCenterActivity_ViewBinding.3
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userCenterActivity.onUserPortraitAction(view2);
|
||||
}
|
||||
});
|
||||
View a4 = Utils.a(view, R.id.editImageView, "field 'editImageView' and method 'onUserPortraitAction'");
|
||||
userCenterActivity.editImageView = (ImageView) Utils.a(a4, R.id.editImageView, "field 'editImageView'", ImageView.class);
|
||||
this.f = a4;
|
||||
a4.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserCenterActivity_ViewBinding.4
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userCenterActivity.onUserPortraitAction(view2);
|
||||
}
|
||||
});
|
||||
userCenterActivity.userTitleTextView = (TextView) Utils.b(view, R.id.userTitleTextView, "field 'userTitleTextView'", TextView.class);
|
||||
userCenterActivity.interestTextView = (TextView) Utils.b(view, R.id.interestTextView, "field 'interestTextView'", TextView.class);
|
||||
userCenterActivity.fansTextView = (TextView) Utils.b(view, R.id.fansTextView, "field 'fansTextView'", TextView.class);
|
||||
userCenterActivity.collectTextView = (TextView) Utils.b(view, R.id.collectTextView, "field 'collectTextView'", TextView.class);
|
||||
userCenterActivity.praiseTextView = (TextView) Utils.b(view, R.id.praiseTextView, "field 'praiseTextView'", TextView.class);
|
||||
userCenterActivity.levelTextView = (TextView) Utils.b(view, R.id.levelTextView, "field 'levelTextView'", TextView.class);
|
||||
userCenterActivity.rateTextView = (TextView) Utils.b(view, R.id.rateTextView, "field 'rateTextView'", TextView.class);
|
||||
userCenterActivity.rankTextView = (TextView) Utils.b(view, R.id.scoreTextView, "field 'rankTextView'", TextView.class);
|
||||
userCenterActivity.leftBottomLayout = (LinearLayout) Utils.b(view, R.id.leftBottomLayout, "field 'leftBottomLayout'", LinearLayout.class);
|
||||
userCenterActivity.levelParent = (LinearLayout) Utils.b(view, R.id.levelParent, "field 'levelParent'", LinearLayout.class);
|
||||
userCenterActivity.percentTextView = (TextView) Utils.b(view, R.id.percentTextView, "field 'percentTextView'", TextView.class);
|
||||
userCenterActivity.levelProgressBar = (ProgressBar) Utils.b(view, R.id.levelProgressBar, "field 'levelProgressBar'", ProgressBar.class);
|
||||
View a5 = Utils.a(view, R.id.iv_follow, "field 'iv_follow' and method 'onIvFollow'");
|
||||
userCenterActivity.iv_follow = (ImageView) Utils.a(a5, R.id.iv_follow, "field 'iv_follow'", ImageView.class);
|
||||
this.g = a5;
|
||||
a5.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserCenterActivity_ViewBinding.5
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userCenterActivity.onIvFollow(view2);
|
||||
}
|
||||
});
|
||||
userCenterActivity.unLoginLayout = (FrameLayout) Utils.b(view, R.id.unLoginLayout, "field 'unLoginLayout'", FrameLayout.class);
|
||||
View a6 = Utils.a(view, R.id.btnLogin, "field 'btnLogin' and method 'onLoginAction'");
|
||||
userCenterActivity.btnLogin = (Button) Utils.a(a6, R.id.btnLogin, "field 'btnLogin'", Button.class);
|
||||
this.h = a6;
|
||||
a6.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserCenterActivity_ViewBinding.6
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userCenterActivity.onLoginAction(view2);
|
||||
}
|
||||
});
|
||||
userCenterActivity.imgNotLogin = (ImageView) Utils.b(view, R.id.imgNotLogin, "field 'imgNotLogin'", ImageView.class);
|
||||
userCenterActivity.rootView = Utils.a(view, R.id.rootView, "field 'rootView'");
|
||||
userCenterActivity.navBarView = (NavigationBarView) Utils.b(view, R.id.nbv_bar, "field 'navBarView'", NavigationBarView.class);
|
||||
userCenterActivity.recyclerView = (URecyclerView) Utils.b(view, R.id.recyclerView, "field 'recyclerView'", URecyclerView.class);
|
||||
userCenterActivity.imgInterest = (ImageView) Utils.b(view, R.id.imgInterest, "field 'imgInterest'", ImageView.class);
|
||||
userCenterActivity.imgFans = (ImageView) Utils.b(view, R.id.imgFans, "field 'imgFans'", ImageView.class);
|
||||
userCenterActivity.imgCollect = (ImageView) Utils.b(view, R.id.imgCollect, "field 'imgCollect'", ImageView.class);
|
||||
userCenterActivity.imgPraise = (ImageView) Utils.b(view, R.id.imgPraise, "field 'imgPraise'", ImageView.class);
|
||||
View a7 = Utils.a(view, R.id.interestParent, "method 'onInterestAction'");
|
||||
this.i = a7;
|
||||
a7.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserCenterActivity_ViewBinding.7
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userCenterActivity.onInterestAction(view2);
|
||||
}
|
||||
});
|
||||
View a8 = Utils.a(view, R.id.fansParent, "method 'onFansAction'");
|
||||
this.j = a8;
|
||||
a8.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserCenterActivity_ViewBinding.8
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userCenterActivity.onFansAction(view2);
|
||||
}
|
||||
});
|
||||
View a9 = Utils.a(view, R.id.collectParent, "method 'onCollectAction'");
|
||||
this.k = a9;
|
||||
a9.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserCenterActivity_ViewBinding.9
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userCenterActivity.onCollectAction(view2);
|
||||
}
|
||||
});
|
||||
View a10 = Utils.a(view, R.id.praiseParent, "method 'onPraiseAction'");
|
||||
this.l = a10;
|
||||
a10.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserCenterActivity_ViewBinding.10
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userCenterActivity.onPraiseAction(view2);
|
||||
}
|
||||
});
|
||||
View a11 = Utils.a(view, R.id.rankParent, "method 'onRankAction'");
|
||||
this.m = a11;
|
||||
a11.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserCenterActivity_ViewBinding.11
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userCenterActivity.onRankAction(view2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
UserCenterActivity userCenterActivity = this.b;
|
||||
if (userCenterActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
userCenterActivity.backImageView = null;
|
||||
userCenterActivity.leftLayout = null;
|
||||
userCenterActivity.portraitImageView = null;
|
||||
userCenterActivity.nicknameTextView = null;
|
||||
userCenterActivity.editImageView = null;
|
||||
userCenterActivity.userTitleTextView = null;
|
||||
userCenterActivity.interestTextView = null;
|
||||
userCenterActivity.fansTextView = null;
|
||||
userCenterActivity.collectTextView = null;
|
||||
userCenterActivity.praiseTextView = null;
|
||||
userCenterActivity.levelTextView = null;
|
||||
userCenterActivity.rateTextView = null;
|
||||
userCenterActivity.rankTextView = null;
|
||||
userCenterActivity.leftBottomLayout = null;
|
||||
userCenterActivity.levelParent = null;
|
||||
userCenterActivity.percentTextView = null;
|
||||
userCenterActivity.levelProgressBar = null;
|
||||
userCenterActivity.iv_follow = null;
|
||||
userCenterActivity.unLoginLayout = null;
|
||||
userCenterActivity.btnLogin = null;
|
||||
userCenterActivity.imgNotLogin = null;
|
||||
userCenterActivity.rootView = null;
|
||||
userCenterActivity.navBarView = null;
|
||||
userCenterActivity.recyclerView = null;
|
||||
userCenterActivity.imgInterest = null;
|
||||
userCenterActivity.imgFans = null;
|
||||
userCenterActivity.imgCollect = null;
|
||||
userCenterActivity.imgPraise = null;
|
||||
this.c.setOnClickListener(null);
|
||||
this.c = null;
|
||||
this.d.setOnClickListener(null);
|
||||
this.d = null;
|
||||
this.e.setOnClickListener(null);
|
||||
this.e = null;
|
||||
this.f.setOnClickListener(null);
|
||||
this.f = null;
|
||||
this.g.setOnClickListener(null);
|
||||
this.g = null;
|
||||
this.h.setOnClickListener(null);
|
||||
this.h = null;
|
||||
this.i.setOnClickListener(null);
|
||||
this.i = null;
|
||||
this.j.setOnClickListener(null);
|
||||
this.j = null;
|
||||
this.k.setOnClickListener(null);
|
||||
this.k = null;
|
||||
this.l.setOnClickListener(null);
|
||||
this.l = null;
|
||||
this.m.setOnClickListener(null);
|
||||
this.m = null;
|
||||
}
|
||||
}
|
||||
723
sources/com/ubt/jimu/user/view/UserDetailInfoActivity.java
Normal file
723
sources/com/ubt/jimu/user/view/UserDetailInfoActivity.java
Normal file
@@ -0,0 +1,723 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.graphics.ColorFilter;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.view.animation.RotateAnimation;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import butterknife.ButterKnife;
|
||||
import com.alibaba.android.arouter.facade.Postcard;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.Priority;
|
||||
import com.bumptech.glide.RequestBuilder;
|
||||
import com.bumptech.glide.load.DataSource;
|
||||
import com.bumptech.glide.load.engine.GlideException;
|
||||
import com.bumptech.glide.request.RequestListener;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.db.user.UserDbHandler;
|
||||
import com.ubt.jimu.base.dialog.JimuSimpleDialog;
|
||||
import com.ubt.jimu.base.entities.NSLocale;
|
||||
import com.ubt.jimu.base.entities.PublishType;
|
||||
import com.ubt.jimu.base.entities.User;
|
||||
import com.ubt.jimu.base.entities.UserDetailInfo;
|
||||
import com.ubt.jimu.base.event.MessageEvent;
|
||||
import com.ubt.jimu.base.http.ApiResultException;
|
||||
import com.ubt.jimu.base.http.IApiObserver;
|
||||
import com.ubt.jimu.upload.DataUploadProxy;
|
||||
import com.ubt.jimu.upload.SimpleUploadCallback;
|
||||
import com.ubt.jimu.upload.UploadRequest;
|
||||
import com.ubt.jimu.upload.UploadResponse;
|
||||
import com.ubt.jimu.user.repository.UserRepository;
|
||||
import com.ubt.jimu.utils.LocaleUtils;
|
||||
import com.ubt.jimu.utils.LogUtils;
|
||||
import com.ubt.jimu.utils.RxSchedulers;
|
||||
import com.ubt.jimu.widgets.JAlertDialog;
|
||||
import com.ubt.jimu.widgets.NavigationBarView;
|
||||
import com.ubt.jimu.widgets.RoundedImageView;
|
||||
import com.ubt.jimu.widgets.choosePhotos.AlbumActivity;
|
||||
import com.ubt.jimu.widgets.choosePhotos.media.HPMedia;
|
||||
import com.ubtech.permission.JimuPermissionRequest;
|
||||
import com.ubtech.permission.PermissionRequestListener;
|
||||
import com.ubtech.utils.XLog;
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.ObservableEmitter;
|
||||
import io.reactivex.ObservableOnSubscribe;
|
||||
import io.reactivex.Observer;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.CompositeDisposable;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.CharBuffer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class UserDetailInfoActivity extends BaseActivity {
|
||||
private String a;
|
||||
private CompositeDisposable b;
|
||||
private UserDetailInfo c;
|
||||
TextView countryTextView;
|
||||
private String e;
|
||||
TextView emailTextView;
|
||||
private JAlertDialog g;
|
||||
ImageView im_shield;
|
||||
ImageView iv_camera;
|
||||
ImageView iv_female;
|
||||
ImageView iv_male;
|
||||
ImageView iv_upload;
|
||||
NavigationBarView navBarView;
|
||||
EditText nickNameEditText;
|
||||
RoundedImageView portraitImageView;
|
||||
TextView telephoneTextView;
|
||||
TextView tv_female;
|
||||
TextView tv_male;
|
||||
private int d = 1;
|
||||
private Handler f = new Handler();
|
||||
private boolean h = false;
|
||||
|
||||
private void D0() {
|
||||
JimuSimpleDialog.buildSimpleDialog(this, getString(R.string.ok), getString(R.string.cancel), "", getString(R.string.activity_tip_quit_update_address), 17, new DialogInterface.OnClickListener() { // from class: com.ubt.jimu.user.view.r
|
||||
@Override // android.content.DialogInterface.OnClickListener
|
||||
public final void onClick(DialogInterface dialogInterface, int i) {
|
||||
dialogInterface.dismiss();
|
||||
}
|
||||
}, new DialogInterface.OnClickListener() { // from class: com.ubt.jimu.user.view.p
|
||||
@Override // android.content.DialogInterface.OnClickListener
|
||||
public final void onClick(DialogInterface dialogInterface, int i) {
|
||||
UserDetailInfoActivity.this.a(dialogInterface, i);
|
||||
}
|
||||
}).show();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public boolean E0() {
|
||||
boolean a = a(this.nickNameEditText.getText().toString(), this.telephoneTextView.getText().toString(), this.countryTextView.getText().toString(), this.emailTextView.getText().toString());
|
||||
if (a) {
|
||||
D0();
|
||||
} else {
|
||||
finish();
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public void F0() {
|
||||
this.iv_upload.clearAnimation();
|
||||
this.iv_upload.setVisibility(8);
|
||||
this.h = false;
|
||||
}
|
||||
|
||||
private List<NSLocale> G0() {
|
||||
List<NSLocale> list;
|
||||
ArrayList arrayList = new ArrayList();
|
||||
InputStream inputStream = null;
|
||||
try {
|
||||
try {
|
||||
try {
|
||||
inputStream = getResources().openRawResource(R.raw.diallingcode);
|
||||
InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
|
||||
CharBuffer allocate = CharBuffer.allocate(51200);
|
||||
if (inputStreamReader.read(allocate) != 0) {
|
||||
allocate.flip();
|
||||
}
|
||||
list = (List) new Gson().fromJson(allocate.toString(), new TypeToken<ArrayList<NSLocale>>(this) { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity.12
|
||||
}.getType());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
if (inputStream != null) {
|
||||
inputStream.close();
|
||||
}
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
e2.printStackTrace();
|
||||
}
|
||||
if (list != null && list.size() != 0) {
|
||||
Locale e3 = LocaleUtils.e();
|
||||
if (e3.getLanguage().equals(Locale.CHINA.getLanguage())) {
|
||||
for (NSLocale nSLocale : list) {
|
||||
nSLocale.setName(nSLocale.getChineseName());
|
||||
}
|
||||
} else if (e3.getLanguage().equals(Locale.ENGLISH.getLanguage())) {
|
||||
for (NSLocale nSLocale2 : list) {
|
||||
nSLocale2.setName(nSLocale2.getName());
|
||||
}
|
||||
} else {
|
||||
for (NSLocale nSLocale3 : list) {
|
||||
nSLocale3.setName(new Locale("", nSLocale3.getCode()).getDisplayCountry());
|
||||
}
|
||||
}
|
||||
arrayList.addAll(list);
|
||||
if (inputStream != null) {
|
||||
inputStream.close();
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
return arrayList;
|
||||
} finally {
|
||||
if (0 != 0) {
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (Exception e4) {
|
||||
e4.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void H0() {
|
||||
this.b = new CompositeDisposable();
|
||||
UserRepository.c().compose(RxSchedulers.a()).subscribe(new IApiObserver<UserDetailInfo>(this) { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity.3
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver, io.reactivex.Observer
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onNext(UserDetailInfo userDetailInfo) {
|
||||
super.onNext(userDetailInfo);
|
||||
UserDetailInfoActivity.this.b(userDetailInfo);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver
|
||||
public void onApiError(ApiResultException apiResultException) {
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver, io.reactivex.Observer
|
||||
public void onSubscribe(Disposable disposable) {
|
||||
super.onSubscribe(disposable);
|
||||
UserDetailInfoActivity.this.b.b(disposable);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void I0() {
|
||||
JAlertDialog.Builder builder = new JAlertDialog.Builder(this);
|
||||
builder.a(R.drawable.ic_loading);
|
||||
builder.a(true);
|
||||
this.g = builder.a();
|
||||
this.g.show();
|
||||
}
|
||||
|
||||
private void J0() {
|
||||
this.h = true;
|
||||
this.iv_upload.setVisibility(0);
|
||||
RotateAnimation rotateAnimation = new RotateAnimation(0.0f, 720.0f, 1, 0.5f, 1, 0.5f);
|
||||
rotateAnimation.setInterpolator(new LinearInterpolator());
|
||||
rotateAnimation.setDuration(1200L);
|
||||
rotateAnimation.setRepeatCount(-1);
|
||||
rotateAnimation.setRepeatMode(1);
|
||||
this.iv_upload.startAnimation(rotateAnimation);
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
this.navBarView.setListener(new NavigationBarView.OnActionClickListener.Stub() { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity.1
|
||||
@Override // com.ubt.jimu.widgets.NavigationBarView.OnActionClickListener.Stub
|
||||
public void onLeftClick(View view) {
|
||||
UserDetailInfoActivity.this.E0();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.widgets.NavigationBarView.OnActionClickListener.Stub
|
||||
public void onRightClick(View view) {
|
||||
UserDetailInfoActivity userDetailInfoActivity = UserDetailInfoActivity.this;
|
||||
if (userDetailInfoActivity.a(userDetailInfoActivity.nickNameEditText.getText().toString(), UserDetailInfoActivity.this.telephoneTextView.getText().toString(), UserDetailInfoActivity.this.countryTextView.getText().toString(), UserDetailInfoActivity.this.emailTextView.getText().toString())) {
|
||||
UserDetailInfoActivity.this.a(view);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.navBarView.setRightIcon(R.drawable.ic_nav_finish);
|
||||
this.navBarView.setMode(0);
|
||||
this.nickNameEditText.addTextChangedListener(new TextWatcher() { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity.2
|
||||
@Override // android.text.TextWatcher
|
||||
public void afterTextChanged(Editable editable) {
|
||||
TextUtils.isEmpty(editable);
|
||||
}
|
||||
|
||||
@Override // android.text.TextWatcher
|
||||
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
|
||||
}
|
||||
|
||||
@Override // android.text.TextWatcher
|
||||
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
|
||||
String charSequence2 = charSequence.toString();
|
||||
UserDetailInfoActivity userDetailInfoActivity = UserDetailInfoActivity.this;
|
||||
if (userDetailInfoActivity.a(charSequence2, userDetailInfoActivity.telephoneTextView.getText().toString(), UserDetailInfoActivity.this.countryTextView.getText().toString(), UserDetailInfoActivity.this.emailTextView.getText().toString())) {
|
||||
UserDetailInfoActivity.this.navBarView.setMode(1);
|
||||
} else {
|
||||
UserDetailInfoActivity.this.navBarView.setMode(0);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void start(Context context) {
|
||||
context.startActivity(new Intent(context, (Class<?>) UserDetailInfoActivity.class));
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onActivityResult(int i, int i2, Intent intent) {
|
||||
List list;
|
||||
super.onActivityResult(i, i2, intent);
|
||||
if (i2 != -1) {
|
||||
return;
|
||||
}
|
||||
if (i == 1) {
|
||||
this.a = intent.getStringExtra("country_code");
|
||||
this.countryTextView.setText(intent.getStringExtra("country_name"));
|
||||
if (a(this.nickNameEditText.getText().toString(), this.telephoneTextView.getText().toString(), this.countryTextView.getText().toString(), this.emailTextView.getText().toString())) {
|
||||
this.navBarView.setMode(1);
|
||||
return;
|
||||
} else {
|
||||
this.navBarView.setMode(0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (i == 2) {
|
||||
String stringExtra = intent.getStringExtra("new_email");
|
||||
this.emailTextView.setText(stringExtra);
|
||||
if (a(this.nickNameEditText.getText().toString(), this.telephoneTextView.getText().toString(), this.countryTextView.getText().toString(), stringExtra)) {
|
||||
this.navBarView.setMode(1);
|
||||
return;
|
||||
} else {
|
||||
this.navBarView.setMode(0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (i != 3) {
|
||||
if (i == 4 || i != 5 || (list = (List) intent.getSerializableExtra("result_data")) == null || list.size() <= 0) {
|
||||
return;
|
||||
}
|
||||
a((HPMedia) list.get(0));
|
||||
return;
|
||||
}
|
||||
String stringExtra2 = intent.getStringExtra("new_telephone");
|
||||
this.telephoneTextView.setText(stringExtra2);
|
||||
if (a(this.nickNameEditText.getText().toString(), stringExtra2, this.countryTextView.getText().toString(), this.emailTextView.getText().toString())) {
|
||||
this.navBarView.setMode(1);
|
||||
} else {
|
||||
this.navBarView.setMode(0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
public void onBackPressed() {
|
||||
if (E0()) {
|
||||
return;
|
||||
}
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
public void onCountryAction(View view) {
|
||||
String charSequence = this.countryTextView.getText().toString();
|
||||
String substring = (TextUtils.isEmpty(charSequence) || !charSequence.contains("+")) ? null : charSequence.substring(charSequence.indexOf("+"));
|
||||
Postcard a = ARouter.b().a("/account/countrycode");
|
||||
a.a("selected_code", substring);
|
||||
a.a(this, 1);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_user_detail_info);
|
||||
ButterKnife.a(this);
|
||||
initView();
|
||||
H0();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onDestroy() {
|
||||
this.f.removeCallbacksAndMessages(null);
|
||||
super.onDestroy();
|
||||
CompositeDisposable compositeDisposable = this.b;
|
||||
if (compositeDisposable != null) {
|
||||
compositeDisposable.dispose();
|
||||
this.b.a();
|
||||
}
|
||||
}
|
||||
|
||||
public void onEmailAction(View view) {
|
||||
Intent intent = new Intent(this, (Class<?>) EmailUpdateActivity.class);
|
||||
if (!TextUtils.isEmpty(this.emailTextView.getText().toString())) {
|
||||
intent.putExtra("user_email", this.emailTextView.getText().toString());
|
||||
}
|
||||
startActivityForResult(intent, 2);
|
||||
}
|
||||
|
||||
public void onFemaleRadioAction(View view) {
|
||||
this.iv_female.setBackgroundResource(R.drawable.ic_girl);
|
||||
this.iv_male.setBackgroundResource(R.drawable.ic_boy_checked);
|
||||
this.tv_female.setTextColor(getResources().getColor(R.color.theme_input_txt));
|
||||
this.tv_male.setTextColor(getResources().getColor(R.color.bg_FFAD42));
|
||||
this.d = 1;
|
||||
if (a(this.nickNameEditText.getText().toString(), this.telephoneTextView.getText().toString(), this.countryTextView.getText().toString(), this.emailTextView.getText().toString())) {
|
||||
this.navBarView.setMode(1);
|
||||
} else {
|
||||
this.navBarView.setMode(0);
|
||||
}
|
||||
}
|
||||
|
||||
public void onMaleRadioAction(View view) {
|
||||
this.tv_female.setTextColor(getResources().getColor(R.color.bg_FFAD42));
|
||||
this.tv_male.setTextColor(getResources().getColor(R.color.theme_input_txt));
|
||||
this.iv_female.setBackgroundResource(R.drawable.ic_girl_checked);
|
||||
this.iv_male.setBackgroundResource(R.drawable.ic_boy);
|
||||
this.d = 2;
|
||||
if (a(this.nickNameEditText.getText().toString(), this.telephoneTextView.getText().toString(), this.countryTextView.getText().toString(), this.emailTextView.getText().toString())) {
|
||||
this.navBarView.setMode(1);
|
||||
} else {
|
||||
this.navBarView.setMode(0);
|
||||
}
|
||||
}
|
||||
|
||||
public void onTelephoneAction(View view) {
|
||||
Intent intent = new Intent(this, (Class<?>) TelephoneUpdateActivity.class);
|
||||
if (!TextUtils.isEmpty(this.telephoneTextView.getText().toString())) {
|
||||
intent.putExtra("user_phone", this.telephoneTextView.getText().toString());
|
||||
}
|
||||
UserDetailInfo userDetailInfo = this.c;
|
||||
if (userDetailInfo != null && !TextUtils.isEmpty(userDetailInfo.getCountryCode())) {
|
||||
intent.putExtra("user_code", this.c.getCountryCode());
|
||||
}
|
||||
startActivityForResult(intent, 3);
|
||||
}
|
||||
|
||||
public void onUserPortraitAction(View view) {
|
||||
JimuPermissionRequest.c(this, new PermissionRequestListener() { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity.5
|
||||
@Override // com.ubtech.permission.PermissionRequestListener
|
||||
public void onDenied() {
|
||||
}
|
||||
|
||||
@Override // com.ubtech.permission.PermissionRequestListener
|
||||
public void onGranted() {
|
||||
AlbumActivity.a(UserDetailInfoActivity.this, 5, 1, null, 1, "UNITERMING_IMAGE");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
public void relayout() {
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public void c(UserDetailInfo userDetailInfo) {
|
||||
if (userDetailInfo == null) {
|
||||
return;
|
||||
}
|
||||
User user = UserDbHandler.getUser();
|
||||
user.setNickName(userDetailInfo.getNickName());
|
||||
user.setUserImage(userDetailInfo.getUserImage());
|
||||
user.setEmail(userDetailInfo.getUserEmail());
|
||||
user.setCountry(userDetailInfo.getCountryName());
|
||||
user.setCountryCode(userDetailInfo.getCountryCode());
|
||||
user.setGender(String.valueOf(userDetailInfo.getUserGender()));
|
||||
UserDbHandler.save(user);
|
||||
this.f.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity.8
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
if (UserDetailInfoActivity.this.g != null) {
|
||||
UserDetailInfoActivity.this.g.dismiss();
|
||||
}
|
||||
UserDetailInfoActivity userDetailInfoActivity = UserDetailInfoActivity.this;
|
||||
userDetailInfoActivity.toastSuccess(userDetailInfoActivity.getString(R.string.update_success));
|
||||
EventBus.b().b(new MessageEvent(6));
|
||||
UserDetailInfoActivity.this.finish();
|
||||
}
|
||||
}, 1500L);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public void b(UserDetailInfo userDetailInfo) {
|
||||
if (userDetailInfo == null) {
|
||||
return;
|
||||
}
|
||||
this.c = userDetailInfo;
|
||||
this.d = userDetailInfo.getUserGender();
|
||||
if (userDetailInfo.getUserGender() == 1) {
|
||||
this.iv_female.setBackgroundResource(R.drawable.ic_girl);
|
||||
this.iv_male.setBackgroundResource(R.drawable.ic_boy_checked);
|
||||
} else {
|
||||
this.iv_female.setBackgroundResource(R.drawable.ic_girl_checked);
|
||||
this.iv_male.setBackgroundResource(R.drawable.ic_boy);
|
||||
}
|
||||
RequestOptions a = new RequestOptions().b().b(R.drawable.default_photo).a(R.drawable.default_photo).a(Priority.HIGH);
|
||||
this.im_shield.setVisibility(8);
|
||||
RequestBuilder<Drawable> a2 = Glide.a((FragmentActivity) this).a(userDetailInfo.getUserImage());
|
||||
a2.a(a);
|
||||
a2.a(new RequestListener<Drawable>() { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity.4
|
||||
@Override // com.bumptech.glide.request.RequestListener
|
||||
public boolean a(GlideException glideException, Object obj, Target<Drawable> target, boolean z) {
|
||||
UserDetailInfoActivity.this.iv_upload.setVisibility(8);
|
||||
UserDetailInfoActivity.this.im_shield.setVisibility(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // com.bumptech.glide.request.RequestListener
|
||||
public boolean a(Drawable drawable, Object obj, Target<Drawable> target, DataSource dataSource, boolean z) {
|
||||
LogUtils.c("加载成功");
|
||||
UserDetailInfoActivity.this.im_shield.setVisibility(8);
|
||||
UserDetailInfoActivity.this.iv_upload.setVisibility(8);
|
||||
UserDetailInfoActivity.this.iv_camera.setVisibility(8);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
a2.a((ImageView) this.portraitImageView);
|
||||
a(userDetailInfo);
|
||||
this.emailTextView.setText(userDetailInfo.getUserEmail());
|
||||
this.telephoneTextView.setText(userDetailInfo.getUserPhone());
|
||||
this.nickNameEditText.setText(userDetailInfo.getNickName());
|
||||
EditText editText = this.nickNameEditText;
|
||||
editText.setSelection(editText.getText().toString().length());
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public boolean a(String str, String str2, String str3, String str4) {
|
||||
if (this.c == null) {
|
||||
return false;
|
||||
}
|
||||
if (!TextUtils.isEmpty(this.e)) {
|
||||
return true;
|
||||
}
|
||||
if (TextUtils.isEmpty(this.c.getNickName())) {
|
||||
if (!TextUtils.isEmpty(str)) {
|
||||
return true;
|
||||
}
|
||||
} else if (this.c.getNickName().length() <= 16) {
|
||||
if (!this.c.getNickName().equals(str)) {
|
||||
return true;
|
||||
}
|
||||
} else if (!this.c.getNickName().startsWith(str)) {
|
||||
return true;
|
||||
}
|
||||
if (TextUtils.isEmpty(this.c.getUserPhone())) {
|
||||
if (!TextUtils.isEmpty(str2)) {
|
||||
return true;
|
||||
}
|
||||
} else if (!this.c.getUserPhone().equals(str2)) {
|
||||
return true;
|
||||
}
|
||||
if (TextUtils.isEmpty(this.c.getCountryName())) {
|
||||
if (!TextUtils.isEmpty(str3)) {
|
||||
return true;
|
||||
}
|
||||
} else if (!this.c.getCountryName().equals(str3)) {
|
||||
return true;
|
||||
}
|
||||
if (TextUtils.isEmpty(this.c.getUserEmail())) {
|
||||
if (!TextUtils.isEmpty(str4)) {
|
||||
return true;
|
||||
}
|
||||
} else if (!this.c.getUserEmail().equals(str4)) {
|
||||
return true;
|
||||
}
|
||||
return this.d != this.c.getUserGender();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public void a(View view) {
|
||||
if (this.c == null) {
|
||||
XLog.d(this.TAG, "cache info is null. may be should wait for network", new Object[0]);
|
||||
return;
|
||||
}
|
||||
if (this.h) {
|
||||
toastError(getString(R.string.status_uploading));
|
||||
return;
|
||||
}
|
||||
String trim = this.nickNameEditText.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(trim)) {
|
||||
toastError(getString(R.string.error_empty_nick_name));
|
||||
return;
|
||||
}
|
||||
String trim2 = this.countryTextView.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(trim2)) {
|
||||
toastError(getString(R.string.error_empty_country));
|
||||
return;
|
||||
}
|
||||
I0();
|
||||
HashMap hashMap = new HashMap();
|
||||
if (!trim.equals(this.c.getNickName())) {
|
||||
hashMap.put("nickName", trim);
|
||||
}
|
||||
if (this.d != this.c.getUserGender()) {
|
||||
hashMap.put("userGender", String.valueOf(this.d));
|
||||
}
|
||||
if (!trim2.equals(this.c.getCountryName())) {
|
||||
hashMap.put("countryName", trim2);
|
||||
}
|
||||
if (!TextUtils.isEmpty(this.e)) {
|
||||
hashMap.put("userImage", this.e);
|
||||
}
|
||||
if (!TextUtils.isEmpty(this.a) && !this.a.equals(this.c.getCountryCode())) {
|
||||
hashMap.put("countryCode", this.a);
|
||||
}
|
||||
UserRepository.b(hashMap).compose(RxSchedulers.a()).subscribe(new IApiObserver<UserDetailInfo>(this) { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity.6
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver, io.reactivex.Observer
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onNext(UserDetailInfo userDetailInfo) {
|
||||
super.onNext(userDetailInfo);
|
||||
UserDetailInfoActivity.this.c(userDetailInfo);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver
|
||||
public void onApiError(ApiResultException apiResultException) {
|
||||
UserDetailInfoActivity.this.a(apiResultException);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver, io.reactivex.Observer
|
||||
public void onComplete() {
|
||||
super.onComplete();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.http.IApiObserver, io.reactivex.Observer
|
||||
public void onSubscribe(Disposable disposable) {
|
||||
super.onSubscribe(disposable);
|
||||
UserDetailInfoActivity.this.b.b(disposable);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public void a(ApiResultException apiResultException) {
|
||||
JAlertDialog jAlertDialog = this.g;
|
||||
if (jAlertDialog != null) {
|
||||
jAlertDialog.a(apiResultException.getMessage());
|
||||
}
|
||||
this.f.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity.7
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
if (UserDetailInfoActivity.this.g != null) {
|
||||
UserDetailInfoActivity.this.g.dismiss();
|
||||
}
|
||||
}
|
||||
}, 1500L);
|
||||
}
|
||||
|
||||
private void a(HPMedia hPMedia) {
|
||||
Log.i("UserDetailInfoActivity:", hPMedia.toString());
|
||||
this.portraitImageView.setColorFilter((ColorFilter) null);
|
||||
RequestBuilder<Drawable> a = Glide.a((FragmentActivity) this).a(hPMedia.getPath());
|
||||
a.a(new RequestListener<Drawable>() { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity.9
|
||||
@Override // com.bumptech.glide.request.RequestListener
|
||||
public boolean a(GlideException glideException, Object obj, Target<Drawable> target, boolean z) {
|
||||
UserDetailInfoActivity.this.iv_upload.setVisibility(8);
|
||||
UserDetailInfoActivity.this.im_shield.setVisibility(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // com.bumptech.glide.request.RequestListener
|
||||
public boolean a(Drawable drawable, Object obj, Target<Drawable> target, DataSource dataSource, boolean z) {
|
||||
UserDetailInfoActivity.this.im_shield.setVisibility(8);
|
||||
UserDetailInfoActivity.this.iv_upload.setVisibility(8);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
a.a((ImageView) this.portraitImageView);
|
||||
this.iv_camera.setVisibility(8);
|
||||
J0();
|
||||
UploadRequest uploadRequest = new UploadRequest();
|
||||
uploadRequest.a(hPMedia.getDisplayName());
|
||||
uploadRequest.b(hPMedia.getPath());
|
||||
uploadRequest.a(PublishType.IMAGE);
|
||||
DataUploadProxy.c().a(uploadRequest, new SimpleUploadCallback() { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity.10
|
||||
@Override // com.ubt.jimu.upload.IUploadCallback
|
||||
public void uploadFaulted(UploadRequest uploadRequest2, Exception exc) {
|
||||
LogUtils.c("上传失败:" + Thread.currentThread().getName());
|
||||
UserDetailInfoActivity userDetailInfoActivity = UserDetailInfoActivity.this;
|
||||
userDetailInfoActivity.toastError(userDetailInfoActivity.getString(R.string.upload_portrait_fail));
|
||||
UserDetailInfoActivity.this.F0();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.upload.IUploadCallback
|
||||
public void uploadSucceed(UploadResponse uploadResponse) {
|
||||
LogUtils.c("上传成功:" + Thread.currentThread().getName());
|
||||
UserDetailInfoActivity.this.e = uploadResponse.c();
|
||||
UserDetailInfoActivity.this.navBarView.post(new Runnable() { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity.10.1
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
LogUtils.c("111111111");
|
||||
UserDetailInfoActivity.this.navBarView.setMode(1);
|
||||
UserDetailInfoActivity.this.F0();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public /* synthetic */ void a(DialogInterface dialogInterface, int i) {
|
||||
dialogInterface.dismiss();
|
||||
finish();
|
||||
}
|
||||
|
||||
private void a(final UserDetailInfo userDetailInfo) {
|
||||
if (userDetailInfo == null) {
|
||||
return;
|
||||
}
|
||||
if (!TextUtils.isEmpty(userDetailInfo.getCountryName())) {
|
||||
this.countryTextView.setText(userDetailInfo.getCountryName());
|
||||
} else {
|
||||
if (TextUtils.isEmpty(userDetailInfo.getCountryCode())) {
|
||||
return;
|
||||
}
|
||||
Observable.create(new ObservableOnSubscribe() { // from class: com.ubt.jimu.user.view.q
|
||||
@Override // io.reactivex.ObservableOnSubscribe
|
||||
public final void subscribe(ObservableEmitter observableEmitter) {
|
||||
UserDetailInfoActivity.this.a(observableEmitter);
|
||||
}
|
||||
}).subscribeOn(Schedulers.b()).observeOn(AndroidSchedulers.a()).subscribe(new Observer<List<NSLocale>>() { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity.11
|
||||
@Override // io.reactivex.Observer
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onNext(List<NSLocale> list) {
|
||||
if (list == null || list.size() == 0) {
|
||||
UserDetailInfoActivity.this.countryTextView.setText(userDetailInfo.getCountryName());
|
||||
return;
|
||||
}
|
||||
for (NSLocale nSLocale : list) {
|
||||
if (nSLocale.getCode().equals(userDetailInfo.getCountryCode())) {
|
||||
String name = nSLocale.getName();
|
||||
if (LocaleUtils.f()) {
|
||||
name = nSLocale.getChineseName();
|
||||
}
|
||||
UserDetailInfoActivity.this.countryTextView.setText(name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // io.reactivex.Observer
|
||||
public void onComplete() {
|
||||
}
|
||||
|
||||
@Override // io.reactivex.Observer
|
||||
public void onError(Throwable th) {
|
||||
}
|
||||
|
||||
@Override // io.reactivex.Observer
|
||||
public void onSubscribe(Disposable disposable) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public /* synthetic */ void a(ObservableEmitter observableEmitter) throws Exception {
|
||||
observableEmitter.onNext(G0());
|
||||
observableEmitter.onComplete();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.DebouncingOnClickListener;
|
||||
import butterknife.internal.Utils;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.widgets.NavigationBarView;
|
||||
import com.ubt.jimu.widgets.RoundedImageView;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class UserDetailInfoActivity_ViewBinding implements Unbinder {
|
||||
private UserDetailInfoActivity b;
|
||||
private View c;
|
||||
private View d;
|
||||
private View e;
|
||||
private View f;
|
||||
private View g;
|
||||
private View h;
|
||||
private View i;
|
||||
private View j;
|
||||
private View k;
|
||||
|
||||
public UserDetailInfoActivity_ViewBinding(final UserDetailInfoActivity userDetailInfoActivity, View view) {
|
||||
this.b = userDetailInfoActivity;
|
||||
View a = Utils.a(view, R.id.portraitImageView, "field 'portraitImageView' and method 'onUserPortraitAction'");
|
||||
userDetailInfoActivity.portraitImageView = (RoundedImageView) Utils.a(a, R.id.portraitImageView, "field 'portraitImageView'", RoundedImageView.class);
|
||||
this.c = a;
|
||||
a.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity_ViewBinding.1
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userDetailInfoActivity.onUserPortraitAction(view2);
|
||||
}
|
||||
});
|
||||
userDetailInfoActivity.iv_camera = (ImageView) Utils.b(view, R.id.iv_camera, "field 'iv_camera'", ImageView.class);
|
||||
userDetailInfoActivity.iv_upload = (ImageView) Utils.b(view, R.id.iv_upload, "field 'iv_upload'", ImageView.class);
|
||||
userDetailInfoActivity.im_shield = (ImageView) Utils.b(view, R.id.im_shield, "field 'im_shield'", ImageView.class);
|
||||
userDetailInfoActivity.nickNameEditText = (EditText) Utils.b(view, R.id.nickNameEditText, "field 'nickNameEditText'", EditText.class);
|
||||
View a2 = Utils.a(view, R.id.iv_female, "field 'iv_female' and method 'onMaleRadioAction'");
|
||||
userDetailInfoActivity.iv_female = (ImageView) Utils.a(a2, R.id.iv_female, "field 'iv_female'", ImageView.class);
|
||||
this.d = a2;
|
||||
a2.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity_ViewBinding.2
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userDetailInfoActivity.onMaleRadioAction(view2);
|
||||
}
|
||||
});
|
||||
View a3 = Utils.a(view, R.id.iv_male, "field 'iv_male' and method 'onFemaleRadioAction'");
|
||||
userDetailInfoActivity.iv_male = (ImageView) Utils.a(a3, R.id.iv_male, "field 'iv_male'", ImageView.class);
|
||||
this.e = a3;
|
||||
a3.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity_ViewBinding.3
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userDetailInfoActivity.onFemaleRadioAction(view2);
|
||||
}
|
||||
});
|
||||
View a4 = Utils.a(view, R.id.countryTextView, "field 'countryTextView' and method 'onCountryAction'");
|
||||
userDetailInfoActivity.countryTextView = (TextView) Utils.a(a4, R.id.countryTextView, "field 'countryTextView'", TextView.class);
|
||||
this.f = a4;
|
||||
a4.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity_ViewBinding.4
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userDetailInfoActivity.onCountryAction(view2);
|
||||
}
|
||||
});
|
||||
View a5 = Utils.a(view, R.id.emailTextView, "field 'emailTextView' and method 'onEmailAction'");
|
||||
userDetailInfoActivity.emailTextView = (TextView) Utils.a(a5, R.id.emailTextView, "field 'emailTextView'", TextView.class);
|
||||
this.g = a5;
|
||||
a5.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity_ViewBinding.5
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userDetailInfoActivity.onEmailAction(view2);
|
||||
}
|
||||
});
|
||||
View a6 = Utils.a(view, R.id.telephoneTextView, "field 'telephoneTextView' and method 'onTelephoneAction'");
|
||||
userDetailInfoActivity.telephoneTextView = (TextView) Utils.a(a6, R.id.telephoneTextView, "field 'telephoneTextView'", TextView.class);
|
||||
this.h = a6;
|
||||
a6.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity_ViewBinding.6
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userDetailInfoActivity.onTelephoneAction(view2);
|
||||
}
|
||||
});
|
||||
View a7 = Utils.a(view, R.id.tv_male, "field 'tv_male' and method 'onFemaleRadioAction'");
|
||||
userDetailInfoActivity.tv_male = (TextView) Utils.a(a7, R.id.tv_male, "field 'tv_male'", TextView.class);
|
||||
this.i = a7;
|
||||
a7.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity_ViewBinding.7
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userDetailInfoActivity.onFemaleRadioAction(view2);
|
||||
}
|
||||
});
|
||||
View a8 = Utils.a(view, R.id.tv_female, "field 'tv_female' and method 'onMaleRadioAction'");
|
||||
userDetailInfoActivity.tv_female = (TextView) Utils.a(a8, R.id.tv_female, "field 'tv_female'", TextView.class);
|
||||
this.j = a8;
|
||||
a8.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity_ViewBinding.8
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userDetailInfoActivity.onMaleRadioAction(view2);
|
||||
}
|
||||
});
|
||||
userDetailInfoActivity.navBarView = (NavigationBarView) Utils.b(view, R.id.nbv_bar, "field 'navBarView'", NavigationBarView.class);
|
||||
View a9 = Utils.a(view, R.id.card_user_image, "method 'onUserPortraitAction'");
|
||||
this.k = a9;
|
||||
a9.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.UserDetailInfoActivity_ViewBinding.9
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
userDetailInfoActivity.onUserPortraitAction(view2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
UserDetailInfoActivity userDetailInfoActivity = this.b;
|
||||
if (userDetailInfoActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
userDetailInfoActivity.portraitImageView = null;
|
||||
userDetailInfoActivity.iv_camera = null;
|
||||
userDetailInfoActivity.iv_upload = null;
|
||||
userDetailInfoActivity.im_shield = null;
|
||||
userDetailInfoActivity.nickNameEditText = null;
|
||||
userDetailInfoActivity.iv_female = null;
|
||||
userDetailInfoActivity.iv_male = null;
|
||||
userDetailInfoActivity.countryTextView = null;
|
||||
userDetailInfoActivity.emailTextView = null;
|
||||
userDetailInfoActivity.telephoneTextView = null;
|
||||
userDetailInfoActivity.tv_male = null;
|
||||
userDetailInfoActivity.tv_female = null;
|
||||
userDetailInfoActivity.navBarView = null;
|
||||
this.c.setOnClickListener(null);
|
||||
this.c = null;
|
||||
this.d.setOnClickListener(null);
|
||||
this.d = null;
|
||||
this.e.setOnClickListener(null);
|
||||
this.e = null;
|
||||
this.f.setOnClickListener(null);
|
||||
this.f = null;
|
||||
this.g.setOnClickListener(null);
|
||||
this.g = null;
|
||||
this.h.setOnClickListener(null);
|
||||
this.h = null;
|
||||
this.i.setOnClickListener(null);
|
||||
this.i = null;
|
||||
this.j.setOnClickListener(null);
|
||||
this.j = null;
|
||||
this.k.setOnClickListener(null);
|
||||
this.k = null;
|
||||
}
|
||||
}
|
||||
221
sources/com/ubt/jimu/user/view/VerifyCaptchaActivity.java
Normal file
221
sources/com/ubt/jimu/user/view/VerifyCaptchaActivity.java
Normal file
@@ -0,0 +1,221 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import butterknife.ButterKnife;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.entities.ApiStatus;
|
||||
import com.ubt.jimu.base.entities.User;
|
||||
import com.ubt.jimu.base.http.ApiConstants;
|
||||
import com.ubt.jimu.user.contract.VerifyContract$Presenter;
|
||||
import com.ubt.jimu.user.contract.VerifyContract$View;
|
||||
import com.ubt.jimu.user.model.SpUserHolder;
|
||||
import com.ubt.jimu.user.presenter.VerifyPresenter;
|
||||
import com.ubt.jimu.widgets.ClearEditText;
|
||||
import com.ubt.jimu.widgets.NavigationBarView;
|
||||
import com.ubtech.view.widget.UButton;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class VerifyCaptchaActivity extends BaseActivity implements TextWatcher, VerifyContract$View {
|
||||
private String a;
|
||||
private String b;
|
||||
UButton btnVerify;
|
||||
private User c;
|
||||
ClearEditText captchaEditText;
|
||||
TextView countDownTextView;
|
||||
private VerifyContract$Presenter d;
|
||||
private CountDownTimer e;
|
||||
NavigationBarView mNavBarView;
|
||||
|
||||
private void D0() {
|
||||
this.countDownTextView.setClickable(false);
|
||||
this.e = new CountDownTimer(60000L, 1000L) { // from class: com.ubt.jimu.user.view.VerifyCaptchaActivity.2
|
||||
@Override // android.os.CountDownTimer
|
||||
public void onFinish() {
|
||||
VerifyCaptchaActivity.this.countDownTextView.setText(R.string.get_captcha);
|
||||
VerifyCaptchaActivity.this.countDownTextView.setClickable(true);
|
||||
VerifyCaptchaActivity.this.e = null;
|
||||
}
|
||||
|
||||
@Override // android.os.CountDownTimer
|
||||
public void onTick(long j) {
|
||||
VerifyCaptchaActivity.this.countDownTextView.setText((j / 1000) + "s");
|
||||
}
|
||||
};
|
||||
this.e.start();
|
||||
}
|
||||
|
||||
private void E0() {
|
||||
CountDownTimer countDownTimer = this.e;
|
||||
if (countDownTimer == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
countDownTimer.cancel();
|
||||
this.e = null;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void b(Bundle bundle) {
|
||||
if (bundle == null) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
this.a = bundle.getString("account");
|
||||
this.b = bundle.getString("account_type");
|
||||
this.c = (User) bundle.getSerializable("user");
|
||||
User user = this.c;
|
||||
if (user != null) {
|
||||
SpUserHolder.a(user.getUserId(), this.c.getToken());
|
||||
}
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
this.mNavBarView.setListener(new NavigationBarView.OnActionClickListener.Stub() { // from class: com.ubt.jimu.user.view.VerifyCaptchaActivity.1
|
||||
@Override // com.ubt.jimu.widgets.NavigationBarView.OnActionClickListener.Stub
|
||||
public void onLeftClick(View view) {
|
||||
VerifyCaptchaActivity.this.onImgBack(view);
|
||||
}
|
||||
});
|
||||
this.captchaEditText.addTextChangedListener(this);
|
||||
this.d = new VerifyPresenter(this);
|
||||
}
|
||||
|
||||
private void l(int i) {
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("user", this.c);
|
||||
setResult(i, intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override // android.text.TextWatcher
|
||||
public void afterTextChanged(Editable editable) {
|
||||
}
|
||||
|
||||
@Override // android.text.TextWatcher
|
||||
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.VerifyContract$View
|
||||
public void c(Throwable th) {
|
||||
hideLoading();
|
||||
toast(getString(R.string.error_get_captcha));
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.VerifyContract$View
|
||||
public void e(ApiStatus apiStatus) {
|
||||
D0();
|
||||
hideLoading();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.VerifyContract$View
|
||||
public void g(ApiStatus apiStatus) {
|
||||
hideLoading();
|
||||
l(-1);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_verify_catcha);
|
||||
ButterKnife.a(this);
|
||||
initView();
|
||||
a(bundle);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
E0();
|
||||
SpUserHolder.a();
|
||||
}
|
||||
|
||||
protected void onGetCaptcha(View view) {
|
||||
this.d.getCaptcha(this.a, this.b, String.valueOf(5), String.valueOf(0), ApiConstants.APP_ID);
|
||||
showLoading(getString(R.string.have_send_captcha));
|
||||
}
|
||||
|
||||
protected void onImgBack(View view) {
|
||||
l(0);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, androidx.appcompat.app.AppCompatActivity, android.app.Activity, android.view.KeyEvent.Callback
|
||||
public boolean onKeyDown(int i, KeyEvent keyEvent) {
|
||||
if (i != 4) {
|
||||
return super.onKeyDown(i, keyEvent);
|
||||
}
|
||||
l(0);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onSaveInstanceState(Bundle bundle) {
|
||||
super.onSaveInstanceState(bundle);
|
||||
bundle.putString("account", this.a);
|
||||
bundle.putString("account_type", this.b);
|
||||
bundle.putSerializable("user", this.c);
|
||||
}
|
||||
|
||||
@Override // android.text.TextWatcher
|
||||
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
|
||||
String obj = this.captchaEditText.getText().toString();
|
||||
if (TextUtils.isEmpty(obj) || obj.length() < 4) {
|
||||
this.btnVerify.setEnabled(false);
|
||||
} else {
|
||||
this.btnVerify.setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
protected void onVerify(View view) {
|
||||
String obj = this.captchaEditText.getText().toString();
|
||||
if (TextUtils.isEmpty(obj)) {
|
||||
toast(getString(R.string.error_empty_captcha));
|
||||
} else {
|
||||
this.d.a(this.a, obj);
|
||||
showLoading(getString(R.string.waiting));
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
public void relayout() {
|
||||
}
|
||||
|
||||
private void a(Bundle bundle) {
|
||||
if (bundle != null) {
|
||||
b(bundle);
|
||||
return;
|
||||
}
|
||||
Intent intent = getIntent();
|
||||
if (intent == null) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
Bundle bundleExtra = intent.getBundleExtra("extra");
|
||||
if (bundleExtra == null) {
|
||||
finish();
|
||||
} else {
|
||||
b(bundleExtra);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.VerifyContract$View
|
||||
public void b(Throwable th) {
|
||||
hideLoading();
|
||||
toast(getString(R.string.error_captcha));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.ubt.jimu.user.view;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.DebouncingOnClickListener;
|
||||
import butterknife.internal.Utils;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.widgets.ClearEditText;
|
||||
import com.ubt.jimu.widgets.NavigationBarView;
|
||||
import com.ubtech.view.widget.UButton;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class VerifyCaptchaActivity_ViewBinding implements Unbinder {
|
||||
private VerifyCaptchaActivity b;
|
||||
private View c;
|
||||
private View d;
|
||||
|
||||
public VerifyCaptchaActivity_ViewBinding(final VerifyCaptchaActivity verifyCaptchaActivity, View view) {
|
||||
this.b = verifyCaptchaActivity;
|
||||
verifyCaptchaActivity.mNavBarView = (NavigationBarView) Utils.b(view, R.id.nbv_bar, "field 'mNavBarView'", NavigationBarView.class);
|
||||
verifyCaptchaActivity.captchaEditText = (ClearEditText) Utils.b(view, R.id.captchaEditText, "field 'captchaEditText'", ClearEditText.class);
|
||||
View a = Utils.a(view, R.id.countDownTextView, "field 'countDownTextView' and method 'onGetCaptcha'");
|
||||
verifyCaptchaActivity.countDownTextView = (TextView) Utils.a(a, R.id.countDownTextView, "field 'countDownTextView'", TextView.class);
|
||||
this.c = a;
|
||||
a.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.VerifyCaptchaActivity_ViewBinding.1
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
verifyCaptchaActivity.onGetCaptcha(view2);
|
||||
}
|
||||
});
|
||||
View a2 = Utils.a(view, R.id.btnVerify, "field 'btnVerify' and method 'onVerify'");
|
||||
verifyCaptchaActivity.btnVerify = (UButton) Utils.a(a2, R.id.btnVerify, "field 'btnVerify'", UButton.class);
|
||||
this.d = a2;
|
||||
a2.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.VerifyCaptchaActivity_ViewBinding.2
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
verifyCaptchaActivity.onVerify(view2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
VerifyCaptchaActivity verifyCaptchaActivity = this.b;
|
||||
if (verifyCaptchaActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
verifyCaptchaActivity.mNavBarView = null;
|
||||
verifyCaptchaActivity.captchaEditText = null;
|
||||
verifyCaptchaActivity.countDownTextView = null;
|
||||
verifyCaptchaActivity.btnVerify = null;
|
||||
this.c.setOnClickListener(null);
|
||||
this.c = null;
|
||||
this.d.setOnClickListener(null);
|
||||
this.d = null;
|
||||
}
|
||||
}
|
||||
147
sources/com/ubt/jimu/user/view/adapter/CollectionAdapter.java
Normal file
147
sources/com/ubt/jimu/user/view/adapter/CollectionAdapter.java
Normal file
@@ -0,0 +1,147 @@
|
||||
package com.ubt.jimu.user.view.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.RequestBuilder;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.recyclelib.adapter.BaseRecyclerAdapter;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.entities.CollectionEntities;
|
||||
import com.ubt.jimu.base.http.ApiObserver;
|
||||
import com.ubt.jimu.base.http.manager.CommunityManager;
|
||||
import com.ubt.jimu.community.view.PublishDetailActivity;
|
||||
import com.ubt.jimu.user.view.CollectionActivity;
|
||||
import com.ubtech.utils.StringUtils;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class CollectionAdapter extends BaseRecyclerAdapter<CollectionEntities.RecordsBean> {
|
||||
private ImageView a;
|
||||
private ImageView b;
|
||||
private ImageView c;
|
||||
private TextView d;
|
||||
private TextView e;
|
||||
private RelativeLayout f;
|
||||
private TextView g;
|
||||
private ImageView h;
|
||||
private RequestOptions i;
|
||||
private boolean j;
|
||||
StringBuilder k;
|
||||
|
||||
public CollectionAdapter(Context context, List<CollectionEntities.RecordsBean> list) {
|
||||
super(context, list);
|
||||
this.j = false;
|
||||
this.k = new StringBuilder();
|
||||
this.i = RequestOptions.O().b(R.drawable.tab_base_user_default).a(R.drawable.tab_base_user_default);
|
||||
}
|
||||
|
||||
@Override // com.recyclelib.adapter.BaseRecyclerAdapter
|
||||
public int layoutId() {
|
||||
return R.layout.item_collection;
|
||||
}
|
||||
|
||||
public void setEdit(boolean z) {
|
||||
this.j = z;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public /* synthetic */ void a(CollectionEntities.RecordsBean recordsBean, int i, View view) {
|
||||
recordsBean.setSelect(!recordsBean.isSelect());
|
||||
notifyItemChanged(i + 1);
|
||||
((CollectionActivity) this.mContext).E0();
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public void onBindViewHolder(BaseRecyclerAdapter.BaseViewHolder baseViewHolder, final int i) {
|
||||
final CollectionEntities.RecordsBean recordsBean = (CollectionEntities.RecordsBean) this.mList.get(i);
|
||||
this.a = (ImageView) baseViewHolder.getView(R.id.img_play_background);
|
||||
this.b = (ImageView) baseViewHolder.getView(R.id.img_play);
|
||||
this.c = (ImageView) baseViewHolder.getView(R.id.img_header);
|
||||
this.d = (TextView) baseViewHolder.getView(R.id.tv_nickname);
|
||||
this.e = (TextView) baseViewHolder.getView(R.id.tv_hot_desc);
|
||||
this.f = (RelativeLayout) baseViewHolder.getView(R.id.rl_covert);
|
||||
this.g = (TextView) baseViewHolder.getView(R.id.tv_state);
|
||||
this.h = (ImageView) baseViewHolder.getView(R.id.img_collection_select);
|
||||
Glide.e(this.mContext).a(recordsBean.getPostCoverUrl()).a(this.a);
|
||||
if (recordsBean.getUserBaseInfo() != null && recordsBean.getUserBaseInfo().getUserImage() != null) {
|
||||
RequestBuilder<Drawable> a = Glide.e(this.mContext).a(recordsBean.getUserBaseInfo().getUserImage());
|
||||
a.a(this.i);
|
||||
a.a(this.c);
|
||||
}
|
||||
if (recordsBean.getUserBaseInfo() != null && !StringUtils.e(recordsBean.getUserBaseInfo().getNickName())) {
|
||||
this.d.setText(recordsBean.getUserBaseInfo().getNickName());
|
||||
}
|
||||
this.b.setVisibility(8);
|
||||
this.e.setText(recordsBean.getTitle());
|
||||
if (recordsBean.getStatus() == 1) {
|
||||
this.f.setVisibility(8);
|
||||
} else if (recordsBean.getStatus() == 0) {
|
||||
this.f.setVisibility(0);
|
||||
this.g.setText(this.mContext.getString(R.string.pub_is_choice));
|
||||
} else if (recordsBean.getStatus() == 2) {
|
||||
this.f.setVisibility(0);
|
||||
this.g.setText(this.mContext.getString(R.string.pub_no_through));
|
||||
} else {
|
||||
this.f.setVisibility(0);
|
||||
this.g.setText(this.mContext.getString(R.string.pub_is_shield));
|
||||
}
|
||||
if (this.j) {
|
||||
this.h.setVisibility(0);
|
||||
} else {
|
||||
this.h.setVisibility(8);
|
||||
}
|
||||
if (recordsBean.isSelect()) {
|
||||
this.h.setBackgroundResource(R.mipmap.selected_img);
|
||||
} else {
|
||||
this.h.setBackgroundResource(R.mipmap.un_select_img);
|
||||
}
|
||||
this.h.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.adapter.a
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
CollectionAdapter.this.a(recordsBean, i, view);
|
||||
}
|
||||
});
|
||||
baseViewHolder.itemView.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.adapter.b
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
CollectionAdapter.this.a(recordsBean, view);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public /* synthetic */ void a(CollectionEntities.RecordsBean recordsBean, View view) {
|
||||
Context context = this.mContext;
|
||||
if (((CollectionActivity) context).f) {
|
||||
return;
|
||||
}
|
||||
PublishDetailActivity.start(context, recordsBean.getId());
|
||||
}
|
||||
|
||||
public void a() {
|
||||
StringBuilder sb = this.k;
|
||||
sb.delete(0, sb.length());
|
||||
for (int size = this.mList.size() - 1; size >= 0; size--) {
|
||||
if (((CollectionEntities.RecordsBean) this.mList.get(size)).isSelect()) {
|
||||
this.k.append(((CollectionEntities.RecordsBean) this.mList.get(size)).getId());
|
||||
this.k.append(",");
|
||||
}
|
||||
}
|
||||
CommunityManager.create().delCollectionPost(this.k.toString(), new ApiObserver<Boolean>(null) { // from class: com.ubt.jimu.user.view.adapter.CollectionAdapter.1
|
||||
@Override // com.ubt.jimu.base.http.ApiObserver, io.reactivex.Observer
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onNext(Boolean bool) {
|
||||
for (int size2 = ((BaseRecyclerAdapter) CollectionAdapter.this).mList.size() - 1; size2 >= 0; size2--) {
|
||||
if (((CollectionEntities.RecordsBean) ((BaseRecyclerAdapter) CollectionAdapter.this).mList.get(size2)).isSelect()) {
|
||||
((BaseRecyclerAdapter) CollectionAdapter.this).mList.remove(size2);
|
||||
}
|
||||
}
|
||||
CollectionAdapter.this.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
109
sources/com/ubt/jimu/user/view/adapter/CountryCodeAdapter.java
Normal file
109
sources/com/ubt/jimu/user/view/adapter/CountryCodeAdapter.java
Normal file
@@ -0,0 +1,109 @@
|
||||
package com.ubt.jimu.user.view.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.entities.NSLocale;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class CountryCodeAdapter extends RecyclerView.Adapter<CountryCodeViewHolder> {
|
||||
private Context a;
|
||||
private List<NSLocale> b;
|
||||
private Callback c;
|
||||
private String d;
|
||||
|
||||
public interface Callback {
|
||||
void a(String str, String str2);
|
||||
}
|
||||
|
||||
public class CountryCodeViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView codeTextView;
|
||||
TextView countryTextView;
|
||||
View didiverView;
|
||||
|
||||
public CountryCodeViewHolder(CountryCodeAdapter countryCodeAdapter, View view) {
|
||||
super(view);
|
||||
ButterKnife.a(this, view);
|
||||
}
|
||||
}
|
||||
|
||||
public class CountryCodeViewHolder_ViewBinding implements Unbinder {
|
||||
private CountryCodeViewHolder b;
|
||||
|
||||
public CountryCodeViewHolder_ViewBinding(CountryCodeViewHolder countryCodeViewHolder, View view) {
|
||||
this.b = countryCodeViewHolder;
|
||||
countryCodeViewHolder.countryTextView = (TextView) Utils.b(view, R.id.countryTextView, "field 'countryTextView'", TextView.class);
|
||||
countryCodeViewHolder.codeTextView = (TextView) Utils.b(view, R.id.codeTextView, "field 'codeTextView'", TextView.class);
|
||||
countryCodeViewHolder.didiverView = Utils.a(view, R.id.divider, "field 'didiverView'");
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
CountryCodeViewHolder countryCodeViewHolder = this.b;
|
||||
if (countryCodeViewHolder == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
countryCodeViewHolder.countryTextView = null;
|
||||
countryCodeViewHolder.codeTextView = null;
|
||||
countryCodeViewHolder.didiverView = null;
|
||||
}
|
||||
}
|
||||
|
||||
public CountryCodeAdapter(Context context, List<NSLocale> list, String str) {
|
||||
this.a = context;
|
||||
this.b = list;
|
||||
this.d = str;
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public int getItemCount() {
|
||||
return this.b.size();
|
||||
}
|
||||
|
||||
public void a(Callback callback) {
|
||||
this.c = callback;
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public CountryCodeViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
||||
return new CountryCodeViewHolder(this, LayoutInflater.from(this.a).inflate(R.layout.recycler_item_country_code, viewGroup, false));
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onBindViewHolder(CountryCodeViewHolder countryCodeViewHolder, int i) {
|
||||
final NSLocale nSLocale = this.b.get(i);
|
||||
countryCodeViewHolder.countryTextView.setText(nSLocale.getName());
|
||||
countryCodeViewHolder.codeTextView.setText(nSLocale.getDial_code());
|
||||
countryCodeViewHolder.itemView.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.adapter.CountryCodeAdapter.1
|
||||
@Override // android.view.View.OnClickListener
|
||||
public void onClick(View view) {
|
||||
if (CountryCodeAdapter.this.c != null) {
|
||||
CountryCodeAdapter.this.c.a(nSLocale.getDial_code(), nSLocale.getName());
|
||||
}
|
||||
}
|
||||
});
|
||||
if (i >= getItemCount() - 1) {
|
||||
countryCodeViewHolder.didiverView.setVisibility(8);
|
||||
} else {
|
||||
countryCodeViewHolder.didiverView.setVisibility(0);
|
||||
}
|
||||
if (!TextUtils.isEmpty(this.d) && this.d.equals(nSLocale.getDial_code())) {
|
||||
countryCodeViewHolder.countryTextView.setTextColor(this.a.getResources().getColor(R.color.theme_txt_light));
|
||||
countryCodeViewHolder.codeTextView.setTextColor(this.a.getResources().getColor(R.color.theme_txt_light));
|
||||
} else {
|
||||
countryCodeViewHolder.countryTextView.setTextColor(this.a.getResources().getColor(R.color.theme_txt));
|
||||
countryCodeViewHolder.codeTextView.setTextColor(this.a.getResources().getColor(R.color.theme_txt));
|
||||
}
|
||||
}
|
||||
}
|
||||
130
sources/com/ubt/jimu/user/view/adapter/FansAdapter.java
Normal file
130
sources/com/ubt/jimu/user/view/adapter/FansAdapter.java
Normal file
@@ -0,0 +1,130 @@
|
||||
package com.ubt.jimu.user.view.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.RequestBuilder;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.cache.Cache;
|
||||
import com.ubt.jimu.base.entities.Fans;
|
||||
import com.ubtech.utils.DensityUtils;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class FansAdapter extends RecyclerView.Adapter<FansViewHolder> {
|
||||
private final int a;
|
||||
private Context b;
|
||||
private List<Fans> c;
|
||||
private Callback d;
|
||||
private long e = Cache.getInstance().getLoginUserIntId();
|
||||
|
||||
public interface Callback {
|
||||
void a(int i);
|
||||
|
||||
void a(Fans fans, int i);
|
||||
}
|
||||
|
||||
class FansViewHolder extends RecyclerView.ViewHolder {
|
||||
ImageView actionImageView;
|
||||
TextView levelTextView;
|
||||
TextView nameTextView;
|
||||
TextView titleKeyTextView;
|
||||
ImageView userImageView;
|
||||
|
||||
public FansViewHolder(FansAdapter fansAdapter, View view) {
|
||||
super(view);
|
||||
ButterKnife.a(this, view);
|
||||
}
|
||||
}
|
||||
|
||||
public class FansViewHolder_ViewBinding implements Unbinder {
|
||||
private FansViewHolder b;
|
||||
|
||||
public FansViewHolder_ViewBinding(FansViewHolder fansViewHolder, View view) {
|
||||
this.b = fansViewHolder;
|
||||
fansViewHolder.titleKeyTextView = (TextView) Utils.b(view, R.id.titleKeyTextView, "field 'titleKeyTextView'", TextView.class);
|
||||
fansViewHolder.levelTextView = (TextView) Utils.b(view, R.id.levelTextView, "field 'levelTextView'", TextView.class);
|
||||
fansViewHolder.nameTextView = (TextView) Utils.b(view, R.id.nameTextView, "field 'nameTextView'", TextView.class);
|
||||
fansViewHolder.actionImageView = (ImageView) Utils.b(view, R.id.actionImageView, "field 'actionImageView'", ImageView.class);
|
||||
fansViewHolder.userImageView = (ImageView) Utils.b(view, R.id.userImageView, "field 'userImageView'", ImageView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
FansViewHolder fansViewHolder = this.b;
|
||||
if (fansViewHolder == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
fansViewHolder.titleKeyTextView = null;
|
||||
fansViewHolder.levelTextView = null;
|
||||
fansViewHolder.nameTextView = null;
|
||||
fansViewHolder.actionImageView = null;
|
||||
fansViewHolder.userImageView = null;
|
||||
}
|
||||
}
|
||||
|
||||
public FansAdapter(Context context, List<Fans> list) {
|
||||
this.b = context;
|
||||
this.c = list;
|
||||
this.a = (int) DensityUtils.a(context, 50);
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public int getItemCount() {
|
||||
return this.c.size();
|
||||
}
|
||||
|
||||
public void a(Callback callback) {
|
||||
this.d = callback;
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public FansViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
||||
return new FansViewHolder(this, LayoutInflater.from(this.b).inflate(R.layout.recycler_item_fans, viewGroup, false));
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onBindViewHolder(FansViewHolder fansViewHolder, final int i) {
|
||||
final Fans fans = this.c.get(i);
|
||||
fansViewHolder.nameTextView.setText(fans.getNickName());
|
||||
fansViewHolder.levelTextView.setText(String.format(this.b.getString(R.string.search_item_user_desc), Integer.valueOf(fans.getLevel())));
|
||||
boolean z = fans.getIsSubscribed() == 1;
|
||||
fansViewHolder.actionImageView.setVisibility(this.e == fans.getUserId() ? 8 : 0);
|
||||
fansViewHolder.actionImageView.setImageResource(z ? R.mipmap.ic_interest : R.mipmap.ic_have_not_interest);
|
||||
fansViewHolder.titleKeyTextView.setText(TextUtils.isEmpty(fans.getTitle()) ? "" : fans.getTitle());
|
||||
fansViewHolder.userImageView.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.adapter.FansAdapter.1
|
||||
@Override // android.view.View.OnClickListener
|
||||
public void onClick(View view) {
|
||||
if (FansAdapter.this.d != null) {
|
||||
FansAdapter.this.d.a(i);
|
||||
}
|
||||
}
|
||||
});
|
||||
fansViewHolder.actionImageView.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.adapter.FansAdapter.2
|
||||
@Override // android.view.View.OnClickListener
|
||||
public void onClick(View view) {
|
||||
if (FansAdapter.this.d != null) {
|
||||
FansAdapter.this.d.a(fans, i);
|
||||
}
|
||||
}
|
||||
});
|
||||
RequestBuilder<Drawable> a = Glide.e(this.b).a(fans.getUserImage());
|
||||
RequestOptions b = RequestOptions.O().h().a(R.drawable.community_img_official).b(R.drawable.community_img_official);
|
||||
int i2 = this.a;
|
||||
a.a(b.a(i2, i2));
|
||||
a.a(fansViewHolder.userImageView);
|
||||
}
|
||||
}
|
||||
132
sources/com/ubt/jimu/user/view/adapter/InterestAdapter.java
Normal file
132
sources/com/ubt/jimu/user/view/adapter/InterestAdapter.java
Normal file
@@ -0,0 +1,132 @@
|
||||
package com.ubt.jimu.user.view.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.RequestBuilder;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.cache.Cache;
|
||||
import com.ubt.jimu.base.entities.Interest;
|
||||
import com.ubtech.utils.DensityUtils;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class InterestAdapter extends RecyclerView.Adapter<InterestViewHolder> {
|
||||
private Context a;
|
||||
private List<Interest> b;
|
||||
private int c;
|
||||
public Callback d;
|
||||
private long e = Cache.getInstance().getLoginUserIntId();
|
||||
|
||||
public interface Callback {
|
||||
void a(int i);
|
||||
|
||||
void b(int i);
|
||||
}
|
||||
|
||||
class InterestViewHolder extends RecyclerView.ViewHolder {
|
||||
ImageView actionImageView;
|
||||
TextView levelTextView;
|
||||
TextView nameTextView;
|
||||
TextView titleKeyTextView;
|
||||
ImageView userImageView;
|
||||
|
||||
public InterestViewHolder(InterestAdapter interestAdapter, View view) {
|
||||
super(view);
|
||||
ButterKnife.a(this, view);
|
||||
}
|
||||
}
|
||||
|
||||
public class InterestViewHolder_ViewBinding implements Unbinder {
|
||||
private InterestViewHolder b;
|
||||
|
||||
public InterestViewHolder_ViewBinding(InterestViewHolder interestViewHolder, View view) {
|
||||
this.b = interestViewHolder;
|
||||
interestViewHolder.nameTextView = (TextView) Utils.b(view, R.id.nameTextView, "field 'nameTextView'", TextView.class);
|
||||
interestViewHolder.userImageView = (ImageView) Utils.b(view, R.id.userImageView, "field 'userImageView'", ImageView.class);
|
||||
interestViewHolder.actionImageView = (ImageView) Utils.b(view, R.id.actionImageView, "field 'actionImageView'", ImageView.class);
|
||||
interestViewHolder.levelTextView = (TextView) Utils.b(view, R.id.levelTextView, "field 'levelTextView'", TextView.class);
|
||||
interestViewHolder.titleKeyTextView = (TextView) Utils.b(view, R.id.titleKeyTextView, "field 'titleKeyTextView'", TextView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
InterestViewHolder interestViewHolder = this.b;
|
||||
if (interestViewHolder == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
interestViewHolder.nameTextView = null;
|
||||
interestViewHolder.userImageView = null;
|
||||
interestViewHolder.actionImageView = null;
|
||||
interestViewHolder.levelTextView = null;
|
||||
interestViewHolder.titleKeyTextView = null;
|
||||
}
|
||||
}
|
||||
|
||||
public InterestAdapter(Context context, List<Interest> list) {
|
||||
this.a = context;
|
||||
this.b = list;
|
||||
this.c = (int) DensityUtils.a(context, 50);
|
||||
}
|
||||
|
||||
public void a(Callback callback) {
|
||||
this.d = callback;
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public int getItemCount() {
|
||||
return this.b.size();
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onBindViewHolder(InterestViewHolder interestViewHolder, final int i) {
|
||||
Interest interest = this.b.get(i);
|
||||
interestViewHolder.nameTextView.setText(interest.getNickName());
|
||||
interestViewHolder.levelTextView.setText(String.format(this.a.getString(R.string.search_item_user_desc), Integer.valueOf(interest.getLevel())));
|
||||
boolean z = interest.getIsSubscribed() == 1;
|
||||
interestViewHolder.actionImageView.setVisibility(this.e == ((long) interest.getUserId()) ? 8 : 0);
|
||||
interestViewHolder.actionImageView.setImageResource(z ? R.mipmap.ic_interest : R.mipmap.ic_have_not_interest);
|
||||
interestViewHolder.actionImageView.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.adapter.InterestAdapter.1
|
||||
@Override // android.view.View.OnClickListener
|
||||
public void onClick(View view) {
|
||||
Callback callback = InterestAdapter.this.d;
|
||||
if (callback != null) {
|
||||
callback.b(i);
|
||||
}
|
||||
}
|
||||
});
|
||||
interestViewHolder.titleKeyTextView.setText(TextUtils.isEmpty(interest.getTitle()) ? "" : interest.getTitle());
|
||||
interestViewHolder.userImageView.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.adapter.InterestAdapter.2
|
||||
@Override // android.view.View.OnClickListener
|
||||
public void onClick(View view) {
|
||||
Callback callback = InterestAdapter.this.d;
|
||||
if (callback != null) {
|
||||
callback.a(i);
|
||||
}
|
||||
}
|
||||
});
|
||||
RequestBuilder<Drawable> a = Glide.e(this.a).a(interest.getUserImage());
|
||||
RequestOptions b = RequestOptions.O().h().a(R.drawable.community_img_official).b(R.drawable.community_img_official);
|
||||
int i2 = this.c;
|
||||
a.a(b.a(i2, i2));
|
||||
a.a(interestViewHolder.userImageView);
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public InterestViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
||||
return new InterestViewHolder(this, LayoutInflater.from(this.a).inflate(R.layout.recycler_item_interest, viewGroup, false));
|
||||
}
|
||||
}
|
||||
49
sources/com/ubt/jimu/user/view/adapter/PostAdapter.java
Normal file
49
sources/com/ubt/jimu/user/view/adapter/PostAdapter.java
Normal file
@@ -0,0 +1,49 @@
|
||||
package com.ubt.jimu.user.view.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.ButterKnife;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.entities.ArticleBean;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class PostAdapter extends RecyclerView.Adapter<PostViewHolder> {
|
||||
private List<ArticleBean.Article> a;
|
||||
private LayoutInflater b;
|
||||
|
||||
public class PostViewHolder extends RecyclerView.ViewHolder {
|
||||
public PostViewHolder(PostAdapter postAdapter, View view) {
|
||||
super(view);
|
||||
ButterKnife.a(this, view);
|
||||
}
|
||||
}
|
||||
|
||||
public PostAdapter(Context context, List<ArticleBean.Article> list) {
|
||||
this.a = list;
|
||||
this.b = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onBindViewHolder(PostViewHolder postViewHolder, int i) {
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public int getItemCount() {
|
||||
return this.a.size();
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public int getItemViewType(int i) {
|
||||
return super.getItemViewType(i);
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public PostViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
||||
return new PostViewHolder(this, this.b.inflate(R.layout.recycler_item_post_checked, viewGroup, false));
|
||||
}
|
||||
}
|
||||
326
sources/com/ubt/jimu/user/view/adapter/PostAndDiyAdapter.java
Normal file
326
sources/com/ubt/jimu/user/view/adapter/PostAndDiyAdapter.java
Normal file
@@ -0,0 +1,326 @@
|
||||
package com.ubt.jimu.user.view.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.DebouncingOnClickListener;
|
||||
import butterknife.internal.Utils;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.RequestBuilder;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.ubt.jimu.JimuApplication;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.diy.DiyRobotFile;
|
||||
import com.ubt.jimu.user.view.UserCenterActivity;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class PostAndDiyAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
List<UserCenterActivity.ViewHolderItem> a;
|
||||
LayoutInflater b;
|
||||
private Context c;
|
||||
private RequestOptions d;
|
||||
private IPostOrDiyListener e;
|
||||
private LinearLayout.LayoutParams f;
|
||||
private boolean g;
|
||||
|
||||
public abstract class BaseViewHolder extends RecyclerView.ViewHolder {
|
||||
public BaseViewHolder(PostAndDiyAdapter postAndDiyAdapter, View view) {
|
||||
super(view);
|
||||
}
|
||||
|
||||
public abstract void a(UserCenterActivity.ViewHolderItem viewHolderItem);
|
||||
}
|
||||
|
||||
public interface IPostOrDiyListener {
|
||||
void a(UserCenterActivity.ViewHolderItem viewHolderItem);
|
||||
|
||||
void b(UserCenterActivity.ViewHolderItem viewHolderItem);
|
||||
|
||||
void onNewDiy(View view);
|
||||
|
||||
void onNewPost(View view);
|
||||
}
|
||||
|
||||
public class NewDiyViewHolder extends BaseViewHolder {
|
||||
TextView qTextView;
|
||||
|
||||
public NewDiyViewHolder(View view) {
|
||||
super(PostAndDiyAdapter.this, view);
|
||||
ButterKnife.a(this, view);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.view.adapter.PostAndDiyAdapter.BaseViewHolder
|
||||
public void a(UserCenterActivity.ViewHolderItem viewHolderItem) {
|
||||
if (viewHolderItem.f) {
|
||||
this.qTextView.setText(R.string.search_no_content);
|
||||
} else {
|
||||
this.qTextView.setText(R.string.please_wait);
|
||||
}
|
||||
}
|
||||
|
||||
public void onNewDiy(View view) {
|
||||
if (PostAndDiyAdapter.this.e != null) {
|
||||
PostAndDiyAdapter.this.e.onNewDiy(view);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class NewDiyViewHolder_ViewBinding implements Unbinder {
|
||||
private NewDiyViewHolder b;
|
||||
private View c;
|
||||
|
||||
public NewDiyViewHolder_ViewBinding(final NewDiyViewHolder newDiyViewHolder, View view) {
|
||||
this.b = newDiyViewHolder;
|
||||
View a = Utils.a(view, R.id.tvCreate, "field 'qTextView' and method 'onNewDiy'");
|
||||
newDiyViewHolder.qTextView = (TextView) Utils.a(a, R.id.tvCreate, "field 'qTextView'", TextView.class);
|
||||
this.c = a;
|
||||
a.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.adapter.PostAndDiyAdapter.NewDiyViewHolder_ViewBinding.1
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
newDiyViewHolder.onNewDiy(view2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
NewDiyViewHolder newDiyViewHolder = this.b;
|
||||
if (newDiyViewHolder == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
newDiyViewHolder.qTextView = null;
|
||||
this.c.setOnClickListener(null);
|
||||
this.c = null;
|
||||
}
|
||||
}
|
||||
|
||||
public class PostOrDiyViewHolder extends BaseViewHolder {
|
||||
UserCenterActivity.ViewHolderItem a;
|
||||
ImageView imgLogo;
|
||||
|
||||
public PostOrDiyViewHolder(View view) {
|
||||
super(PostAndDiyAdapter.this, view);
|
||||
ButterKnife.a(this, view);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.view.adapter.PostAndDiyAdapter.BaseViewHolder
|
||||
public void a(UserCenterActivity.ViewHolderItem viewHolderItem) {
|
||||
this.a = viewHolderItem;
|
||||
if (!PostAndDiyAdapter.this.g) {
|
||||
this.imgLogo.setLayoutParams(PostAndDiyAdapter.this.f);
|
||||
}
|
||||
RequestBuilder<Drawable> a = Glide.e(PostAndDiyAdapter.this.c).a(viewHolderItem.c);
|
||||
a.a(PostAndDiyAdapter.this.d);
|
||||
a.a(this.imgLogo);
|
||||
}
|
||||
|
||||
public void onNewDiy(View view) {
|
||||
if (PostAndDiyAdapter.this.e != null) {
|
||||
if (261 == this.a.a) {
|
||||
PostAndDiyAdapter.this.e.a(this.a);
|
||||
} else {
|
||||
PostAndDiyAdapter.this.e.b(this.a);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class PostOrDiyViewHolder_ViewBinding implements Unbinder {
|
||||
private PostOrDiyViewHolder b;
|
||||
private View c;
|
||||
|
||||
public PostOrDiyViewHolder_ViewBinding(final PostOrDiyViewHolder postOrDiyViewHolder, View view) {
|
||||
this.b = postOrDiyViewHolder;
|
||||
View a = Utils.a(view, R.id.imgLogo, "field 'imgLogo' and method 'onNewDiy'");
|
||||
postOrDiyViewHolder.imgLogo = (ImageView) Utils.a(a, R.id.imgLogo, "field 'imgLogo'", ImageView.class);
|
||||
this.c = a;
|
||||
a.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.adapter.PostAndDiyAdapter.PostOrDiyViewHolder_ViewBinding.1
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
postOrDiyViewHolder.onNewDiy(view2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
PostOrDiyViewHolder postOrDiyViewHolder = this.b;
|
||||
if (postOrDiyViewHolder == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
postOrDiyViewHolder.imgLogo = null;
|
||||
this.c.setOnClickListener(null);
|
||||
this.c = null;
|
||||
}
|
||||
}
|
||||
|
||||
public class PublishViewHolder extends BaseViewHolder {
|
||||
TextView actionTextView;
|
||||
TextView contentTextView;
|
||||
CardView postActionParent;
|
||||
|
||||
public PublishViewHolder(View view) {
|
||||
super(PostAndDiyAdapter.this, view);
|
||||
ButterKnife.a(this, view);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.view.adapter.PostAndDiyAdapter.BaseViewHolder
|
||||
public void a(UserCenterActivity.ViewHolderItem viewHolderItem) {
|
||||
if (viewHolderItem.e) {
|
||||
this.postActionParent.setVisibility(0);
|
||||
} else {
|
||||
this.postActionParent.setVisibility(8);
|
||||
}
|
||||
}
|
||||
|
||||
public void onPost(View view) {
|
||||
if (PostAndDiyAdapter.this.e != null) {
|
||||
PostAndDiyAdapter.this.e.onNewPost(view);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class PublishViewHolder_ViewBinding implements Unbinder {
|
||||
private PublishViewHolder b;
|
||||
private View c;
|
||||
|
||||
public PublishViewHolder_ViewBinding(final PublishViewHolder publishViewHolder, View view) {
|
||||
this.b = publishViewHolder;
|
||||
publishViewHolder.contentTextView = (TextView) Utils.b(view, R.id.contentTextView, "field 'contentTextView'", TextView.class);
|
||||
View a = Utils.a(view, R.id.postActionParent, "field 'postActionParent' and method 'onPost'");
|
||||
publishViewHolder.postActionParent = (CardView) Utils.a(a, R.id.postActionParent, "field 'postActionParent'", CardView.class);
|
||||
this.c = a;
|
||||
a.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.adapter.PostAndDiyAdapter.PublishViewHolder_ViewBinding.1
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
publishViewHolder.onPost(view2);
|
||||
}
|
||||
});
|
||||
publishViewHolder.actionTextView = (TextView) Utils.b(view, R.id.actionTextView, "field 'actionTextView'", TextView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
PublishViewHolder publishViewHolder = this.b;
|
||||
if (publishViewHolder == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
publishViewHolder.contentTextView = null;
|
||||
publishViewHolder.postActionParent = null;
|
||||
publishViewHolder.actionTextView = null;
|
||||
this.c.setOnClickListener(null);
|
||||
this.c = null;
|
||||
}
|
||||
}
|
||||
|
||||
public class TitleViewHolder extends BaseViewHolder {
|
||||
View dividerLine;
|
||||
TextView tvTitle;
|
||||
View viewMarginTop;
|
||||
|
||||
public TitleViewHolder(PostAndDiyAdapter postAndDiyAdapter, View view) {
|
||||
super(postAndDiyAdapter, view);
|
||||
ButterKnife.a(this, view);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.view.adapter.PostAndDiyAdapter.BaseViewHolder
|
||||
public void a(UserCenterActivity.ViewHolderItem viewHolderItem) {
|
||||
this.tvTitle.setText(viewHolderItem.b);
|
||||
if (viewHolderItem.d) {
|
||||
this.dividerLine.setVisibility(0);
|
||||
this.viewMarginTop.setVisibility(8);
|
||||
} else {
|
||||
this.dividerLine.setVisibility(8);
|
||||
this.viewMarginTop.setVisibility(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class TitleViewHolder_ViewBinding implements Unbinder {
|
||||
private TitleViewHolder b;
|
||||
|
||||
public TitleViewHolder_ViewBinding(TitleViewHolder titleViewHolder, View view) {
|
||||
this.b = titleViewHolder;
|
||||
titleViewHolder.viewMarginTop = Utils.a(view, R.id.viewMarginTop, "field 'viewMarginTop'");
|
||||
titleViewHolder.dividerLine = Utils.a(view, R.id.dividerLine, "field 'dividerLine'");
|
||||
titleViewHolder.tvTitle = (TextView) Utils.b(view, R.id.tvTitle, "field 'tvTitle'", TextView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
TitleViewHolder titleViewHolder = this.b;
|
||||
if (titleViewHolder == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
titleViewHolder.viewMarginTop = null;
|
||||
titleViewHolder.dividerLine = null;
|
||||
titleViewHolder.tvTitle = null;
|
||||
}
|
||||
}
|
||||
|
||||
public PostAndDiyAdapter(Context context, List<UserCenterActivity.ViewHolderItem> list, IPostOrDiyListener iPostOrDiyListener) {
|
||||
this.a = list;
|
||||
this.b = LayoutInflater.from(context);
|
||||
this.c = context;
|
||||
this.e = iPostOrDiyListener;
|
||||
int dimensionPixelOffset = context.getResources().getDimensionPixelOffset(R.dimen.user_center_post_and_diy_item_ui_width);
|
||||
int dimensionPixelOffset2 = context.getResources().getDimensionPixelOffset(R.dimen.user_center_post_and_diy_item_ui_height);
|
||||
this.d = RequestOptions.N().a(dimensionPixelOffset, dimensionPixelOffset2).b(R.drawable.ic_placeholder).a(R.drawable.ic_placeholder);
|
||||
this.f = new LinearLayout.LayoutParams(-1, dimensionPixelOffset2);
|
||||
this.g = JimuApplication.l().i();
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public int getItemCount() {
|
||||
return this.a.size();
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public int getItemViewType(int i) {
|
||||
UserCenterActivity.ViewHolderItem viewHolderItem = this.a.get(i);
|
||||
return viewHolderItem == null ? DiyRobotFile.TYPE_MODEL : viewHolderItem.a;
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int i) {
|
||||
if (viewHolder instanceof BaseViewHolder) {
|
||||
((BaseViewHolder) viewHolder).a(this.a.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
||||
PostOrDiyViewHolder postOrDiyViewHolder;
|
||||
switch (i) {
|
||||
case DiyRobotFile.TYPE_MODEL /* 257 */:
|
||||
return new TitleViewHolder(this, this.b.inflate(R.layout.recycler_item_user_center_title, (ViewGroup) null));
|
||||
case DiyRobotFile.TYPE_SERVO /* 258 */:
|
||||
return new PublishViewHolder(this.b.inflate(R.layout.recycler_item_user_center_publish, (ViewGroup) null));
|
||||
case DiyRobotFile.TYPE_LOGO /* 259 */:
|
||||
postOrDiyViewHolder = new PostOrDiyViewHolder(this.b.inflate(R.layout.recycler_item_user_center_post_or_diy, (ViewGroup) null));
|
||||
break;
|
||||
case 260:
|
||||
return new NewDiyViewHolder(this.b.inflate(R.layout.recycler_item_user_center_create, (ViewGroup) null));
|
||||
case 261:
|
||||
postOrDiyViewHolder = new PostOrDiyViewHolder(this.b.inflate(R.layout.recycler_item_user_center_post_or_diy, (ViewGroup) null));
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
return postOrDiyViewHolder;
|
||||
}
|
||||
}
|
||||
137
sources/com/ubt/jimu/user/view/adapter/PraiseAdapter.java
Normal file
137
sources/com/ubt/jimu/user/view/adapter/PraiseAdapter.java
Normal file
@@ -0,0 +1,137 @@
|
||||
package com.ubt.jimu.user.view.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.RequestBuilder;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.entities.PraiseBean;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class PraiseAdapter extends RecyclerView.Adapter<PraiseViewHolder> {
|
||||
private Context a;
|
||||
private List<PraiseBean.Praise> b;
|
||||
private boolean c;
|
||||
private Callback d;
|
||||
|
||||
public interface Callback {
|
||||
void a(int i);
|
||||
|
||||
void b(int i);
|
||||
}
|
||||
|
||||
public class PraiseViewHolder extends RecyclerView.ViewHolder {
|
||||
ImageView coverImageView;
|
||||
ImageView iv_praise;
|
||||
TextView levelTextView;
|
||||
TextView nameTextView;
|
||||
ImageView playImageView;
|
||||
TextView titleKeyTextView;
|
||||
TextView titleTextView;
|
||||
ImageView typeImageView;
|
||||
|
||||
public PraiseViewHolder(PraiseAdapter praiseAdapter, View view) {
|
||||
super(view);
|
||||
ButterKnife.a(this, view);
|
||||
}
|
||||
}
|
||||
|
||||
public class PraiseViewHolder_ViewBinding implements Unbinder {
|
||||
private PraiseViewHolder b;
|
||||
|
||||
public PraiseViewHolder_ViewBinding(PraiseViewHolder praiseViewHolder, View view) {
|
||||
this.b = praiseViewHolder;
|
||||
praiseViewHolder.coverImageView = (ImageView) Utils.b(view, R.id.coverImageView, "field 'coverImageView'", ImageView.class);
|
||||
praiseViewHolder.typeImageView = (ImageView) Utils.b(view, R.id.typeImageView, "field 'typeImageView'", ImageView.class);
|
||||
praiseViewHolder.playImageView = (ImageView) Utils.b(view, R.id.playImageView, "field 'playImageView'", ImageView.class);
|
||||
praiseViewHolder.iv_praise = (ImageView) Utils.b(view, R.id.iv_praise, "field 'iv_praise'", ImageView.class);
|
||||
praiseViewHolder.titleTextView = (TextView) Utils.b(view, R.id.titleTextView, "field 'titleTextView'", TextView.class);
|
||||
praiseViewHolder.nameTextView = (TextView) Utils.b(view, R.id.nameTextView, "field 'nameTextView'", TextView.class);
|
||||
praiseViewHolder.levelTextView = (TextView) Utils.b(view, R.id.levelTextView, "field 'levelTextView'", TextView.class);
|
||||
praiseViewHolder.titleKeyTextView = (TextView) Utils.b(view, R.id.titleKeyTextView, "field 'titleKeyTextView'", TextView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
PraiseViewHolder praiseViewHolder = this.b;
|
||||
if (praiseViewHolder == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
praiseViewHolder.coverImageView = null;
|
||||
praiseViewHolder.typeImageView = null;
|
||||
praiseViewHolder.playImageView = null;
|
||||
praiseViewHolder.iv_praise = null;
|
||||
praiseViewHolder.titleTextView = null;
|
||||
praiseViewHolder.nameTextView = null;
|
||||
praiseViewHolder.levelTextView = null;
|
||||
praiseViewHolder.titleKeyTextView = null;
|
||||
}
|
||||
}
|
||||
|
||||
public PraiseAdapter(Context context, boolean z, List<PraiseBean.Praise> list) {
|
||||
this.a = context;
|
||||
this.b = list;
|
||||
this.c = z;
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public int getItemCount() {
|
||||
return this.b.size();
|
||||
}
|
||||
|
||||
public void a(Callback callback) {
|
||||
this.d = callback;
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public PraiseViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
||||
return new PraiseViewHolder(this, LayoutInflater.from(this.a).inflate(R.layout.recycler_item_praise, viewGroup, false));
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onBindViewHolder(PraiseViewHolder praiseViewHolder, final int i) {
|
||||
PraiseBean.Praise praise = this.b.get(i);
|
||||
praiseViewHolder.titleTextView.setText(praise.getTitle());
|
||||
TextView textView = praiseViewHolder.nameTextView;
|
||||
String string = this.a.getString(R.string.author_name);
|
||||
Object[] objArr = new Object[1];
|
||||
objArr[0] = TextUtils.isEmpty(praise.getNickName()) ? "" : praise.getNickName();
|
||||
textView.setText(String.format(string, objArr));
|
||||
RequestBuilder<Drawable> a = Glide.e(this.a).a(praise.getPostCoverUrl());
|
||||
a.a(new RequestOptions().b(R.drawable.community_img));
|
||||
a.a(praiseViewHolder.coverImageView);
|
||||
praiseViewHolder.iv_praise.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.adapter.PraiseAdapter.1
|
||||
@Override // android.view.View.OnClickListener
|
||||
public void onClick(View view) {
|
||||
if (PraiseAdapter.this.d != null) {
|
||||
PraiseAdapter.this.d.a(i);
|
||||
}
|
||||
}
|
||||
});
|
||||
praiseViewHolder.levelTextView.setText(String.format(this.a.getString(R.string.search_item_user_desc), Integer.valueOf(praise.getLevel())));
|
||||
praiseViewHolder.iv_praise.setVisibility(this.c ? 0 : 8);
|
||||
praiseViewHolder.titleKeyTextView.setText(praise.getUserTitle());
|
||||
praiseViewHolder.itemView.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.adapter.PraiseAdapter.2
|
||||
@Override // android.view.View.OnClickListener
|
||||
public void onClick(View view) {
|
||||
if (PraiseAdapter.this.d != null) {
|
||||
PraiseAdapter.this.d.b(i);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
118
sources/com/ubt/jimu/user/view/adapter/QuestionAdapter.java
Normal file
118
sources/com/ubt/jimu/user/view/adapter/QuestionAdapter.java
Normal file
@@ -0,0 +1,118 @@
|
||||
package com.ubt.jimu.user.view.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.daimajia.swipe.SwipeLayout;
|
||||
import com.daimajia.swipe.adapters.RecyclerSwipeAdapter;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.entities.QuestionBean;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class QuestionAdapter extends RecyclerSwipeAdapter<QuestionViewHolder> {
|
||||
private Context b;
|
||||
private List<QuestionBean.Question> c;
|
||||
private Callback d;
|
||||
|
||||
public interface Callback {
|
||||
void a(int i);
|
||||
}
|
||||
|
||||
class QuestionViewHolder extends RecyclerView.ViewHolder {
|
||||
LinearLayout actionLayout;
|
||||
ImageView deleteImageView;
|
||||
TextView scoreTextView;
|
||||
TextView statusTextView;
|
||||
SwipeLayout swipeLayout;
|
||||
TextView titleTextView;
|
||||
|
||||
public QuestionViewHolder(QuestionAdapter questionAdapter, View view) {
|
||||
super(view);
|
||||
ButterKnife.a(this, view);
|
||||
}
|
||||
}
|
||||
|
||||
public class QuestionViewHolder_ViewBinding implements Unbinder {
|
||||
private QuestionViewHolder b;
|
||||
|
||||
public QuestionViewHolder_ViewBinding(QuestionViewHolder questionViewHolder, View view) {
|
||||
this.b = questionViewHolder;
|
||||
questionViewHolder.titleTextView = (TextView) Utils.b(view, R.id.titleTextView, "field 'titleTextView'", TextView.class);
|
||||
questionViewHolder.actionLayout = (LinearLayout) Utils.b(view, R.id.actionLayout, "field 'actionLayout'", LinearLayout.class);
|
||||
questionViewHolder.statusTextView = (TextView) Utils.b(view, R.id.statusTextView, "field 'statusTextView'", TextView.class);
|
||||
questionViewHolder.scoreTextView = (TextView) Utils.b(view, R.id.scoreTextView, "field 'scoreTextView'", TextView.class);
|
||||
questionViewHolder.deleteImageView = (ImageView) Utils.b(view, R.id.deleteImageView, "field 'deleteImageView'", ImageView.class);
|
||||
questionViewHolder.swipeLayout = (SwipeLayout) Utils.b(view, R.id.swipeLayout, "field 'swipeLayout'", SwipeLayout.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
QuestionViewHolder questionViewHolder = this.b;
|
||||
if (questionViewHolder == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
questionViewHolder.titleTextView = null;
|
||||
questionViewHolder.actionLayout = null;
|
||||
questionViewHolder.statusTextView = null;
|
||||
questionViewHolder.scoreTextView = null;
|
||||
questionViewHolder.deleteImageView = null;
|
||||
questionViewHolder.swipeLayout = null;
|
||||
}
|
||||
}
|
||||
|
||||
public QuestionAdapter(Context context, List<QuestionBean.Question> list) {
|
||||
this.b = context;
|
||||
this.c = list;
|
||||
}
|
||||
|
||||
@Override // com.daimajia.swipe.interfaces.SwipeAdapterInterface
|
||||
public int a(int i) {
|
||||
return R.id.swipeLayout;
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public int getItemCount() {
|
||||
return this.c.size();
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onBindViewHolder(QuestionViewHolder questionViewHolder, final int i) {
|
||||
QuestionBean.Question question = this.c.get(i);
|
||||
questionViewHolder.titleTextView.setText(question.getTitle());
|
||||
questionViewHolder.scoreTextView.setText(String.valueOf(question.getScore()));
|
||||
questionViewHolder.statusTextView.setText((TextUtils.isEmpty((String) question.getIs_accepted()) ? 0 : Integer.parseInt((String) question.getIs_accepted())) == 1 ? this.b.getString(R.string.search_item_ask_use) : this.b.getString(R.string.search_item_no_use));
|
||||
questionViewHolder.deleteImageView.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.adapter.QuestionAdapter.1
|
||||
@Override // android.view.View.OnClickListener
|
||||
public void onClick(View view) {
|
||||
if (QuestionAdapter.this.d != null) {
|
||||
QuestionAdapter.this.d.a(i);
|
||||
}
|
||||
}
|
||||
});
|
||||
final SwipeLayout swipeLayout = questionViewHolder.swipeLayout;
|
||||
questionViewHolder.actionLayout.setOnClickListener(new View.OnClickListener(this) { // from class: com.ubt.jimu.user.view.adapter.QuestionAdapter.2
|
||||
@Override // android.view.View.OnClickListener
|
||||
public void onClick(View view) {
|
||||
swipeLayout.i();
|
||||
}
|
||||
});
|
||||
this.a.a(questionViewHolder.itemView, i);
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public QuestionViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
||||
return new QuestionViewHolder(this, LayoutInflater.from(this.b).inflate(R.layout.recycler_item_question, viewGroup, false));
|
||||
}
|
||||
}
|
||||
141
sources/com/ubt/jimu/user/view/adapter/RankAdapter.java
Normal file
141
sources/com/ubt/jimu/user/view/adapter/RankAdapter.java
Normal file
@@ -0,0 +1,141 @@
|
||||
package com.ubt.jimu.user.view.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.RequestBuilder;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.cache.Cache;
|
||||
import com.ubt.jimu.base.entities.Rank;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class RankAdapter extends RecyclerView.Adapter<RankViewHolder> {
|
||||
private Context a;
|
||||
private List<Rank> b;
|
||||
private Callback c;
|
||||
private long d = Cache.getInstance().getLoginUserIntId();
|
||||
|
||||
public interface Callback {
|
||||
void a(long j);
|
||||
|
||||
void a(Rank rank, int i);
|
||||
}
|
||||
|
||||
public class RankViewHolder extends RecyclerView.ViewHolder {
|
||||
ImageView actionImageView;
|
||||
TextView levelTextView;
|
||||
TextView nameTextView;
|
||||
TextView rankNumTextView;
|
||||
RelativeLayout rankRootView;
|
||||
TextView titleKeyTextView;
|
||||
ImageView userImageView;
|
||||
|
||||
public RankViewHolder(RankAdapter rankAdapter, View view) {
|
||||
super(view);
|
||||
ButterKnife.a(this, view);
|
||||
}
|
||||
}
|
||||
|
||||
public class RankViewHolder_ViewBinding implements Unbinder {
|
||||
private RankViewHolder b;
|
||||
|
||||
public RankViewHolder_ViewBinding(RankViewHolder rankViewHolder, View view) {
|
||||
this.b = rankViewHolder;
|
||||
rankViewHolder.rankNumTextView = (TextView) Utils.b(view, R.id.rankNumTextView, "field 'rankNumTextView'", TextView.class);
|
||||
rankViewHolder.nameTextView = (TextView) Utils.b(view, R.id.nameTextView, "field 'nameTextView'", TextView.class);
|
||||
rankViewHolder.titleKeyTextView = (TextView) Utils.b(view, R.id.titleKeyTextView, "field 'titleKeyTextView'", TextView.class);
|
||||
rankViewHolder.userImageView = (ImageView) Utils.b(view, R.id.userImageView, "field 'userImageView'", ImageView.class);
|
||||
rankViewHolder.actionImageView = (ImageView) Utils.b(view, R.id.actionImageView, "field 'actionImageView'", ImageView.class);
|
||||
rankViewHolder.rankRootView = (RelativeLayout) Utils.b(view, R.id.rankRootView, "field 'rankRootView'", RelativeLayout.class);
|
||||
rankViewHolder.levelTextView = (TextView) Utils.b(view, R.id.levelTextView, "field 'levelTextView'", TextView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
RankViewHolder rankViewHolder = this.b;
|
||||
if (rankViewHolder == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
rankViewHolder.rankNumTextView = null;
|
||||
rankViewHolder.nameTextView = null;
|
||||
rankViewHolder.titleKeyTextView = null;
|
||||
rankViewHolder.userImageView = null;
|
||||
rankViewHolder.actionImageView = null;
|
||||
rankViewHolder.rankRootView = null;
|
||||
rankViewHolder.levelTextView = null;
|
||||
}
|
||||
}
|
||||
|
||||
public RankAdapter(Context context, List<Rank> list) {
|
||||
this.a = context;
|
||||
this.b = list;
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public int getItemCount() {
|
||||
return this.b.size();
|
||||
}
|
||||
|
||||
public void a(Callback callback) {
|
||||
this.c = callback;
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public RankViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
||||
return new RankViewHolder(this, LayoutInflater.from(this.a).inflate(R.layout.recycler_item_rank, viewGroup, false));
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onBindViewHolder(RankViewHolder rankViewHolder, final int i) {
|
||||
final Rank rank = this.b.get(i);
|
||||
int i2 = i + 1;
|
||||
if (i2 == 1) {
|
||||
rankViewHolder.rankNumTextView.setBackgroundResource(R.drawable.rank_first_oval_background);
|
||||
} else if (i2 == 2) {
|
||||
rankViewHolder.rankNumTextView.setBackgroundResource(R.drawable.rank_second_oval_background);
|
||||
} else if (i2 != 3) {
|
||||
rankViewHolder.rankNumTextView.setBackgroundResource(R.drawable.rank_fourth_oval_background);
|
||||
} else {
|
||||
rankViewHolder.rankNumTextView.setBackgroundResource(R.drawable.rank_third_oval_background);
|
||||
}
|
||||
rankViewHolder.actionImageView.setVisibility(this.d == rank.getUserId() ? 8 : 0);
|
||||
rankViewHolder.rankNumTextView.setText(String.valueOf(i2));
|
||||
rankViewHolder.nameTextView.setText(rank.getNickName());
|
||||
rankViewHolder.titleKeyTextView.setText(rank.getTitle());
|
||||
rankViewHolder.levelTextView.setText(String.format(this.a.getString(R.string.search_item_user_desc), Integer.valueOf(rank.getLevel())));
|
||||
rankViewHolder.actionImageView.setImageResource(rank.getIsSubscribed() == 1 ? R.mipmap.ic_interest : R.mipmap.ic_have_not_interest);
|
||||
rankViewHolder.actionImageView.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.adapter.RankAdapter.1
|
||||
@Override // android.view.View.OnClickListener
|
||||
public void onClick(View view) {
|
||||
if (RankAdapter.this.c != null) {
|
||||
RankAdapter.this.c.a(rank, i);
|
||||
}
|
||||
}
|
||||
});
|
||||
rankViewHolder.userImageView.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.adapter.RankAdapter.2
|
||||
@Override // android.view.View.OnClickListener
|
||||
public void onClick(View view) {
|
||||
if (RankAdapter.this.c != null) {
|
||||
RankAdapter.this.c.a(rank.getUserId());
|
||||
}
|
||||
}
|
||||
});
|
||||
RequestBuilder<Drawable> a = Glide.e(this.a).a(rank.getUserImage());
|
||||
a.a(RequestOptions.O().b(R.drawable.tab_base_user_default).a(R.drawable.tab_base_user_default));
|
||||
a.a(rankViewHolder.userImageView);
|
||||
}
|
||||
}
|
||||
41
sources/com/ubt/jimu/user/view/adapter/TeachAdapter.java
Normal file
41
sources/com/ubt/jimu/user/view/adapter/TeachAdapter.java
Normal file
@@ -0,0 +1,41 @@
|
||||
package com.ubt.jimu.user.view.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import com.recyclelib.adapter.BaseRecyclerAdapter;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.community.view.WebViewShopActivity;
|
||||
import com.ubt.jimu.user.model.TeachModel;
|
||||
import com.ubt.jimu.utils.ResoureUtils;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class TeachAdapter extends BaseRecyclerAdapter<TeachModel> {
|
||||
public TeachAdapter(Context context, List<TeachModel> list) {
|
||||
super(context, list);
|
||||
}
|
||||
|
||||
public /* synthetic */ void a(int i, View view) {
|
||||
WebViewShopActivity.a(this.mContext, ((TeachModel) this.mList.get(i)).a(), ((TeachModel) this.mList.get(i)).c(), ((TeachModel) this.mList.get(i)).d(), ((TeachModel) this.mList.get(i)).b());
|
||||
}
|
||||
|
||||
@Override // com.recyclelib.adapter.BaseRecyclerAdapter
|
||||
public int layoutId() {
|
||||
return R.layout.item_teach;
|
||||
}
|
||||
|
||||
@Override // androidx.recyclerview.widget.RecyclerView.Adapter
|
||||
public void onBindViewHolder(BaseRecyclerAdapter.BaseViewHolder baseViewHolder, final int i) {
|
||||
ImageView imageView = (ImageView) baseViewHolder.getView(R.id.img_teach_icon);
|
||||
((TextView) baseViewHolder.getView(R.id.tv_teach_text)).setText(((TeachModel) this.mList.get(i)).a());
|
||||
imageView.setBackgroundResource(ResoureUtils.a(this.mContext, String.format("setting_study_%s", Integer.valueOf(i)), "drawable"));
|
||||
baseViewHolder.itemView.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.adapter.c
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
TeachAdapter.this.a(i, view);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
202
sources/com/ubt/jimu/user/view/fragment/FansFragment.java
Normal file
202
sources/com/ubt/jimu/user/view/fragment/FansFragment.java
Normal file
@@ -0,0 +1,202 @@
|
||||
package com.ubt.jimu.user.view.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import com.recyclelib.URecyclerView;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.cache.Cache;
|
||||
import com.ubt.jimu.base.entities.Fans;
|
||||
import com.ubt.jimu.base.entities.FollowEntities;
|
||||
import com.ubt.jimu.base.http.ApiObserver;
|
||||
import com.ubt.jimu.base.http.manager.CommunityManager;
|
||||
import com.ubt.jimu.user.contract.FansContract$Presenter;
|
||||
import com.ubt.jimu.user.contract.FansContract$View;
|
||||
import com.ubt.jimu.user.view.LoginActivity;
|
||||
import com.ubt.jimu.user.view.UserCenterActivity;
|
||||
import com.ubt.jimu.user.view.adapter.FansAdapter;
|
||||
import com.ubt.jimu.utils.NetWorkUtil;
|
||||
import com.ubt.jimu.widgets.LoadingView;
|
||||
import com.ubtech.view.fragment.BaseFragment;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class FansFragment extends BaseFragment implements FansContract$View {
|
||||
private FansContract$Presenter a;
|
||||
private FansAdapter c;
|
||||
private long d;
|
||||
private Unbinder e;
|
||||
URecyclerView fansRecyclerView;
|
||||
LoadingView loadingView;
|
||||
private List<Fans> b = new ArrayList();
|
||||
private Handler f = new Handler();
|
||||
|
||||
private void initView() {
|
||||
if (getArguments() != null) {
|
||||
this.d = getArguments().getLong("view_user_id");
|
||||
}
|
||||
this.c = new FansAdapter(this.mActivity, this.b);
|
||||
this.c.a(new FansAdapter.Callback() { // from class: com.ubt.jimu.user.view.fragment.FansFragment.1
|
||||
@Override // com.ubt.jimu.user.view.adapter.FansAdapter.Callback
|
||||
public void a(int i) {
|
||||
UserCenterActivity.a(((BaseFragment) FansFragment.this).mActivity, ((Fans) FansFragment.this.b.get(i)).getUserId());
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.view.adapter.FansAdapter.Callback
|
||||
public void a(Fans fans, int i) {
|
||||
if (Cache.getInstance().getLoginUserIntId() == 0) {
|
||||
LoginActivity.start(((BaseFragment) FansFragment.this).mActivity);
|
||||
} else {
|
||||
CommunityManager.create().subscriptionAdd((int) fans.getUserId(), new ApiObserver<FollowEntities>(null) { // from class: com.ubt.jimu.user.view.fragment.FansFragment.1.1
|
||||
@Override // com.ubt.jimu.base.http.ApiObserver, io.reactivex.Observer
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onNext(FollowEntities followEntities) {
|
||||
super.onNext(followEntities);
|
||||
FansFragment.this.a.subscribe();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
this.fansRecyclerView.setAdapter(this.c);
|
||||
this.fansRecyclerView.setLayoutManager(new LinearLayoutManager(this.mActivity, 1, false));
|
||||
this.fansRecyclerView.setLoadingMoreEnabled(false);
|
||||
this.fansRecyclerView.setLoadingListener(new URecyclerView.LoadingListener() { // from class: com.ubt.jimu.user.view.fragment.FansFragment.2
|
||||
@Override // com.recyclelib.URecyclerView.LoadingListener
|
||||
public void onLoadingMore() {
|
||||
}
|
||||
|
||||
@Override // com.recyclelib.URecyclerView.LoadingListener
|
||||
public void onRefreshing() {
|
||||
FansFragment.this.loadingView.setIsRefresh(true);
|
||||
FansFragment.this.a.d(FansFragment.this.m(), FansFragment.this.d());
|
||||
}
|
||||
});
|
||||
this.loadingView.setOnRetryListener(new LoadingView.RetryRequest() { // from class: com.ubt.jimu.user.view.fragment.FansFragment.3
|
||||
@Override // com.ubt.jimu.widgets.LoadingView.RetryRequest
|
||||
public void OnRetryListener() {
|
||||
FansFragment.this.loadingView.c();
|
||||
FansFragment.this.f.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.fragment.FansFragment.3.1
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
FansFragment.this.a.subscribe();
|
||||
}
|
||||
}, 500L);
|
||||
}
|
||||
});
|
||||
this.loadingView.setBackgroundViewColor(getResources().getColor(R.color.bg_F9F9F9));
|
||||
}
|
||||
|
||||
private void o() {
|
||||
if (b()) {
|
||||
this.loadingView.a(R.string.tips_no_fans, R.drawable.icon_favourate_empty);
|
||||
} else {
|
||||
this.loadingView.a(R.string.others_no_fans, R.drawable.icon_favourate_empty);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.FansContract$View
|
||||
public int e() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.FansContract$View
|
||||
public int f() {
|
||||
return 1000;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.FansContract$View
|
||||
public void g(List<Fans> list) {
|
||||
this.fansRecyclerView.A();
|
||||
if (list == null || list.size() == 0) {
|
||||
o();
|
||||
return;
|
||||
}
|
||||
this.loadingView.setVisibility(8);
|
||||
Log.i("FansFragment", list.toString());
|
||||
this.b.clear();
|
||||
this.b.addAll(list);
|
||||
this.c.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.FansContract$View
|
||||
public long m() {
|
||||
return Cache.getInstance().getLoginUserIntId();
|
||||
}
|
||||
|
||||
@Override // com.ubtech.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
||||
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
||||
View inflate = layoutInflater.inflate(R.layout.recycler_view, (ViewGroup) null);
|
||||
this.e = ButterKnife.a(this, inflate);
|
||||
initView();
|
||||
return inflate;
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.Fragment
|
||||
public void onDestroyView() {
|
||||
this.e.unbind();
|
||||
Handler handler = this.f;
|
||||
if (handler != null) {
|
||||
handler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
super.onDestroyView();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.FansContract$View
|
||||
public void onError() {
|
||||
this.loadingView.setVisibility(0);
|
||||
if (NetWorkUtil.b(this.mActivity)) {
|
||||
this.loadingView.e();
|
||||
} else {
|
||||
this.loadingView.d();
|
||||
}
|
||||
this.fansRecyclerView.A();
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.Fragment
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
this.a.unSubscribe();
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.Fragment
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
this.a.subscribe();
|
||||
}
|
||||
|
||||
public static FansFragment a(long j) {
|
||||
FansFragment fansFragment = new FansFragment();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putLong("view_user_id", j);
|
||||
fansFragment.setArguments(bundle);
|
||||
return fansFragment;
|
||||
}
|
||||
|
||||
private boolean b() {
|
||||
return d() == m();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.FansContract$View
|
||||
public long d() {
|
||||
return this.d;
|
||||
}
|
||||
|
||||
@Override // com.ubtech.view.BaseView
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void setPresenter(FansContract$Presenter fansContract$Presenter) {
|
||||
this.a = fansContract$Presenter;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.FansContract$View
|
||||
public void a() {
|
||||
this.loadingView.g();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ubt.jimu.user.view.fragment;
|
||||
|
||||
import android.view.View;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.recyclelib.URecyclerView;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.widgets.LoadingView;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class FansFragment_ViewBinding implements Unbinder {
|
||||
private FansFragment b;
|
||||
|
||||
public FansFragment_ViewBinding(FansFragment fansFragment, View view) {
|
||||
this.b = fansFragment;
|
||||
fansFragment.fansRecyclerView = (URecyclerView) Utils.b(view, R.id.recyclerView, "field 'fansRecyclerView'", URecyclerView.class);
|
||||
fansFragment.loadingView = (LoadingView) Utils.b(view, R.id.loadingView, "field 'loadingView'", LoadingView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
FansFragment fansFragment = this.b;
|
||||
if (fansFragment == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
fansFragment.fansRecyclerView = null;
|
||||
fansFragment.loadingView = null;
|
||||
}
|
||||
}
|
||||
209
sources/com/ubt/jimu/user/view/fragment/InterestFragment.java
Normal file
209
sources/com/ubt/jimu/user/view/fragment/InterestFragment.java
Normal file
@@ -0,0 +1,209 @@
|
||||
package com.ubt.jimu.user.view.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import butterknife.ButterKnife;
|
||||
import com.recyclelib.URecyclerView;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.cache.Cache;
|
||||
import com.ubt.jimu.base.entities.FollowEntities;
|
||||
import com.ubt.jimu.base.entities.Interest;
|
||||
import com.ubt.jimu.base.http.ApiObserver;
|
||||
import com.ubt.jimu.base.http.manager.CommunityManager;
|
||||
import com.ubt.jimu.user.contract.InterestContract$Presenter;
|
||||
import com.ubt.jimu.user.contract.InterestContract$View;
|
||||
import com.ubt.jimu.user.view.LoginActivity;
|
||||
import com.ubt.jimu.user.view.UserCenterActivity;
|
||||
import com.ubt.jimu.user.view.adapter.InterestAdapter;
|
||||
import com.ubt.jimu.utils.NetWorkUtil;
|
||||
import com.ubt.jimu.widgets.LoadingView;
|
||||
import com.ubtech.view.fragment.BaseFragment;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class InterestFragment extends BaseFragment implements InterestContract$View {
|
||||
private InterestAdapter b;
|
||||
private InterestContract$Presenter c;
|
||||
private long d;
|
||||
URecyclerView interestRecycleView;
|
||||
LoadingView loadingView;
|
||||
private List<Interest> a = new ArrayList();
|
||||
private Handler e = new Handler();
|
||||
|
||||
private void initView() {
|
||||
if (getArguments() != null) {
|
||||
this.d = getArguments().getLong("view_user_id");
|
||||
}
|
||||
this.b = new InterestAdapter(this.mActivity, this.a);
|
||||
this.b.a(new InterestAdapter.Callback() { // from class: com.ubt.jimu.user.view.fragment.InterestFragment.1
|
||||
@Override // com.ubt.jimu.user.view.adapter.InterestAdapter.Callback
|
||||
public void a(int i) {
|
||||
UserCenterActivity.a(((BaseFragment) InterestFragment.this).mActivity, ((Interest) InterestFragment.this.a.get(i)).getUserId());
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.view.adapter.InterestAdapter.Callback
|
||||
public void b(int i) {
|
||||
if (Cache.getInstance().getLoginUserIntId() == 0) {
|
||||
LoginActivity.start(((BaseFragment) InterestFragment.this).mActivity);
|
||||
} else {
|
||||
CommunityManager.create().subscriptionAdd(((Interest) InterestFragment.this.a.get(i)).getUserId(), new ApiObserver<FollowEntities>(null) { // from class: com.ubt.jimu.user.view.fragment.InterestFragment.1.1
|
||||
@Override // com.ubt.jimu.base.http.ApiObserver, io.reactivex.Observer
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onNext(FollowEntities followEntities) {
|
||||
super.onNext(followEntities);
|
||||
InterestFragment.this.c.b(InterestFragment.this.m(), InterestFragment.this.d());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
this.interestRecycleView.setAdapter(this.b);
|
||||
this.interestRecycleView.setLayoutManager(new LinearLayoutManager(this.mActivity, 1, false));
|
||||
this.interestRecycleView.setLoadingMoreEnabled(false);
|
||||
this.interestRecycleView.setLoadingListener(new URecyclerView.LoadingListener() { // from class: com.ubt.jimu.user.view.fragment.InterestFragment.2
|
||||
@Override // com.recyclelib.URecyclerView.LoadingListener
|
||||
public void onLoadingMore() {
|
||||
}
|
||||
|
||||
@Override // com.recyclelib.URecyclerView.LoadingListener
|
||||
public void onRefreshing() {
|
||||
InterestFragment.this.loadingView.setIsRefresh(true);
|
||||
InterestFragment.this.c.b(InterestFragment.this.m(), InterestFragment.this.d());
|
||||
}
|
||||
});
|
||||
this.loadingView.setOnRetryListener(new LoadingView.RetryRequest() { // from class: com.ubt.jimu.user.view.fragment.InterestFragment.3
|
||||
@Override // com.ubt.jimu.widgets.LoadingView.RetryRequest
|
||||
public void OnRetryListener() {
|
||||
InterestFragment.this.loadingView.c();
|
||||
InterestFragment.this.e.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.fragment.InterestFragment.3.1
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
InterestFragment.this.c.subscribe();
|
||||
}
|
||||
}, 500L);
|
||||
}
|
||||
});
|
||||
this.loadingView.setBackgroundViewColor(getResources().getColor(R.color.bg_F9F9F9));
|
||||
}
|
||||
|
||||
private boolean o() {
|
||||
return d() == m();
|
||||
}
|
||||
|
||||
private void q() {
|
||||
if (o()) {
|
||||
this.loadingView.a(R.string.tips_no_subscription, R.drawable.icon_favourate_empty);
|
||||
} else {
|
||||
this.loadingView.a(R.string.others_no_subscription, R.drawable.icon_favourate_empty);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.InterestContract$View
|
||||
public int e() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.InterestContract$View
|
||||
public int f() {
|
||||
return 1000;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.InterestContract$View
|
||||
public long m() {
|
||||
return Cache.getInstance().getLoginUserIntId();
|
||||
}
|
||||
|
||||
@Override // com.ubtech.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
||||
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
||||
View inflate = layoutInflater.inflate(R.layout.fragment_interest, (ViewGroup) null);
|
||||
ButterKnife.a(this, inflate);
|
||||
initView();
|
||||
return inflate;
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.Fragment
|
||||
public void onDestroy() {
|
||||
Handler handler = this.e;
|
||||
if (handler != null) {
|
||||
handler.removeCallbacksAndMessages(null);
|
||||
this.e = null;
|
||||
}
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.InterestContract$View
|
||||
public void onError() {
|
||||
if (NetWorkUtil.b(this.mActivity)) {
|
||||
this.loadingView.e();
|
||||
} else {
|
||||
this.loadingView.d();
|
||||
}
|
||||
this.interestRecycleView.A();
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.Fragment
|
||||
public void onPause() {
|
||||
this.c.unSubscribe();
|
||||
this.loadingView.b();
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.Fragment
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
this.c.subscribe();
|
||||
}
|
||||
|
||||
public static InterestFragment a(long j) {
|
||||
InterestFragment interestFragment = new InterestFragment();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putLong("view_user_id", j);
|
||||
interestFragment.setArguments(bundle);
|
||||
return interestFragment;
|
||||
}
|
||||
|
||||
public /* synthetic */ void b() {
|
||||
this.loadingView.g();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.InterestContract$View
|
||||
public long d() {
|
||||
return this.d;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.InterestContract$View
|
||||
public void b(List<Interest> list) {
|
||||
this.interestRecycleView.A();
|
||||
if (list != null && list.size() != 0) {
|
||||
this.loadingView.b();
|
||||
Log.i("InterestFragment", list.toString());
|
||||
this.a.clear();
|
||||
this.a.addAll(list);
|
||||
this.b.notifyDataSetChanged();
|
||||
return;
|
||||
}
|
||||
q();
|
||||
}
|
||||
|
||||
@Override // com.ubtech.view.BaseView
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void setPresenter(InterestContract$Presenter interestContract$Presenter) {
|
||||
this.c = interestContract$Presenter;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.InterestContract$View
|
||||
public void a() {
|
||||
this.loadingView.post(new Runnable() { // from class: com.ubt.jimu.user.view.fragment.a
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
InterestFragment.this.b();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ubt.jimu.user.view.fragment;
|
||||
|
||||
import android.view.View;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.recyclelib.URecyclerView;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.widgets.LoadingView;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class InterestFragment_ViewBinding implements Unbinder {
|
||||
private InterestFragment b;
|
||||
|
||||
public InterestFragment_ViewBinding(InterestFragment interestFragment, View view) {
|
||||
this.b = interestFragment;
|
||||
interestFragment.interestRecycleView = (URecyclerView) Utils.b(view, R.id.interestRecyclerView, "field 'interestRecycleView'", URecyclerView.class);
|
||||
interestFragment.loadingView = (LoadingView) Utils.b(view, R.id.loadingView, "field 'loadingView'", LoadingView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
InterestFragment interestFragment = this.b;
|
||||
if (interestFragment == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
interestFragment.interestRecycleView = null;
|
||||
interestFragment.loadingView = null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.ubt.jimu.user.view.fragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import butterknife.ButterKnife;
|
||||
import com.recyclelib.URecyclerView;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.entities.ArticleBean;
|
||||
import com.ubt.jimu.base.entities.MyPostListEntities;
|
||||
import com.ubt.jimu.user.contract.PostContract$Presenter;
|
||||
import com.ubt.jimu.user.contract.PostContract$View;
|
||||
import com.ubt.jimu.user.view.adapter.PostAdapter;
|
||||
import com.ubtech.view.fragment.BaseFragment;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class PostListFragment extends BaseFragment implements PostContract$View {
|
||||
private PostContract$Presenter a;
|
||||
private List<ArticleBean.Article> b = new ArrayList();
|
||||
private PostAdapter c;
|
||||
URecyclerView postRecyclerView;
|
||||
|
||||
public static PostListFragment b() {
|
||||
return new PostListFragment();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
this.postRecyclerView.setLayoutManager(new GridLayoutManager((Context) this.mActivity, 4, 1, false));
|
||||
this.c = new PostAdapter(this.mActivity, this.b);
|
||||
this.postRecyclerView.setAdapter(this.c);
|
||||
}
|
||||
|
||||
@Override // com.ubtech.view.BaseView
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void setPresenter(PostContract$Presenter postContract$Presenter) {
|
||||
this.a = postContract$Presenter;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.PostContract$View
|
||||
public long m() {
|
||||
return 10L;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.PostContract$View
|
||||
public void n(List<MyPostListEntities.RecordsBean> list) {
|
||||
}
|
||||
|
||||
@Override // com.ubtech.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
||||
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
||||
View inflate = layoutInflater.inflate(R.layout.recycler_view, (ViewGroup) null);
|
||||
ButterKnife.a(this, inflate);
|
||||
initView();
|
||||
return inflate;
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.Fragment
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
this.a.unSubscribe();
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.Fragment
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
this.a.subscribe();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.PostContract$View
|
||||
public void onSuccess() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ubt.jimu.user.view.fragment;
|
||||
|
||||
import android.view.View;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.recyclelib.URecyclerView;
|
||||
import com.ubt.jimu.R;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class PostListFragment_ViewBinding implements Unbinder {
|
||||
private PostListFragment b;
|
||||
|
||||
public PostListFragment_ViewBinding(PostListFragment postListFragment, View view) {
|
||||
this.b = postListFragment;
|
||||
postListFragment.postRecyclerView = (URecyclerView) Utils.b(view, R.id.recyclerView, "field 'postRecyclerView'", URecyclerView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
PostListFragment postListFragment = this.b;
|
||||
if (postListFragment == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
postListFragment.postRecyclerView = null;
|
||||
}
|
||||
}
|
||||
195
sources/com/ubt/jimu/user/view/fragment/PraiseFragment.java
Normal file
195
sources/com/ubt/jimu/user/view/fragment/PraiseFragment.java
Normal file
@@ -0,0 +1,195 @@
|
||||
package com.ubt.jimu.user.view.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import butterknife.ButterKnife;
|
||||
import com.recyclelib.URecyclerView;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.cache.Cache;
|
||||
import com.ubt.jimu.base.entities.FollowEntities;
|
||||
import com.ubt.jimu.base.entities.PraiseBean;
|
||||
import com.ubt.jimu.community.view.PublishDetailActivity;
|
||||
import com.ubt.jimu.user.contract.PraiseContract$Presenter;
|
||||
import com.ubt.jimu.user.contract.PraiseContract$View;
|
||||
import com.ubt.jimu.user.view.adapter.PraiseAdapter;
|
||||
import com.ubt.jimu.utils.NetWorkUtil;
|
||||
import com.ubt.jimu.widgets.LoadingView;
|
||||
import com.ubtech.view.fragment.BaseFragment;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class PraiseFragment extends BaseFragment implements PraiseContract$View {
|
||||
private long a;
|
||||
private PraiseContract$Presenter b;
|
||||
private PraiseAdapter d;
|
||||
LoadingView loadingView;
|
||||
URecyclerView praiseRecycleView;
|
||||
private List<PraiseBean.Praise> c = new ArrayList();
|
||||
private Handler e = new Handler();
|
||||
|
||||
private void initView() {
|
||||
if (getArguments() != null) {
|
||||
this.a = getArguments().getLong("view_user_id");
|
||||
}
|
||||
this.d = new PraiseAdapter(this.mActivity, Cache.getInstance().getLoginUserIntId() == this.a, this.c);
|
||||
this.d.a(new PraiseAdapter.Callback() { // from class: com.ubt.jimu.user.view.fragment.PraiseFragment.1
|
||||
@Override // com.ubt.jimu.user.view.adapter.PraiseAdapter.Callback
|
||||
public void a(int i) {
|
||||
PraiseFragment.this.b.addPraise(((PraiseBean.Praise) PraiseFragment.this.c.get(i)).getId());
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.view.adapter.PraiseAdapter.Callback
|
||||
public void b(int i) {
|
||||
PublishDetailActivity.start(PraiseFragment.this.getContext(), ((PraiseBean.Praise) PraiseFragment.this.c.get(i)).getId());
|
||||
}
|
||||
});
|
||||
this.praiseRecycleView.setAdapter(this.d);
|
||||
this.praiseRecycleView.setLayoutManager(new LinearLayoutManager(this.mActivity, 1, false));
|
||||
this.praiseRecycleView.setLoadingMoreEnabled(false);
|
||||
this.praiseRecycleView.setLoadingListener(new URecyclerView.LoadingListener() { // from class: com.ubt.jimu.user.view.fragment.PraiseFragment.2
|
||||
@Override // com.recyclelib.URecyclerView.LoadingListener
|
||||
public void onLoadingMore() {
|
||||
}
|
||||
|
||||
@Override // com.recyclelib.URecyclerView.LoadingListener
|
||||
public void onRefreshing() {
|
||||
PraiseFragment.this.loadingView.setIsRefresh(true);
|
||||
PraiseFragment.this.b.subscribe();
|
||||
}
|
||||
});
|
||||
this.loadingView.setOnRetryListener(new LoadingView.RetryRequest() { // from class: com.ubt.jimu.user.view.fragment.PraiseFragment.3
|
||||
@Override // com.ubt.jimu.widgets.LoadingView.RetryRequest
|
||||
public void OnRetryListener() {
|
||||
PraiseFragment.this.loadingView.c();
|
||||
PraiseFragment.this.e.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.fragment.PraiseFragment.3.1
|
||||
@Override // java.lang.Runnable
|
||||
public void run() {
|
||||
PraiseFragment.this.b.subscribe();
|
||||
}
|
||||
}, 1500L);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void o() {
|
||||
if (b()) {
|
||||
this.loadingView.a(R.string.tips_no_praise, R.drawable.icon_favourate_empty);
|
||||
} else {
|
||||
this.loadingView.a(R.string.others_no_praise, R.drawable.icon_favourate_empty);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.PraiseContract$View
|
||||
public long d() {
|
||||
return this.a;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.PraiseContract$View
|
||||
public int e() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
public long m() {
|
||||
return Cache.getInstance().getLoginUserIntId();
|
||||
}
|
||||
|
||||
@Override // com.ubtech.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
||||
public void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
}
|
||||
|
||||
@Override // com.ubtech.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
||||
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
||||
View inflate = layoutInflater.inflate(R.layout.recycler_view, (ViewGroup) null);
|
||||
ButterKnife.a(this, inflate);
|
||||
initView();
|
||||
return inflate;
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.Fragment
|
||||
public void onDestroy() {
|
||||
Handler handler = this.e;
|
||||
if (handler != null) {
|
||||
handler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
this.b.unSubscribe();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.Fragment
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.Fragment
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.Fragment
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
this.b.subscribe();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.PraiseContract$View
|
||||
public void q(List<PraiseBean.Praise> list) {
|
||||
this.praiseRecycleView.A();
|
||||
if (list == null || list.size() == 0) {
|
||||
o();
|
||||
return;
|
||||
}
|
||||
this.loadingView.b();
|
||||
Log.i("PraiseFragment", list.toString());
|
||||
this.c.clear();
|
||||
this.c.addAll(list);
|
||||
this.d.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public static PraiseFragment a(long j) {
|
||||
PraiseFragment praiseFragment = new PraiseFragment();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putLong("view_user_id", j);
|
||||
praiseFragment.setArguments(bundle);
|
||||
return praiseFragment;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.PraiseContract$View
|
||||
public void b(String str) {
|
||||
if (NetWorkUtil.b(this.mActivity)) {
|
||||
this.loadingView.e();
|
||||
} else {
|
||||
this.loadingView.d();
|
||||
}
|
||||
this.praiseRecycleView.A();
|
||||
}
|
||||
|
||||
private boolean b() {
|
||||
return d() == m();
|
||||
}
|
||||
|
||||
@Override // com.ubtech.view.BaseView
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void setPresenter(PraiseContract$Presenter praiseContract$Presenter) {
|
||||
this.b = praiseContract$Presenter;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.PraiseContract$View
|
||||
public void a() {
|
||||
this.loadingView.g();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.PraiseContract$View
|
||||
public void a(FollowEntities followEntities) {
|
||||
if (followEntities.isStatus()) {
|
||||
this.loadingView.setIsRefresh(true);
|
||||
this.b.subscribe();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ubt.jimu.user.view.fragment;
|
||||
|
||||
import android.view.View;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.recyclelib.URecyclerView;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.widgets.LoadingView;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class PraiseFragment_ViewBinding implements Unbinder {
|
||||
private PraiseFragment b;
|
||||
|
||||
public PraiseFragment_ViewBinding(PraiseFragment praiseFragment, View view) {
|
||||
this.b = praiseFragment;
|
||||
praiseFragment.praiseRecycleView = (URecyclerView) Utils.b(view, R.id.recyclerView, "field 'praiseRecycleView'", URecyclerView.class);
|
||||
praiseFragment.loadingView = (LoadingView) Utils.b(view, R.id.loadingView, "field 'loadingView'", LoadingView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
PraiseFragment praiseFragment = this.b;
|
||||
if (praiseFragment == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
praiseFragment.praiseRecycleView = null;
|
||||
praiseFragment.loadingView = null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.ubt.jimu.user.view.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import butterknife.ButterKnife;
|
||||
import com.daimajia.swipe.util.Attributes$Mode;
|
||||
import com.recyclelib.URecyclerView;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.entities.QuestionBean;
|
||||
import com.ubt.jimu.user.contract.QuestionContract$Presenter;
|
||||
import com.ubt.jimu.user.contract.QuestionContract$View;
|
||||
import com.ubt.jimu.user.view.adapter.QuestionAdapter;
|
||||
import com.ubtech.view.fragment.BaseFragment;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class QuestionListFragment extends BaseFragment implements QuestionContract$View {
|
||||
private QuestionAdapter b;
|
||||
private QuestionContract$Presenter d;
|
||||
URecyclerView questionRecyclerView;
|
||||
private List<QuestionBean.Question> a = new ArrayList();
|
||||
private int c = 1;
|
||||
|
||||
private void initView() {
|
||||
this.b = new QuestionAdapter(this.mActivity, this.a);
|
||||
this.b.a(Attributes$Mode.Single);
|
||||
this.questionRecyclerView.setAdapter(this.b);
|
||||
this.questionRecyclerView.setLayoutManager(new LinearLayoutManager(this.mActivity, 1, false));
|
||||
this.questionRecyclerView.setLoadingListener(new URecyclerView.LoadingListener() { // from class: com.ubt.jimu.user.view.fragment.QuestionListFragment.1
|
||||
@Override // com.recyclelib.URecyclerView.LoadingListener
|
||||
public void onLoadingMore() {
|
||||
}
|
||||
|
||||
@Override // com.recyclelib.URecyclerView.LoadingListener
|
||||
public void onRefreshing() {
|
||||
QuestionListFragment.this.d.a("", QuestionListFragment.this.m(), QuestionListFragment.this.e());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public int e() {
|
||||
return this.c;
|
||||
}
|
||||
|
||||
public long m() {
|
||||
return 10L;
|
||||
}
|
||||
|
||||
@Override // com.ubtech.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
||||
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
||||
View inflate = layoutInflater.inflate(R.layout.recycler_view, (ViewGroup) null);
|
||||
ButterKnife.a(this, inflate);
|
||||
initView();
|
||||
return inflate;
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.Fragment
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
this.d.unSubscribe();
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.Fragment
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
this.d.subscribe();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ubt.jimu.user.view.fragment;
|
||||
|
||||
import android.view.View;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.recyclelib.URecyclerView;
|
||||
import com.ubt.jimu.R;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class QuestionListFragment_ViewBinding implements Unbinder {
|
||||
private QuestionListFragment b;
|
||||
|
||||
public QuestionListFragment_ViewBinding(QuestionListFragment questionListFragment, View view) {
|
||||
this.b = questionListFragment;
|
||||
questionListFragment.questionRecyclerView = (URecyclerView) Utils.b(view, R.id.recyclerView, "field 'questionRecyclerView'", URecyclerView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
QuestionListFragment questionListFragment = this.b;
|
||||
if (questionListFragment == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
questionListFragment.questionRecyclerView = null;
|
||||
}
|
||||
}
|
||||
138
sources/com/ubt/jimu/user/view/fragment/RankFragment.java
Normal file
138
sources/com/ubt/jimu/user/view/fragment/RankFragment.java
Normal file
@@ -0,0 +1,138 @@
|
||||
package com.ubt.jimu.user.view.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import butterknife.ButterKnife;
|
||||
import com.recyclelib.URecyclerView;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.cache.Cache;
|
||||
import com.ubt.jimu.base.entities.FollowEntities;
|
||||
import com.ubt.jimu.base.entities.Rank;
|
||||
import com.ubt.jimu.base.http.ApiObserver;
|
||||
import com.ubt.jimu.base.http.manager.CommunityManager;
|
||||
import com.ubt.jimu.user.contract.RankContract$Presenter;
|
||||
import com.ubt.jimu.user.contract.RankContract$View;
|
||||
import com.ubt.jimu.user.view.UserCenterActivity;
|
||||
import com.ubt.jimu.user.view.adapter.RankAdapter;
|
||||
import com.ubtech.view.fragment.BaseFragment;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class RankFragment extends BaseFragment implements RankContract$View {
|
||||
public static final String e = RankFragment.class.getSimpleName();
|
||||
private RankContract$Presenter a;
|
||||
private List<Rank> b = new ArrayList();
|
||||
private RankAdapter c;
|
||||
private long d;
|
||||
URecyclerView rankRecyclerView;
|
||||
|
||||
private void initView() {
|
||||
this.c = new RankAdapter(this.mActivity, this.b);
|
||||
this.c.a(new RankAdapter.Callback() { // from class: com.ubt.jimu.user.view.fragment.RankFragment.1
|
||||
@Override // com.ubt.jimu.user.view.adapter.RankAdapter.Callback
|
||||
public void a(long j) {
|
||||
UserCenterActivity.a(((BaseFragment) RankFragment.this).mActivity, j);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.view.adapter.RankAdapter.Callback
|
||||
public void a(Rank rank, int i) {
|
||||
CommunityManager.create().subscriptionAdd((int) rank.getUserId(), new ApiObserver<FollowEntities>(null) { // from class: com.ubt.jimu.user.view.fragment.RankFragment.1.1
|
||||
@Override // com.ubt.jimu.base.http.ApiObserver, io.reactivex.Observer
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onNext(FollowEntities followEntities) {
|
||||
super.onNext(followEntities);
|
||||
RankFragment.this.a.subscribe();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
this.rankRecyclerView.setAdapter(this.c);
|
||||
this.rankRecyclerView.setLayoutManager(new LinearLayoutManager(this.mActivity, 1, false));
|
||||
this.rankRecyclerView.setLoadingMoreEnabled(false);
|
||||
this.rankRecyclerView.setLoadingListener(new URecyclerView.LoadingListener() { // from class: com.ubt.jimu.user.view.fragment.RankFragment.2
|
||||
@Override // com.recyclelib.URecyclerView.LoadingListener
|
||||
public void onLoadingMore() {
|
||||
}
|
||||
|
||||
@Override // com.recyclelib.URecyclerView.LoadingListener
|
||||
public void onRefreshing() {
|
||||
RankFragment.this.a.c(RankFragment.this.m());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.RankContract$View
|
||||
public void a() {
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.RankContract$View
|
||||
public long d() {
|
||||
return this.d;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.RankContract$View
|
||||
public void l(List<Rank> list) {
|
||||
if (list == null || list.size() == 0) {
|
||||
return;
|
||||
}
|
||||
Log.i(e, list.toString());
|
||||
this.b.clear();
|
||||
this.b.addAll(list);
|
||||
this.c.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public long m() {
|
||||
return Cache.getInstance().getLoginUserIntId();
|
||||
}
|
||||
|
||||
@Override // com.ubtech.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
||||
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
|
||||
View inflate = layoutInflater.inflate(R.layout.fragment_rank, (ViewGroup) null);
|
||||
ButterKnife.a(this, inflate);
|
||||
initView();
|
||||
if (getArguments() != null) {
|
||||
this.d = getArguments().getLong("view_user_id");
|
||||
}
|
||||
return inflate;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.RankContract$View
|
||||
public void onError() {
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.Fragment
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
this.a.unSubscribe();
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.Fragment
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
this.a.subscribe();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.RankContract$View
|
||||
public void onSuccess() {
|
||||
this.rankRecyclerView.A();
|
||||
}
|
||||
|
||||
public static RankFragment a(long j) {
|
||||
RankFragment rankFragment = new RankFragment();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putLong("view_user_id", j);
|
||||
rankFragment.setArguments(bundle);
|
||||
return rankFragment;
|
||||
}
|
||||
|
||||
@Override // com.ubtech.view.BaseView
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void setPresenter(RankContract$Presenter rankContract$Presenter) {
|
||||
this.a = rankContract$Presenter;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ubt.jimu.user.view.fragment;
|
||||
|
||||
import android.view.View;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.recyclelib.URecyclerView;
|
||||
import com.ubt.jimu.R;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class RankFragment_ViewBinding implements Unbinder {
|
||||
private RankFragment b;
|
||||
|
||||
public RankFragment_ViewBinding(RankFragment rankFragment, View view) {
|
||||
this.b = rankFragment;
|
||||
rankFragment.rankRecyclerView = (URecyclerView) Utils.b(view, R.id.recyclerView, "field 'rankRecyclerView'", URecyclerView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
RankFragment rankFragment = this.b;
|
||||
if (rankFragment == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
rankFragment.rankRecyclerView = null;
|
||||
}
|
||||
}
|
||||
6
sources/com/ubt/jimu/user/view/picker/LoopListener.java
Normal file
6
sources/com/ubt/jimu/user/view/picker/LoopListener.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package com.ubt.jimu.user.view.picker;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public interface LoopListener {
|
||||
void a(int i);
|
||||
}
|
||||
16
sources/com/ubt/jimu/user/view/picker/LoopRunnable.java
Normal file
16
sources/com/ubt/jimu/user/view/picker/LoopRunnable.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package com.ubt.jimu.user.view.picker;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
final class LoopRunnable implements Runnable {
|
||||
final LoopView a;
|
||||
|
||||
LoopRunnable(LoopView loopView) {
|
||||
this.a = loopView;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
LoopView loopView = this.a;
|
||||
loopView.d.a(LoopView.b(loopView));
|
||||
}
|
||||
}
|
||||
64
sources/com/ubt/jimu/user/view/picker/LoopTimerTask.java
Normal file
64
sources/com/ubt/jimu/user/view/picker/LoopTimerTask.java
Normal file
@@ -0,0 +1,64 @@
|
||||
package com.ubt.jimu.user.view.picker;
|
||||
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
final class LoopTimerTask extends TimerTask {
|
||||
float a = 2.147484E9f;
|
||||
final float b;
|
||||
final Timer c;
|
||||
final LoopView d;
|
||||
|
||||
LoopTimerTask(LoopView loopView, float f, Timer timer) {
|
||||
this.d = loopView;
|
||||
this.b = f;
|
||||
this.c = timer;
|
||||
}
|
||||
|
||||
@Override // java.util.TimerTask, java.lang.Runnable
|
||||
public final void run() {
|
||||
if (this.a == 2.147484E9f) {
|
||||
if (Math.abs(this.b) <= 2000.0f) {
|
||||
this.a = this.b;
|
||||
} else if (this.b > 0.0f) {
|
||||
this.a = 2000.0f;
|
||||
} else {
|
||||
this.a = -2000.0f;
|
||||
}
|
||||
}
|
||||
if (Math.abs(this.a) >= 0.0f && Math.abs(this.a) <= 20.0f) {
|
||||
this.c.cancel();
|
||||
this.d.c.sendEmptyMessage(2000);
|
||||
return;
|
||||
}
|
||||
int i = (int) ((this.a * 10.0f) / 1000.0f);
|
||||
LoopView loopView = this.d;
|
||||
loopView.b -= i;
|
||||
if (!loopView.x) {
|
||||
int i2 = loopView.b;
|
||||
int i3 = loopView.B;
|
||||
float f = loopView.v;
|
||||
int i4 = loopView.q;
|
||||
if (i2 <= ((int) ((-i3) * i4 * f))) {
|
||||
this.a = 40.0f;
|
||||
loopView.b = (int) ((-i3) * f * i4);
|
||||
} else {
|
||||
int size = loopView.n.size() - 1;
|
||||
LoopView loopView2 = this.d;
|
||||
if (i2 >= ((int) ((size - loopView2.B) * loopView2.v * loopView2.q))) {
|
||||
int size2 = loopView2.n.size() - 1;
|
||||
loopView2.b = (int) ((size2 - r3.B) * this.d.v * r3.q);
|
||||
this.a = -40.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
float f2 = this.a;
|
||||
if (f2 < 0.0f) {
|
||||
this.a = f2 + 20.0f;
|
||||
} else {
|
||||
this.a = f2 - 20.0f;
|
||||
}
|
||||
this.d.c.sendEmptyMessage(1000);
|
||||
}
|
||||
}
|
||||
418
sources/com/ubt/jimu/user/view/picker/LoopView.java
Normal file
418
sources/com/ubt/jimu/user/view/picker/LoopView.java
Normal file
@@ -0,0 +1,418 @@
|
||||
package com.ubt.jimu.user.view.picker;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.GestureDetector;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import com.ubt.jimu.R;
|
||||
import java.util.List;
|
||||
import java.util.Timer;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class LoopView extends View {
|
||||
int A;
|
||||
int B;
|
||||
int C;
|
||||
int D;
|
||||
int E;
|
||||
int F;
|
||||
int G;
|
||||
int H;
|
||||
float I;
|
||||
float J;
|
||||
float K;
|
||||
private float L;
|
||||
private float M;
|
||||
Timer a;
|
||||
int b;
|
||||
Handler c;
|
||||
LoopListener d;
|
||||
private GestureDetector e;
|
||||
private int f;
|
||||
private GestureDetector.SimpleOnGestureListener g;
|
||||
Context h;
|
||||
Paint i;
|
||||
Paint j;
|
||||
Paint k;
|
||||
Paint l;
|
||||
Paint m;
|
||||
List n;
|
||||
int o;
|
||||
int p;
|
||||
int q;
|
||||
int r;
|
||||
int s;
|
||||
int t;
|
||||
int u;
|
||||
float v;
|
||||
boolean x;
|
||||
int y;
|
||||
int z;
|
||||
|
||||
public LoopView(Context context) {
|
||||
super(context);
|
||||
a(context);
|
||||
}
|
||||
|
||||
private void a(Context context) {
|
||||
this.o = 0;
|
||||
this.r = 2002349952;
|
||||
this.s = 861499264;
|
||||
this.t = -10915968;
|
||||
this.u = -7166026;
|
||||
this.v = 2.0f;
|
||||
this.x = true;
|
||||
this.B = -1;
|
||||
this.C = 7;
|
||||
this.I = 0.0f;
|
||||
this.J = 0.0f;
|
||||
this.K = 0.0f;
|
||||
this.b = 0;
|
||||
this.g = new LoopViewGestureListener(this);
|
||||
this.c = new MessageHandler(this);
|
||||
this.h = context;
|
||||
setTextSize(17.0f);
|
||||
}
|
||||
|
||||
static int b(LoopView loopView) {
|
||||
return loopView.getCurrentItem();
|
||||
}
|
||||
|
||||
private void c() {
|
||||
if (this.n == null) {
|
||||
return;
|
||||
}
|
||||
this.i = new Paint();
|
||||
this.i.setColor(this.r);
|
||||
this.i.setAntiAlias(true);
|
||||
this.i.setTypeface(Typeface.MONOSPACE);
|
||||
this.i.setTextSize(this.o);
|
||||
this.j = new Paint();
|
||||
this.j.setColor(this.t);
|
||||
this.j.setAntiAlias(true);
|
||||
this.j.setTextScaleX(1.05f);
|
||||
this.j.setTypeface(Typeface.MONOSPACE);
|
||||
this.j.setFakeBoldText(true);
|
||||
this.j.setTextSize(this.o);
|
||||
this.k = new Paint();
|
||||
this.k.setColor(this.u);
|
||||
this.k.setAntiAlias(true);
|
||||
this.k.setTypeface(Typeface.MONOSPACE);
|
||||
this.k.setTextSize(this.o);
|
||||
this.l = new Paint();
|
||||
this.l.setColor(this.s);
|
||||
this.l.setAntiAlias(true);
|
||||
this.l.setTypeface(Typeface.MONOSPACE);
|
||||
this.l.setTextSize(this.o);
|
||||
this.m = new Paint();
|
||||
this.m.setColor(this.t);
|
||||
this.m.setAntiAlias(true);
|
||||
this.m.setTextScaleX(1.05f);
|
||||
this.m.setTypeface(Typeface.MONOSPACE);
|
||||
this.m.setTextSize(this.o);
|
||||
if (Build.VERSION.SDK_INT >= 11) {
|
||||
setLayerType(1, null);
|
||||
}
|
||||
this.e = new GestureDetector(this.h, this.g);
|
||||
this.e.setIsLongpressEnabled(false);
|
||||
d();
|
||||
int i = this.q;
|
||||
float f = this.v;
|
||||
this.E = (int) (i * f * (this.C - 1));
|
||||
int i2 = this.E;
|
||||
this.D = (int) ((i2 * 2) / 3.141592653589793d);
|
||||
this.F = (int) (i2 / 3.141592653589793d);
|
||||
this.G = this.p + this.o;
|
||||
int i3 = this.D;
|
||||
this.y = (int) ((i3 - (i * f)) / 2.0f);
|
||||
this.z = (int) ((i3 + (f * i)) / 2.0f);
|
||||
if (this.B == -1) {
|
||||
if (this.x) {
|
||||
this.B = (this.n.size() + 1) / 2;
|
||||
} else {
|
||||
this.B = 0;
|
||||
}
|
||||
}
|
||||
this.A = this.B;
|
||||
}
|
||||
|
||||
private void d() {
|
||||
Rect rect = new Rect();
|
||||
String str = (String) this.n.get(0);
|
||||
this.j.getTextBounds(str, 0, str.length(), rect);
|
||||
int width = (int) (rect.width() * 2.8f);
|
||||
if (width > this.p) {
|
||||
this.p = width;
|
||||
}
|
||||
int height = rect.height();
|
||||
if (height > this.q) {
|
||||
this.q = height;
|
||||
}
|
||||
}
|
||||
|
||||
private void e() {
|
||||
int i = (int) (this.b % (this.v * this.q));
|
||||
Timer timer = new Timer();
|
||||
this.a = timer;
|
||||
timer.schedule(new MTimer(this, i, timer), 0L, 10L);
|
||||
}
|
||||
|
||||
public final int getCurrentItem() {
|
||||
int i = this.A;
|
||||
if (i <= 0) {
|
||||
return 0;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
public final String getCurrentItemValue() {
|
||||
return String.valueOf(this.n.get(getCurrentItem())).trim();
|
||||
}
|
||||
|
||||
public final int getItemCount() {
|
||||
List list = this.n;
|
||||
if (list == null) {
|
||||
return 0;
|
||||
}
|
||||
return list.size();
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
protected void onDraw(Canvas canvas) {
|
||||
Canvas canvas2 = canvas;
|
||||
List list = this.n;
|
||||
if (list == null) {
|
||||
super.onDraw(canvas);
|
||||
return;
|
||||
}
|
||||
String[] strArr = new String[this.C];
|
||||
this.H = (int) (this.b / (this.v * this.q));
|
||||
this.A = this.B + (this.H % list.size());
|
||||
if (this.x) {
|
||||
if (this.A < 0) {
|
||||
this.A = this.n.size() + this.A;
|
||||
}
|
||||
if (this.A > this.n.size() - 1) {
|
||||
this.A -= this.n.size();
|
||||
}
|
||||
} else {
|
||||
if (this.A < 0) {
|
||||
this.A = 0;
|
||||
}
|
||||
if (this.A > this.n.size() - 1) {
|
||||
this.A = this.n.size() - 1;
|
||||
}
|
||||
}
|
||||
int i = (int) (this.b % (this.v * this.q));
|
||||
for (int i2 = 0; i2 < this.C; i2++) {
|
||||
int i3 = this.A - (3 - i2);
|
||||
if (this.x) {
|
||||
if (i3 < 0) {
|
||||
i3 += this.n.size();
|
||||
}
|
||||
if (i3 > this.n.size() - 1) {
|
||||
i3 -= this.n.size();
|
||||
}
|
||||
strArr[i2] = (String) this.n.get(i3);
|
||||
} else if (i3 < 0) {
|
||||
strArr[i2] = "";
|
||||
} else if (i3 > this.n.size() - 1) {
|
||||
strArr[i2] = "";
|
||||
} else {
|
||||
strArr[i2] = (String) this.n.get(i3);
|
||||
}
|
||||
}
|
||||
int i4 = this.G;
|
||||
int i5 = (i4 - this.p) / 2;
|
||||
int i6 = this.y;
|
||||
canvas.drawLine(0.0f, i6, i4, i6, this.k);
|
||||
int i7 = this.z;
|
||||
canvas.drawLine(0.0f, i7, this.G, i7, this.k);
|
||||
for (int i8 = 0; i8 < this.C; i8++) {
|
||||
canvas.save();
|
||||
double d = ((((this.q * i8) * this.v) - i) * 3.141592653589793d) / this.E;
|
||||
float f = (float) (90.0d - ((d / 3.141592653589793d) * 180.0d));
|
||||
if (f >= 90.0f || f <= -90.0f) {
|
||||
canvas.restore();
|
||||
} else {
|
||||
int cos = (int) ((this.F - (Math.cos(d) * this.F)) - ((Math.sin(d) * this.q) / 2.0d));
|
||||
canvas2 = canvas;
|
||||
canvas2.translate(0.0f, cos);
|
||||
canvas2.scale(1.0f, (float) Math.sin(d));
|
||||
String str = strArr[i8];
|
||||
float f2 = this.o;
|
||||
this.i.setTextSize(f2);
|
||||
this.j.setTextSize(f2);
|
||||
int left = (int) (this.y + (getLeft() * 0.5d));
|
||||
Rect rect = new Rect();
|
||||
this.j.getTextBounds(str, 0, str.length(), rect);
|
||||
int width = rect.width();
|
||||
int width2 = getWidth() - (left * 2);
|
||||
if (width > 0) {
|
||||
left = (int) (left + ((width2 - width) * 0.5d));
|
||||
}
|
||||
int i9 = this.y;
|
||||
if (cos > i9 || this.q + cos < i9) {
|
||||
int i10 = this.z;
|
||||
if (cos > i10 || this.q + cos < i10) {
|
||||
if (cos >= this.y) {
|
||||
int i11 = this.q;
|
||||
if (cos + i11 <= this.z) {
|
||||
canvas2.clipRect(0, 0, this.G, (int) (i11 * this.v));
|
||||
canvas2.drawText(strArr[i8], left, this.q, this.j);
|
||||
this.f = this.n.indexOf(strArr[i8]);
|
||||
if (i8 == 3 && this.f == 0) {
|
||||
this.j.getTextBounds(strArr[i8], 0, strArr[i8].length(), new Rect());
|
||||
this.L = left + r2.width() + 25.0f;
|
||||
this.M = this.q;
|
||||
}
|
||||
}
|
||||
}
|
||||
canvas2.clipRect(0, 0, this.G, (int) (this.q * this.v));
|
||||
if (i8 == 1 || i8 == 5) {
|
||||
canvas2.drawText(strArr[i8], left, this.q, this.l);
|
||||
} else {
|
||||
canvas2.drawText(strArr[i8], left, this.q, this.i);
|
||||
}
|
||||
canvas.restore();
|
||||
} else {
|
||||
canvas.save();
|
||||
canvas2.clipRect(0, 0, this.G, this.z - cos);
|
||||
float f3 = left;
|
||||
canvas2.drawText(strArr[i8], f3, this.q, this.j);
|
||||
canvas.restore();
|
||||
canvas.save();
|
||||
canvas2.clipRect(0, this.z - cos, this.G, (int) (this.q * this.v));
|
||||
canvas2.drawText(strArr[i8], f3, this.q, this.i);
|
||||
canvas.restore();
|
||||
}
|
||||
} else {
|
||||
canvas.save();
|
||||
canvas2.clipRect(0, 0, this.G, this.y - cos);
|
||||
float f4 = left;
|
||||
canvas2.drawText(strArr[i8], f4, this.q, this.i);
|
||||
canvas.restore();
|
||||
canvas.save();
|
||||
canvas2.clipRect(0, this.y - cos, this.G, (int) (this.q * this.v));
|
||||
canvas2.drawText(strArr[i8], f4, this.q, this.j);
|
||||
canvas.restore();
|
||||
}
|
||||
canvas.restore();
|
||||
}
|
||||
}
|
||||
if (this.L != 0.0f && this.M != 0.0f) {
|
||||
canvas2.drawText(this.h.getResources().getString(R.string.year_old), this.L, ((this.y + this.z) / 2) + (this.M / 2.0f), this.m);
|
||||
}
|
||||
super.onDraw(canvas);
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
protected void onMeasure(int i, int i2) {
|
||||
c();
|
||||
setMeasuredDimension(this.G, this.D);
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
public boolean onTouchEvent(MotionEvent motionEvent) {
|
||||
int action = motionEvent.getAction();
|
||||
if (action == 0) {
|
||||
this.I = motionEvent.getRawY();
|
||||
} else {
|
||||
if (action != 2) {
|
||||
if (!this.e.onTouchEvent(motionEvent) && motionEvent.getAction() == 1) {
|
||||
e();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
this.J = motionEvent.getRawY();
|
||||
float f = this.I;
|
||||
float f2 = this.J;
|
||||
this.K = f - f2;
|
||||
this.I = f2;
|
||||
this.b = (int) (this.b + this.K);
|
||||
if (!this.x) {
|
||||
int i = this.b;
|
||||
int i2 = this.B;
|
||||
float f3 = this.v;
|
||||
int i3 = this.q;
|
||||
if (i <= ((int) ((-i2) * i3 * f3))) {
|
||||
this.b = (int) ((-i2) * f3 * i3);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.b < ((int) (((this.n.size() - 1) - this.B) * this.v * this.q))) {
|
||||
invalidate();
|
||||
} else {
|
||||
this.b = (int) (((this.n.size() - 1) - this.B) * this.v * this.q);
|
||||
invalidate();
|
||||
}
|
||||
if (!this.e.onTouchEvent(motionEvent) && motionEvent.getAction() == 1) {
|
||||
e();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public final void setArrayList(List list) {
|
||||
this.n = list;
|
||||
c();
|
||||
invalidate();
|
||||
}
|
||||
|
||||
public final void setCurrentItem(int i) {
|
||||
this.B = i;
|
||||
this.b = 0;
|
||||
e();
|
||||
invalidate();
|
||||
}
|
||||
|
||||
public final void setCyclic(boolean z) {
|
||||
this.x = z;
|
||||
}
|
||||
|
||||
public final void setListener(LoopListener loopListener) {
|
||||
this.d = loopListener;
|
||||
}
|
||||
|
||||
public final void setTextSize(float f) {
|
||||
if (f > 0.0f) {
|
||||
this.o = (int) (this.h.getResources().getDisplayMetrics().density * f);
|
||||
}
|
||||
}
|
||||
|
||||
public final void b() {
|
||||
this.x = false;
|
||||
}
|
||||
|
||||
public LoopView(Context context, AttributeSet attributeSet) {
|
||||
super(context, attributeSet);
|
||||
a(context);
|
||||
}
|
||||
|
||||
public LoopView(Context context, AttributeSet attributeSet, int i) {
|
||||
super(context, attributeSet, i);
|
||||
a(context);
|
||||
}
|
||||
|
||||
static void a(LoopView loopView) {
|
||||
loopView.e();
|
||||
}
|
||||
|
||||
protected final void a(float f) {
|
||||
Timer timer = new Timer();
|
||||
this.a = timer;
|
||||
timer.schedule(new LoopTimerTask(this, f, timer), 0L, 20L);
|
||||
}
|
||||
|
||||
protected final void a() {
|
||||
if (this.d != null) {
|
||||
new Handler().postDelayed(new LoopRunnable(this), 200L);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ubt.jimu.user.view.picker;
|
||||
|
||||
import android.view.GestureDetector;
|
||||
import android.view.MotionEvent;
|
||||
import java.util.Timer;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
final class LoopViewGestureListener extends GestureDetector.SimpleOnGestureListener {
|
||||
final LoopView a;
|
||||
|
||||
LoopViewGestureListener(LoopView loopView) {
|
||||
this.a = loopView;
|
||||
}
|
||||
|
||||
@Override // android.view.GestureDetector.SimpleOnGestureListener, android.view.GestureDetector.OnGestureListener
|
||||
public final boolean onDown(MotionEvent motionEvent) {
|
||||
Timer timer = this.a.a;
|
||||
if (timer == null) {
|
||||
return true;
|
||||
}
|
||||
timer.cancel();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override // android.view.GestureDetector.SimpleOnGestureListener, android.view.GestureDetector.OnGestureListener
|
||||
public final boolean onFling(MotionEvent motionEvent, MotionEvent motionEvent2, float f, float f2) {
|
||||
this.a.a(f2);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
65
sources/com/ubt/jimu/user/view/picker/MTimer.java
Normal file
65
sources/com/ubt/jimu/user/view/picker/MTimer.java
Normal file
@@ -0,0 +1,65 @@
|
||||
package com.ubt.jimu.user.view.picker;
|
||||
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
final class MTimer extends TimerTask {
|
||||
int a = Integer.MAX_VALUE;
|
||||
int b = 0;
|
||||
final int c;
|
||||
final Timer d;
|
||||
final LoopView e;
|
||||
|
||||
MTimer(LoopView loopView, int i, Timer timer) {
|
||||
this.e = loopView;
|
||||
this.c = i;
|
||||
this.d = timer;
|
||||
}
|
||||
|
||||
@Override // java.util.TimerTask, java.lang.Runnable
|
||||
public final void run() {
|
||||
if (this.a == Integer.MAX_VALUE) {
|
||||
int i = this.c;
|
||||
if (i < 0) {
|
||||
float f = -i;
|
||||
LoopView loopView = this.e;
|
||||
float f2 = loopView.v;
|
||||
int i2 = loopView.q;
|
||||
if (f > (i2 * f2) / 2.0f) {
|
||||
this.a = (int) (((-f2) * i2) - i);
|
||||
} else {
|
||||
this.a = -i;
|
||||
}
|
||||
} else {
|
||||
float f3 = i;
|
||||
LoopView loopView2 = this.e;
|
||||
float f4 = loopView2.v;
|
||||
int i3 = loopView2.q;
|
||||
if (f3 > (i3 * f4) / 2.0f) {
|
||||
this.a = (int) ((f4 * i3) - i);
|
||||
} else {
|
||||
this.a = -i;
|
||||
}
|
||||
}
|
||||
}
|
||||
int i4 = this.a;
|
||||
this.b = (int) (i4 * 0.1f);
|
||||
if (this.b == 0) {
|
||||
if (i4 < 0) {
|
||||
this.b = -1;
|
||||
} else {
|
||||
this.b = 1;
|
||||
}
|
||||
}
|
||||
if (Math.abs(this.a) <= 0) {
|
||||
this.d.cancel();
|
||||
this.e.c.sendEmptyMessage(3000);
|
||||
} else {
|
||||
LoopView loopView3 = this.e;
|
||||
loopView3.b += this.b;
|
||||
loopView3.c.sendEmptyMessage(1000);
|
||||
this.a -= this.b;
|
||||
}
|
||||
}
|
||||
}
|
||||
27
sources/com/ubt/jimu/user/view/picker/MessageHandler.java
Normal file
27
sources/com/ubt/jimu/user/view/picker/MessageHandler.java
Normal file
@@ -0,0 +1,27 @@
|
||||
package com.ubt.jimu.user.view.picker;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
final class MessageHandler extends Handler {
|
||||
final LoopView a;
|
||||
|
||||
MessageHandler(LoopView loopView) {
|
||||
this.a = loopView;
|
||||
}
|
||||
|
||||
@Override // android.os.Handler
|
||||
public final void handleMessage(Message message) {
|
||||
if (message.what == 1000) {
|
||||
this.a.invalidate();
|
||||
}
|
||||
int i = message.what;
|
||||
if (i == 2000) {
|
||||
LoopView.a(this.a);
|
||||
} else if (i == 3000) {
|
||||
this.a.a();
|
||||
}
|
||||
super.handleMessage(message);
|
||||
}
|
||||
}
|
||||
188
sources/com/ubt/jimu/user/view/setting/AboutJimuActivity.java
Normal file
188
sources/com/ubt/jimu/user/view/setting/AboutJimuActivity.java
Normal file
@@ -0,0 +1,188 @@
|
||||
package com.ubt.jimu.user.view.setting;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import butterknife.ButterKnife;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.cache.Cache;
|
||||
import com.ubt.jimu.base.cache.SharePreferenceHelper;
|
||||
import com.ubt.jimu.base.dialog.JimuSimpleDialog;
|
||||
import com.ubt.jimu.base.entities.UpdateApkEntities;
|
||||
import com.ubt.jimu.update.UpdateManager;
|
||||
import com.ubt.jimu.user.view.setting.AboutJimuActivity;
|
||||
import com.ubt.jimu.utils.PackageHelper;
|
||||
import com.ubt.jimu.widgets.ClickableSpanListener;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class AboutJimuActivity extends BaseActivity {
|
||||
TextView tvHongkong;
|
||||
TextView tvJimuVersion;
|
||||
TextView tvNewVersion;
|
||||
TextView tvPhone;
|
||||
TextView tvStartJimu;
|
||||
TextView tvStartUcare;
|
||||
TextView tvUpdateNow;
|
||||
TextView tvVersionDesc;
|
||||
LinearLayout xlChina;
|
||||
LinearLayout xlStartJimu;
|
||||
|
||||
/* renamed from: com.ubt.jimu.user.view.setting.AboutJimuActivity$1, reason: invalid class name */
|
||||
class AnonymousClass1 implements View.OnClickListener {
|
||||
AnonymousClass1() {
|
||||
}
|
||||
|
||||
@Override // android.view.View.OnClickListener
|
||||
public void onClick(View view) {
|
||||
String string = AboutJimuActivity.this.getResources().getString(R.string.version_details);
|
||||
if (TextUtils.isEmpty(string)) {
|
||||
return;
|
||||
}
|
||||
AboutJimuActivity aboutJimuActivity = AboutJimuActivity.this;
|
||||
JimuSimpleDialog buildSimpleDialog = JimuSimpleDialog.buildSimpleDialog(aboutJimuActivity, aboutJimuActivity.getString(R.string.ok), null, AboutJimuActivity.this.getString(R.string.version_desc), string, 19, null, new DialogInterface.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.a
|
||||
@Override // android.content.DialogInterface.OnClickListener
|
||||
public final void onClick(DialogInterface dialogInterface, int i) {
|
||||
dialogInterface.dismiss();
|
||||
}
|
||||
});
|
||||
AboutJimuActivity.this.tvVersionDesc.setEnabled(false);
|
||||
buildSimpleDialog.setOnDismissListener(new JimuSimpleDialog.OnDismissListener() { // from class: com.ubt.jimu.user.view.setting.AboutJimuActivity.1.1
|
||||
@Override // com.ubt.jimu.base.dialog.JimuSimpleDialog.OnDismissListener
|
||||
public void onDismiss(Dialog dialog) {
|
||||
AboutJimuActivity.this.tvVersionDesc.setEnabled(true);
|
||||
}
|
||||
});
|
||||
buildSimpleDialog.show();
|
||||
}
|
||||
}
|
||||
|
||||
private void D0() {
|
||||
Intent intent = new Intent("android.intent.action.DIAL", Uri.parse("tel:" + this.tvPhone.getText().toString()));
|
||||
intent.setFlags(268435456);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
private void bindClick() {
|
||||
this.xlStartJimu.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.c
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
AboutJimuActivity.this.a(view);
|
||||
}
|
||||
});
|
||||
this.tvStartUcare.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.d
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
AboutJimuActivity.this.b(view);
|
||||
}
|
||||
});
|
||||
this.tvPhone.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.e
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
AboutJimuActivity.this.c(view);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
PackageHelper.a("CHANNEL_ID");
|
||||
this.tvJimuVersion.setText(String.format("Jimu %s", "3.9.6.75"));
|
||||
this.xlChina.setVisibility(0);
|
||||
String string = getString(R.string.version_desc);
|
||||
com.ubt.jimu.utils.TextUtils.a(this.tvVersionDesc, string, string, new ClickableSpanListener(new AnonymousClass1(), true, getResources().getColor(R.color.txt_287EF1)));
|
||||
String string2 = getString(R.string.update_now);
|
||||
com.ubt.jimu.utils.TextUtils.a(this.tvUpdateNow, string2, string2, new ClickableSpanListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.AboutJimuActivity.2
|
||||
|
||||
/* renamed from: com.ubt.jimu.user.view.setting.AboutJimuActivity$2$1, reason: invalid class name */
|
||||
class AnonymousClass1 implements UpdateManager.UpdateCallback {
|
||||
AnonymousClass1() {
|
||||
}
|
||||
|
||||
public /* synthetic */ void a() {
|
||||
AboutJimuActivity.this.tvUpdateNow.setEnabled(true);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.update.UpdateManager.UpdateCallback
|
||||
public void a(UpdateApkEntities updateApkEntities) {
|
||||
AboutJimuActivity.this.tvUpdateNow.post(new Runnable() { // from class: com.ubt.jimu.user.view.setting.b
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
AboutJimuActivity.AnonymousClass2.AnonymousClass1.this.a();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.view.View.OnClickListener
|
||||
public void onClick(View view) {
|
||||
UpdateManager.c().a((Activity) AboutJimuActivity.this, (UpdateManager.UpdateCallback) new AnonymousClass1(), true);
|
||||
AboutJimuActivity.this.tvUpdateNow.setEnabled(false);
|
||||
}
|
||||
}, true, getResources().getColor(R.color.txt_287EF1)));
|
||||
if (Cache.getInstance().getSettings().getBoolean(SharePreferenceHelper.SP_KEY_APP_NEED_UPDATE, false).booleanValue()) {
|
||||
this.tvUpdateNow.setVisibility(0);
|
||||
} else {
|
||||
this.tvUpdateNow.setVisibility(8);
|
||||
}
|
||||
}
|
||||
|
||||
private void o(String str) {
|
||||
Intent intent = new Intent("android.intent.action.SEND");
|
||||
intent.setType("message/rfc822");
|
||||
intent.putExtra("android.intent.extra.EMAIL", new String[]{str});
|
||||
intent.putExtra("android.intent.extra.SUBJECT", "您的建议");
|
||||
intent.putExtra("android.intent.extra.TEXT", "我们很希望能得到您的建议!!!");
|
||||
startActivity(Intent.createChooser(intent, "Select email application."));
|
||||
}
|
||||
|
||||
public static void start(Context context) {
|
||||
context.startActivity(new Intent(context, (Class<?>) AboutJimuActivity.class));
|
||||
}
|
||||
|
||||
public /* synthetic */ void a(View view) {
|
||||
o(this.tvStartJimu.getText().toString());
|
||||
}
|
||||
|
||||
public /* synthetic */ void b(View view) {
|
||||
o(this.tvStartUcare.getText().toString());
|
||||
}
|
||||
|
||||
public /* synthetic */ void c(View view) {
|
||||
D0();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_aboutjimu);
|
||||
ButterKnife.a(this);
|
||||
initData();
|
||||
bindClick();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onDestroy() {
|
||||
UpdateManager.c().a();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.FragmentActivity, android.app.Activity, androidx.core.app.ActivityCompat.OnRequestPermissionsResultCallback
|
||||
public void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) {
|
||||
super.onRequestPermissionsResult(i, strArr, iArr);
|
||||
if (iArr[0] == 0) {
|
||||
D0();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
public void relayout() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.ubt.jimu.user.view.setting;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.ubt.jimu.R;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class AboutJimuActivity_ViewBinding implements Unbinder {
|
||||
private AboutJimuActivity b;
|
||||
|
||||
public AboutJimuActivity_ViewBinding(AboutJimuActivity aboutJimuActivity, View view) {
|
||||
this.b = aboutJimuActivity;
|
||||
aboutJimuActivity.tvJimuVersion = (TextView) Utils.b(view, R.id.tv_jimu_version, "field 'tvJimuVersion'", TextView.class);
|
||||
aboutJimuActivity.tvNewVersion = (TextView) Utils.b(view, R.id.tvNewVersion, "field 'tvNewVersion'", TextView.class);
|
||||
aboutJimuActivity.tvUpdateNow = (TextView) Utils.b(view, R.id.tvUpdateNow, "field 'tvUpdateNow'", TextView.class);
|
||||
aboutJimuActivity.xlChina = (LinearLayout) Utils.b(view, R.id.xl_china, "field 'xlChina'", LinearLayout.class);
|
||||
aboutJimuActivity.tvPhone = (TextView) Utils.b(view, R.id.tv_phone, "field 'tvPhone'", TextView.class);
|
||||
aboutJimuActivity.tvStartUcare = (TextView) Utils.b(view, R.id.tv_start_ucare, "field 'tvStartUcare'", TextView.class);
|
||||
aboutJimuActivity.xlStartJimu = (LinearLayout) Utils.b(view, R.id.xl_start_jimu, "field 'xlStartJimu'", LinearLayout.class);
|
||||
aboutJimuActivity.tvStartJimu = (TextView) Utils.b(view, R.id.tv_start_jimu, "field 'tvStartJimu'", TextView.class);
|
||||
aboutJimuActivity.tvHongkong = (TextView) Utils.b(view, R.id.tv_hongkong, "field 'tvHongkong'", TextView.class);
|
||||
aboutJimuActivity.tvVersionDesc = (TextView) Utils.b(view, R.id.tvVersionDesc, "field 'tvVersionDesc'", TextView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
AboutJimuActivity aboutJimuActivity = this.b;
|
||||
if (aboutJimuActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
aboutJimuActivity.tvJimuVersion = null;
|
||||
aboutJimuActivity.tvNewVersion = null;
|
||||
aboutJimuActivity.tvUpdateNow = null;
|
||||
aboutJimuActivity.xlChina = null;
|
||||
aboutJimuActivity.tvPhone = null;
|
||||
aboutJimuActivity.tvStartUcare = null;
|
||||
aboutJimuActivity.xlStartJimu = null;
|
||||
aboutJimuActivity.tvStartJimu = null;
|
||||
aboutJimuActivity.tvHongkong = null;
|
||||
aboutJimuActivity.tvVersionDesc = null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.ubt.jimu.user.view.setting;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.community.view.popwindow.BasePopwindow;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class ExitLoginPopupwindow extends BasePopwindow {
|
||||
public ExitLoginPopupwindow(Activity activity) {
|
||||
super(activity);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.community.view.popwindow.BasePopwindow
|
||||
public int a() {
|
||||
return R.layout.pop_exit_login;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.community.view.popwindow.BasePopwindow
|
||||
public void b() {
|
||||
TextView textView = (TextView) this.b.findViewById(R.id.tv_confirm);
|
||||
TextView textView2 = (TextView) this.b.findViewById(R.id.tv_logout);
|
||||
TextView textView3 = (TextView) this.b.findViewById(R.id.tv_cancel);
|
||||
textView.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.f
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
ExitLoginPopupwindow.this.c(view);
|
||||
}
|
||||
});
|
||||
textView2.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.g
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
ExitLoginPopupwindow.this.d(view);
|
||||
}
|
||||
});
|
||||
textView3.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.h
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
ExitLoginPopupwindow.this.e(view);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public /* synthetic */ void c(View view) {
|
||||
((SettingActivity) this.a).I0();
|
||||
((SettingActivity) this.a).l();
|
||||
dismiss();
|
||||
}
|
||||
|
||||
public /* synthetic */ void d(View view) {
|
||||
((SettingActivity) this.a).H0();
|
||||
dismiss();
|
||||
}
|
||||
|
||||
public /* synthetic */ void e(View view) {
|
||||
dismiss();
|
||||
}
|
||||
}
|
||||
154
sources/com/ubt/jimu/user/view/setting/FeedbackActivity.java
Normal file
154
sources/com/ubt/jimu/user/view/setting/FeedbackActivity.java
Normal file
@@ -0,0 +1,154 @@
|
||||
package com.ubt.jimu.user.view.setting;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import butterknife.ButterKnife;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.cache.Cache;
|
||||
import com.ubt.jimu.base.entities.FeedbackEntities;
|
||||
import com.ubt.jimu.base.http.ApiObserver;
|
||||
import com.ubt.jimu.user.view.LoginActivity;
|
||||
import com.ubtech.utils.StringUtils;
|
||||
import com.ubtech.view.widget.ToastView;
|
||||
import com.ubtech.view.widget.UButton;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class FeedbackActivity extends BaseActivity {
|
||||
private ApiObserver<FeedbackEntities> a;
|
||||
EditText etEmail;
|
||||
EditText etFeedback;
|
||||
TextView tvService;
|
||||
TextView tvSuggests;
|
||||
LinearLayout xlEmail;
|
||||
LinearLayout xlFeedback;
|
||||
LinearLayout xlSelected;
|
||||
UButton xlSend;
|
||||
|
||||
private void E0() {
|
||||
String trim = this.etEmail.getText().toString().trim();
|
||||
if (StringUtils.e(trim)) {
|
||||
return;
|
||||
}
|
||||
if (!StringUtils.d(trim)) {
|
||||
ToastView.a(this, getString(R.string.error_email_format), ToastView.Type.ERROR).a();
|
||||
} else {
|
||||
if (StringUtils.e(this.etFeedback.getText().toString().trim())) {
|
||||
return;
|
||||
}
|
||||
if (Cache.getInstance().getUser() == null) {
|
||||
LoginActivity.start(this);
|
||||
} else {
|
||||
this.tvSuggests.isSelected();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void bindClick() {
|
||||
this.xlSend.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.m
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
FeedbackActivity.this.a(view);
|
||||
}
|
||||
});
|
||||
this.tvSuggests.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.i
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
FeedbackActivity.this.b(view);
|
||||
}
|
||||
});
|
||||
this.tvService.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.k
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
FeedbackActivity.this.c(view);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
this.tvSuggests.setSelected(true);
|
||||
this.tvService.setSelected(false);
|
||||
this.a = new ApiObserver<FeedbackEntities>(null) { // from class: com.ubt.jimu.user.view.setting.FeedbackActivity.1
|
||||
@Override // com.ubt.jimu.base.http.ApiObserver, io.reactivex.Observer
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void onNext(FeedbackEntities feedbackEntities) {
|
||||
((BaseActivity) FeedbackActivity.this).mJAlertDialog.dismiss();
|
||||
if (feedbackEntities.isStatus()) {
|
||||
FeedbackActivity feedbackActivity = FeedbackActivity.this;
|
||||
ToastView.a(feedbackActivity, feedbackActivity.getString(R.string.feedback_success), ToastView.Type.SUCCESS).a();
|
||||
} else {
|
||||
FeedbackActivity feedbackActivity2 = FeedbackActivity.this;
|
||||
ToastView.a(feedbackActivity2, feedbackActivity2.getString(R.string.failed_to_send_feedback), ToastView.Type.SUCCESS).a();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.http.ApiObserver, io.reactivex.Observer
|
||||
public void onSubscribe(Disposable disposable) {
|
||||
super.onSubscribe(disposable);
|
||||
FeedbackActivity feedbackActivity = FeedbackActivity.this;
|
||||
feedbackActivity.showLoading(feedbackActivity.getString(R.string.feedback_sending));
|
||||
}
|
||||
};
|
||||
this.a.setRequestComplete(new ApiObserver.RequestComplete() { // from class: com.ubt.jimu.user.view.setting.j
|
||||
@Override // com.ubt.jimu.base.http.ApiObserver.RequestComplete
|
||||
public final void onComplete() {
|
||||
FeedbackActivity.this.D0();
|
||||
}
|
||||
});
|
||||
this.a.setNetErrorListener(new ApiObserver.NetErrorListener() { // from class: com.ubt.jimu.user.view.setting.l
|
||||
@Override // com.ubt.jimu.base.http.ApiObserver.NetErrorListener
|
||||
public final void onError(Throwable th) {
|
||||
FeedbackActivity.this.d(th);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void start(Context context) {
|
||||
context.startActivity(new Intent(context, (Class<?>) FeedbackActivity.class));
|
||||
}
|
||||
|
||||
public /* synthetic */ void D0() {
|
||||
this.mJAlertDialog.dismiss();
|
||||
}
|
||||
|
||||
public /* synthetic */ void b(View view) {
|
||||
this.tvSuggests.setSelected(true);
|
||||
this.tvService.setSelected(false);
|
||||
this.tvSuggests.setTextColor(getResources().getColor(R.color.bg_white));
|
||||
this.tvService.setTextColor(getResources().getColor(R.color.bg_596F80));
|
||||
}
|
||||
|
||||
public /* synthetic */ void c(View view) {
|
||||
this.tvSuggests.setSelected(false);
|
||||
this.tvService.setSelected(true);
|
||||
this.tvSuggests.setTextColor(getResources().getColor(R.color.bg_596F80));
|
||||
this.tvService.setTextColor(getResources().getColor(R.color.bg_white));
|
||||
}
|
||||
|
||||
public /* synthetic */ void d(Throwable th) {
|
||||
this.mJAlertDialog.dismiss();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_feedback);
|
||||
ButterKnife.a(this);
|
||||
initData();
|
||||
bindClick();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
public void relayout() {
|
||||
}
|
||||
|
||||
public /* synthetic */ void a(View view) {
|
||||
E0();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.ubt.jimu.user.view.setting;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubtech.view.widget.UButton;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class FeedbackActivity_ViewBinding implements Unbinder {
|
||||
private FeedbackActivity b;
|
||||
|
||||
public FeedbackActivity_ViewBinding(FeedbackActivity feedbackActivity, View view) {
|
||||
this.b = feedbackActivity;
|
||||
feedbackActivity.xlSelected = (LinearLayout) Utils.b(view, R.id.xl_selected, "field 'xlSelected'", LinearLayout.class);
|
||||
feedbackActivity.tvSuggests = (TextView) Utils.b(view, R.id.tv_suggests, "field 'tvSuggests'", TextView.class);
|
||||
feedbackActivity.tvService = (TextView) Utils.b(view, R.id.tv_service, "field 'tvService'", TextView.class);
|
||||
feedbackActivity.xlEmail = (LinearLayout) Utils.b(view, R.id.xl_email, "field 'xlEmail'", LinearLayout.class);
|
||||
feedbackActivity.etEmail = (EditText) Utils.b(view, R.id.et_email, "field 'etEmail'", EditText.class);
|
||||
feedbackActivity.xlFeedback = (LinearLayout) Utils.b(view, R.id.xl_feedback, "field 'xlFeedback'", LinearLayout.class);
|
||||
feedbackActivity.xlSend = (UButton) Utils.b(view, R.id.xl_send, "field 'xlSend'", UButton.class);
|
||||
feedbackActivity.etFeedback = (EditText) Utils.b(view, R.id.et_feedback, "field 'etFeedback'", EditText.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
FeedbackActivity feedbackActivity = this.b;
|
||||
if (feedbackActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
feedbackActivity.xlSelected = null;
|
||||
feedbackActivity.tvSuggests = null;
|
||||
feedbackActivity.tvService = null;
|
||||
feedbackActivity.xlEmail = null;
|
||||
feedbackActivity.etEmail = null;
|
||||
feedbackActivity.xlFeedback = null;
|
||||
feedbackActivity.xlSend = null;
|
||||
feedbackActivity.etFeedback = null;
|
||||
}
|
||||
}
|
||||
498
sources/com/ubt/jimu/user/view/setting/SettingActivity.java
Normal file
498
sources/com/ubt/jimu/user/view/setting/SettingActivity.java
Normal file
@@ -0,0 +1,498 @@
|
||||
package com.ubt.jimu.user.view.setting;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import butterknife.ButterKnife;
|
||||
import com.alibaba.android.arouter.facade.Postcard;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.cache.Cache;
|
||||
import com.ubt.jimu.base.cache.Constants;
|
||||
import com.ubt.jimu.base.cache.SharePreferenceHelper;
|
||||
import com.ubt.jimu.base.db.user.UserDbHandler;
|
||||
import com.ubt.jimu.base.dialog.JimuSimpleDialog;
|
||||
import com.ubt.jimu.base.entities.ApiStatus;
|
||||
import com.ubt.jimu.base.entities.User;
|
||||
import com.ubt.jimu.base.event.MessageEvent;
|
||||
import com.ubt.jimu.course.repository.CourseResult;
|
||||
import com.ubt.jimu.unity.ModelType;
|
||||
import com.ubt.jimu.user.contract.SettingContract$Presenter;
|
||||
import com.ubt.jimu.user.contract.SettingContract$View;
|
||||
import com.ubt.jimu.user.presenter.SettingPresenter;
|
||||
import com.ubt.jimu.utils.ExternalOverFroyoUtils;
|
||||
import com.ubt.jimu.utils.GlideUtils;
|
||||
import com.ubt.jimu.utils.LocaleUtils;
|
||||
import com.ubt.jimu.utils.NetWorkUtil;
|
||||
import com.ubt.jimu.utils.ShortcutHelper;
|
||||
import com.ubt.jimu.utils.SystemUtils;
|
||||
import com.ubt.jimu.widgets.JAlertDialog;
|
||||
import com.ubtech.utils.FileHelper;
|
||||
import com.ubtech.view.dialog.SimpleDialog;
|
||||
import com.ubtech.view.widget.UButton;
|
||||
import com.ubtrobot.ubtlib.analytics.JimuAnalytics;
|
||||
import java.io.File;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class SettingActivity extends BaseActivity implements SettingContract$View {
|
||||
private SharePreferenceHelper a;
|
||||
private SettingPresenter b;
|
||||
ImageView cbAuto;
|
||||
CheckBox cbInfo;
|
||||
CheckBox cbProtect;
|
||||
CheckBox cbWifi;
|
||||
private Dialog d;
|
||||
TextView tvAutoConnect;
|
||||
TextView tvCacheSize;
|
||||
TextView tvClearCache;
|
||||
TextView tvInfo;
|
||||
TextView tvNewVersion;
|
||||
TextView tvProtect;
|
||||
TextView tvWifi;
|
||||
RelativeLayout xlAbout;
|
||||
RelativeLayout xlInput;
|
||||
UButton xlLogout;
|
||||
RelativeLayout xlModify;
|
||||
RelativeLayout xlPolicy;
|
||||
RelativeLayout xlQa;
|
||||
ViewGroup xlTc;
|
||||
RelativeLayout xlTech;
|
||||
RelativeLayout xlTo;
|
||||
LinearLayout xlTop;
|
||||
RelativeLayout xrAutoConnect;
|
||||
RelativeLayout xrClearCache;
|
||||
RelativeLayout xrInfo;
|
||||
RelativeLayout xrProtect;
|
||||
RelativeLayout xrWifi;
|
||||
private Handler c = new Handler();
|
||||
private boolean e = true;
|
||||
private ExitLoginPopupwindow f = null;
|
||||
|
||||
private void K0() {
|
||||
JAlertDialog jAlertDialog = this.mJAlertDialog;
|
||||
if (jAlertDialog != null) {
|
||||
jAlertDialog.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
private void bindClick() {
|
||||
this.xrClearCache.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.e0
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
SettingActivity.this.h(view);
|
||||
}
|
||||
});
|
||||
this.xrWifi.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.y
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
SettingActivity.this.j(view);
|
||||
}
|
||||
});
|
||||
this.cbWifi.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { // from class: com.ubt.jimu.user.view.setting.u
|
||||
@Override // android.widget.CompoundButton.OnCheckedChangeListener
|
||||
public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
|
||||
SettingActivity.this.b(compoundButton, z);
|
||||
}
|
||||
});
|
||||
this.xrInfo.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.q
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
SettingActivity.this.k(view);
|
||||
}
|
||||
});
|
||||
this.cbInfo.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { // from class: com.ubt.jimu.user.view.setting.a0
|
||||
@Override // android.widget.CompoundButton.OnCheckedChangeListener
|
||||
public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
|
||||
SettingActivity.this.c(compoundButton, z);
|
||||
}
|
||||
});
|
||||
this.xrProtect.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.d0
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
SettingActivity.this.l(view);
|
||||
}
|
||||
});
|
||||
this.cbProtect.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { // from class: com.ubt.jimu.user.view.setting.r
|
||||
@Override // android.widget.CompoundButton.OnCheckedChangeListener
|
||||
public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
|
||||
SettingActivity.this.a(compoundButton, z);
|
||||
}
|
||||
});
|
||||
this.xrAutoConnect.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.g0
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
SettingActivity.this.a(view);
|
||||
}
|
||||
});
|
||||
this.xlTo.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.n
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
SettingActivity.this.b(view);
|
||||
}
|
||||
});
|
||||
this.xlModify.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.c0
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
SettingActivity.this.c(view);
|
||||
}
|
||||
});
|
||||
this.xlTech.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.w
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
SettingActivity.this.d(view);
|
||||
}
|
||||
});
|
||||
this.xlAbout.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.o
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
SettingActivity.this.e(view);
|
||||
}
|
||||
});
|
||||
this.xlQa.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.v
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
SettingActivity.this.f(view);
|
||||
}
|
||||
});
|
||||
this.xlLogout.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.f0
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
SettingActivity.this.g(view);
|
||||
}
|
||||
});
|
||||
this.xlTc.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.i0
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
SettingActivity.m(view);
|
||||
}
|
||||
});
|
||||
this.xlPolicy.setOnClickListener(new View.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.z
|
||||
@Override // android.view.View.OnClickListener
|
||||
public final void onClick(View view) {
|
||||
SettingActivity.this.i(view);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
this.b = new SettingPresenter(this, this);
|
||||
this.a = new SharePreferenceHelper();
|
||||
this.cbWifi.setChecked(this.a.getBoolean(SharePreferenceHelper.SP_KEY_WIFI_VIEW, true).booleanValue());
|
||||
this.cbInfo.setChecked(this.a.getBoolean(SharePreferenceHelper.SP_KEY_INFO_TO, true).booleanValue());
|
||||
this.cbProtect.setChecked(this.a.getBoolean(SharePreferenceHelper.SP_KEY_ELECTRICITY_PROTECT, true).booleanValue());
|
||||
this.e = this.a.getBoolean(SharePreferenceHelper.SP_KEY_AUTO_CONNECT, true).booleanValue();
|
||||
this.cbAuto.setBackgroundResource(this.e ? R.drawable.checkbox_on_xxx : R.drawable.checkbox_off_xxx);
|
||||
this.tvCacheSize.setText(GlideUtils.a(this));
|
||||
User user = UserDbHandler.getUser();
|
||||
if (user == null || user.getUserId() <= 0) {
|
||||
this.xlLogout.setVisibility(8);
|
||||
} else {
|
||||
this.xlLogout.setVisibility(0);
|
||||
}
|
||||
if (LocaleUtils.f()) {
|
||||
this.xlTc.setVisibility(0);
|
||||
} else {
|
||||
this.xlTc.setVisibility(8);
|
||||
}
|
||||
if (Cache.getInstance().getSettings().getBoolean(SharePreferenceHelper.SP_KEY_APP_NEED_UPDATE, false).booleanValue()) {
|
||||
this.tvNewVersion.setVisibility(0);
|
||||
} else {
|
||||
this.tvNewVersion.setVisibility(8);
|
||||
}
|
||||
findViewById(R.id.xl_test).setVisibility(8);
|
||||
}
|
||||
|
||||
static /* synthetic */ void m(View view) {
|
||||
User user = UserDbHandler.getUser();
|
||||
if (user == null) {
|
||||
Postcard a = ARouter.b().a("/page/web");
|
||||
a.a("type", 0);
|
||||
a.a("url", "https://support.qq.com/product/33918");
|
||||
a.a("zoom", 60);
|
||||
a.t();
|
||||
return;
|
||||
}
|
||||
String str = "nickname=" + user.getNickName() + "&avatar=" + user.getUserImage() + "&openid=" + user.getUserOnlyId();
|
||||
Postcard a2 = ARouter.b().a("/page/web");
|
||||
a2.a("type", 1);
|
||||
a2.a("url", "https://support.qq.com/product/33918");
|
||||
a2.a("data", str.getBytes());
|
||||
a2.a("zoom", 60);
|
||||
a2.t();
|
||||
}
|
||||
|
||||
public /* synthetic */ void D0() {
|
||||
this.xrProtect.setPressed(false);
|
||||
}
|
||||
|
||||
public /* synthetic */ void E0() {
|
||||
this.xrWifi.setPressed(false);
|
||||
}
|
||||
|
||||
public /* synthetic */ void F0() {
|
||||
this.xrInfo.setPressed(false);
|
||||
}
|
||||
|
||||
public /* synthetic */ void G0() {
|
||||
this.xlLogout.setVisibility(8);
|
||||
}
|
||||
|
||||
public void H0() {
|
||||
new JimuSimpleDialog.Builder(this).cancel(R.string.cancel).ok(R.string.ok).content(R.string.delete_account).onCancel(new DialogInterface.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.x
|
||||
@Override // android.content.DialogInterface.OnClickListener
|
||||
public final void onClick(DialogInterface dialogInterface, int i) {
|
||||
dialogInterface.dismiss();
|
||||
}
|
||||
}).onOk(new DialogInterface.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.b0
|
||||
@Override // android.content.DialogInterface.OnClickListener
|
||||
public final void onClick(DialogInterface dialogInterface, int i) {
|
||||
SettingActivity.this.a(dialogInterface, i);
|
||||
}
|
||||
}).build().show();
|
||||
}
|
||||
|
||||
public void I0() {
|
||||
this.b.a(Cache.getInstance().getUserToken());
|
||||
}
|
||||
|
||||
public void J0() {
|
||||
this.d = new SimpleDialog.Builder(this).a(R.string.search_cancel_return).a(new DialogInterface.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.SettingActivity.2
|
||||
@Override // android.content.DialogInterface.OnClickListener
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
SettingActivity.this.e = true;
|
||||
dialogInterface.dismiss();
|
||||
}
|
||||
}).d(R.string.confirm).b(new DialogInterface.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.SettingActivity.1
|
||||
@Override // android.content.DialogInterface.OnClickListener
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
SettingActivity.this.e = false;
|
||||
SettingActivity.this.b.a(SettingActivity.this.e);
|
||||
if (SettingActivity.this.a != null) {
|
||||
SettingActivity.this.a.put(SharePreferenceHelper.SP_KEY_AUTO_CONNECT, false);
|
||||
}
|
||||
SettingActivity.this.cbAuto.setBackgroundResource(R.drawable.checkbox_off_xxx);
|
||||
dialogInterface.dismiss();
|
||||
}
|
||||
}).b(R.string.bluetooth_auto_connect_tips).a();
|
||||
this.d.show();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.SettingContract$View
|
||||
public void c(ApiStatus apiStatus) {
|
||||
}
|
||||
|
||||
public /* synthetic */ void d(View view) {
|
||||
this.b.g(this.xlTech);
|
||||
}
|
||||
|
||||
public /* synthetic */ void e(View view) {
|
||||
this.b.a(this.xlAbout);
|
||||
}
|
||||
|
||||
public /* synthetic */ void f(View view) {
|
||||
this.b.e(this.xlQa);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.SettingContract$View
|
||||
public void f(String str) {
|
||||
}
|
||||
|
||||
public /* synthetic */ void g(View view) {
|
||||
if (this.f == null) {
|
||||
this.f = new ExitLoginPopupwindow(this);
|
||||
}
|
||||
this.f.b(this.xlTop);
|
||||
}
|
||||
|
||||
public /* synthetic */ void h(View view) {
|
||||
File externalCacheDir = getExternalCacheDir();
|
||||
if (externalCacheDir == null) {
|
||||
return;
|
||||
}
|
||||
String absolutePath = externalCacheDir.getAbsolutePath();
|
||||
if (new File(absolutePath).exists()) {
|
||||
SystemUtils.b(absolutePath);
|
||||
this.tvCacheSize.setText(GlideUtils.a(this));
|
||||
}
|
||||
}
|
||||
|
||||
public /* synthetic */ void i(View view) {
|
||||
ThePolicyActivity.a(this, 10);
|
||||
}
|
||||
|
||||
public /* synthetic */ void j(View view) {
|
||||
this.cbWifi.setChecked(!r2.isChecked());
|
||||
this.b.d(this.xrWifi);
|
||||
}
|
||||
|
||||
public /* synthetic */ void k(View view) {
|
||||
this.cbInfo.setChecked(!r2.isChecked());
|
||||
this.b.f(this.xrInfo);
|
||||
}
|
||||
|
||||
public /* synthetic */ void l(View view) {
|
||||
this.cbProtect.setChecked(!r2.isChecked());
|
||||
this.b.b(this.xrProtect);
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onActivityResult(int i, int i2, Intent intent) {
|
||||
super.onActivityResult(i, i2, intent);
|
||||
if (i == 10 && i2 == -1) {
|
||||
this.xlLogout.post(new Runnable() { // from class: com.ubt.jimu.user.view.setting.h0
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
SettingActivity.this.G0();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_setting);
|
||||
ButterKnife.a(this);
|
||||
initData();
|
||||
bindClick();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
|
||||
protected void onDestroy() {
|
||||
Handler handler = this.c;
|
||||
if (handler != null) {
|
||||
handler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
this.b.a();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.SettingContract$View
|
||||
public boolean r() {
|
||||
return this.cbProtect.isChecked();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
public void relayout() {
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.SettingContract$View
|
||||
public boolean s() {
|
||||
return this.cbWifi.isChecked();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.SettingContract$View
|
||||
public boolean t() {
|
||||
return this.cbInfo.isChecked();
|
||||
}
|
||||
|
||||
public /* synthetic */ void b(CompoundButton compoundButton, boolean z) {
|
||||
this.b.d(this.xrWifi);
|
||||
this.c.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.setting.s
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
SettingActivity.this.E0();
|
||||
}
|
||||
}, 20L);
|
||||
}
|
||||
|
||||
public /* synthetic */ void c(CompoundButton compoundButton, boolean z) {
|
||||
this.b.f(this.xrInfo);
|
||||
this.c.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.setting.t
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
SettingActivity.this.F0();
|
||||
}
|
||||
}, 20L);
|
||||
}
|
||||
|
||||
public /* synthetic */ void a(CompoundButton compoundButton, boolean z) {
|
||||
this.b.b(this.xrProtect);
|
||||
this.c.postDelayed(new Runnable() { // from class: com.ubt.jimu.user.view.setting.p
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
SettingActivity.this.D0();
|
||||
}
|
||||
}, 20L);
|
||||
}
|
||||
|
||||
public void l() {
|
||||
Cache.getInstance().clearCacheUser();
|
||||
UserDbHandler.clearUser();
|
||||
this.xlLogout.setVisibility(8);
|
||||
ShortcutHelper.a(this);
|
||||
EventBus.b().b(new MessageEvent(1));
|
||||
}
|
||||
|
||||
public /* synthetic */ void b(View view) {
|
||||
this.b.h(this.xlTo);
|
||||
}
|
||||
|
||||
public /* synthetic */ void c(View view) {
|
||||
this.b.c(this.xlModify);
|
||||
JimuAnalytics.b().a("click_P15_1");
|
||||
}
|
||||
|
||||
public /* synthetic */ void a(View view) {
|
||||
if (this.e) {
|
||||
J0();
|
||||
return;
|
||||
}
|
||||
this.e = true;
|
||||
SharePreferenceHelper sharePreferenceHelper = this.a;
|
||||
if (sharePreferenceHelper != null) {
|
||||
sharePreferenceHelper.put(SharePreferenceHelper.SP_KEY_AUTO_CONNECT, true);
|
||||
}
|
||||
this.b.a(this.e);
|
||||
this.cbAuto.setBackgroundResource(this.e ? R.drawable.checkbox_on_xxx : R.drawable.checkbox_off_xxx);
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.SettingContract$View
|
||||
public void h() {
|
||||
K0();
|
||||
toast(getString(R.string.tips_delete_account_failed));
|
||||
}
|
||||
|
||||
@Override // com.ubtech.view.BaseView
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void setPresenter(SettingContract$Presenter settingContract$Presenter) {
|
||||
this.b = (SettingPresenter) settingContract$Presenter;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.SettingContract$View
|
||||
public void a(ApiStatus apiStatus) {
|
||||
K0();
|
||||
if (apiStatus.getCode() != 0 && !CourseResult.SUCCESS.equals(apiStatus.getMessage())) {
|
||||
toast(getString(R.string.tips_delete_account_failed));
|
||||
return;
|
||||
}
|
||||
File file = new File(ExternalOverFroyoUtils.a(this, (ModelType) null) + String.format(Constants.USER_HOME, Cache.getInstance().getUserId()));
|
||||
if (file.exists()) {
|
||||
FileHelper.a(file);
|
||||
}
|
||||
l();
|
||||
toast(getString(R.string.tips_delete_account));
|
||||
}
|
||||
|
||||
public /* synthetic */ void a(DialogInterface dialogInterface, int i) {
|
||||
if (!NetWorkUtil.b(this)) {
|
||||
toast(getString(R.string.network_error));
|
||||
return;
|
||||
}
|
||||
dialogInterface.dismiss();
|
||||
showLoading(getString(R.string.logoff) + "...");
|
||||
this.b.b();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.ubt.jimu.user.view.setting;
|
||||
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubtech.view.widget.UButton;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class SettingActivity_ViewBinding implements Unbinder {
|
||||
private SettingActivity b;
|
||||
|
||||
public SettingActivity_ViewBinding(SettingActivity settingActivity, View view) {
|
||||
this.b = settingActivity;
|
||||
settingActivity.xlInput = (RelativeLayout) Utils.b(view, R.id.xl_input, "field 'xlInput'", RelativeLayout.class);
|
||||
settingActivity.xrClearCache = (RelativeLayout) Utils.b(view, R.id.xr_clear_cache, "field 'xrClearCache'", RelativeLayout.class);
|
||||
settingActivity.tvClearCache = (TextView) Utils.b(view, R.id.tv_clear_cache, "field 'tvClearCache'", TextView.class);
|
||||
settingActivity.tvCacheSize = (TextView) Utils.b(view, R.id.tv_cache_size, "field 'tvCacheSize'", TextView.class);
|
||||
settingActivity.xrWifi = (RelativeLayout) Utils.b(view, R.id.xr_wifi, "field 'xrWifi'", RelativeLayout.class);
|
||||
settingActivity.tvWifi = (TextView) Utils.b(view, R.id.tv_wifi, "field 'tvWifi'", TextView.class);
|
||||
settingActivity.cbWifi = (CheckBox) Utils.b(view, R.id.cb_wifi, "field 'cbWifi'", CheckBox.class);
|
||||
settingActivity.xrInfo = (RelativeLayout) Utils.b(view, R.id.xr_info, "field 'xrInfo'", RelativeLayout.class);
|
||||
settingActivity.tvInfo = (TextView) Utils.b(view, R.id.tv_info, "field 'tvInfo'", TextView.class);
|
||||
settingActivity.cbInfo = (CheckBox) Utils.b(view, R.id.cb_info, "field 'cbInfo'", CheckBox.class);
|
||||
settingActivity.xrProtect = (RelativeLayout) Utils.b(view, R.id.xr_protect, "field 'xrProtect'", RelativeLayout.class);
|
||||
settingActivity.tvProtect = (TextView) Utils.b(view, R.id.tv_protect, "field 'tvProtect'", TextView.class);
|
||||
settingActivity.cbProtect = (CheckBox) Utils.b(view, R.id.cb_protect, "field 'cbProtect'", CheckBox.class);
|
||||
settingActivity.xrAutoConnect = (RelativeLayout) Utils.b(view, R.id.xr_auto_connect, "field 'xrAutoConnect'", RelativeLayout.class);
|
||||
settingActivity.tvAutoConnect = (TextView) Utils.b(view, R.id.tv_auto_connect, "field 'tvAutoConnect'", TextView.class);
|
||||
settingActivity.cbAuto = (ImageView) Utils.b(view, R.id.cb_auto, "field 'cbAuto'", ImageView.class);
|
||||
settingActivity.xlTo = (RelativeLayout) Utils.b(view, R.id.xl_to, "field 'xlTo'", RelativeLayout.class);
|
||||
settingActivity.xlModify = (RelativeLayout) Utils.b(view, R.id.xl_modify, "field 'xlModify'", RelativeLayout.class);
|
||||
settingActivity.xlTech = (RelativeLayout) Utils.b(view, R.id.xl_tech, "field 'xlTech'", RelativeLayout.class);
|
||||
settingActivity.xlAbout = (RelativeLayout) Utils.b(view, R.id.xl_about, "field 'xlAbout'", RelativeLayout.class);
|
||||
settingActivity.tvNewVersion = (TextView) Utils.b(view, R.id.tv_new_version, "field 'tvNewVersion'", TextView.class);
|
||||
settingActivity.xlQa = (RelativeLayout) Utils.b(view, R.id.xl_qa, "field 'xlQa'", RelativeLayout.class);
|
||||
settingActivity.xlLogout = (UButton) Utils.b(view, R.id.xl_logout, "field 'xlLogout'", UButton.class);
|
||||
settingActivity.xlTop = (LinearLayout) Utils.b(view, R.id.xl_top, "field 'xlTop'", LinearLayout.class);
|
||||
settingActivity.xlPolicy = (RelativeLayout) Utils.b(view, R.id.xl_policy, "field 'xlPolicy'", RelativeLayout.class);
|
||||
settingActivity.xlTc = (ViewGroup) Utils.b(view, R.id.xl_tc, "field 'xlTc'", ViewGroup.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
SettingActivity settingActivity = this.b;
|
||||
if (settingActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
settingActivity.xlInput = null;
|
||||
settingActivity.xrClearCache = null;
|
||||
settingActivity.tvClearCache = null;
|
||||
settingActivity.tvCacheSize = null;
|
||||
settingActivity.xrWifi = null;
|
||||
settingActivity.tvWifi = null;
|
||||
settingActivity.cbWifi = null;
|
||||
settingActivity.xrInfo = null;
|
||||
settingActivity.tvInfo = null;
|
||||
settingActivity.cbInfo = null;
|
||||
settingActivity.xrProtect = null;
|
||||
settingActivity.tvProtect = null;
|
||||
settingActivity.cbProtect = null;
|
||||
settingActivity.xrAutoConnect = null;
|
||||
settingActivity.tvAutoConnect = null;
|
||||
settingActivity.cbAuto = null;
|
||||
settingActivity.xlTo = null;
|
||||
settingActivity.xlModify = null;
|
||||
settingActivity.xlTech = null;
|
||||
settingActivity.xlAbout = null;
|
||||
settingActivity.tvNewVersion = null;
|
||||
settingActivity.xlQa = null;
|
||||
settingActivity.xlLogout = null;
|
||||
settingActivity.xlTop = null;
|
||||
settingActivity.xlPolicy = null;
|
||||
settingActivity.xlTc = null;
|
||||
}
|
||||
}
|
||||
79
sources/com/ubt/jimu/user/view/setting/TeachActivity.java
Normal file
79
sources/com/ubt/jimu/user/view/setting/TeachActivity.java
Normal file
@@ -0,0 +1,79 @@
|
||||
package com.ubt.jimu.user.view.setting;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.ButterKnife;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.JimuApplication;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.blockly.Utils;
|
||||
import com.ubt.jimu.user.model.TeachModel;
|
||||
import com.ubt.jimu.user.view.adapter.TeachAdapter;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class TeachActivity extends BaseActivity {
|
||||
private String b;
|
||||
RecyclerView ryTeach;
|
||||
private String a = "jimu/help";
|
||||
private String c = "https://jimu.ubtrobot.com/%s/%s/%s";
|
||||
|
||||
private void initData() {
|
||||
this.b = JimuApplication.l().c();
|
||||
if (!this.b.equals("CN")) {
|
||||
this.b = "EN";
|
||||
}
|
||||
ArrayList arrayList = new ArrayList();
|
||||
TeachModel teachModel = new TeachModel();
|
||||
teachModel.a(getString(R.string.setting_study_component));
|
||||
teachModel.b(String.format(this.c, this.a, this.b, "Component.html"));
|
||||
arrayList.add(teachModel);
|
||||
TeachModel teachModel2 = new TeachModel();
|
||||
teachModel2.a(getString(R.string.setting_study_assemble));
|
||||
teachModel2.b(String.format(this.c, this.a, this.b, "Build.html"));
|
||||
teachModel2.c("https://video.ubtrobot.com/jimu/videos/build.mp4");
|
||||
teachModel2.a(R.drawable.setting_study_play);
|
||||
arrayList.add(teachModel2);
|
||||
TeachModel teachModel3 = new TeachModel();
|
||||
teachModel3.b(String.format(this.c, this.a, this.b, "Connect.html"));
|
||||
teachModel3.a(getString(R.string.setting_study_connect));
|
||||
arrayList.add(teachModel3);
|
||||
TeachModel teachModel4 = new TeachModel();
|
||||
teachModel4.b(String.format(this.c, this.a, this.b, "Actions.html"));
|
||||
teachModel4.c("https://video.ubtrobot.com/jimu/videos/action.mp4");
|
||||
teachModel4.a(R.drawable.setting_study_play);
|
||||
teachModel4.a(getString(R.string.setting_study_actions));
|
||||
arrayList.add(teachModel4);
|
||||
TeachModel teachModel5 = new TeachModel();
|
||||
teachModel5.a(getString(R.string.setting_study_programming));
|
||||
teachModel5.b(Utils.getBlocklyHelpUrl());
|
||||
arrayList.add(teachModel5);
|
||||
TeachAdapter teachAdapter = new TeachAdapter(this, arrayList);
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, 0, false);
|
||||
this.ryTeach.setAdapter(teachAdapter);
|
||||
this.ryTeach.setLayoutManager(linearLayoutManager);
|
||||
}
|
||||
|
||||
private void initEvent() {
|
||||
}
|
||||
|
||||
public static void start(Context context) {
|
||||
context.startActivity(new Intent(context, (Class<?>) TeachActivity.class));
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_teach);
|
||||
ButterKnife.a(this);
|
||||
initData();
|
||||
initEvent();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity
|
||||
public void relayout() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ubt.jimu.user.view.setting;
|
||||
|
||||
import android.view.View;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.Utils;
|
||||
import com.ubt.jimu.R;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class TeachActivity_ViewBinding implements Unbinder {
|
||||
private TeachActivity b;
|
||||
|
||||
public TeachActivity_ViewBinding(TeachActivity teachActivity, View view) {
|
||||
this.b = teachActivity;
|
||||
teachActivity.ryTeach = (RecyclerView) Utils.b(view, R.id.ry_teach, "field 'ryTeach'", RecyclerView.class);
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
TeachActivity teachActivity = this.b;
|
||||
if (teachActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
teachActivity.ryTeach = null;
|
||||
}
|
||||
}
|
||||
161
sources/com/ubt/jimu/user/view/setting/ThePolicyActivity.java
Normal file
161
sources/com/ubt/jimu/user/view/setting/ThePolicyActivity.java
Normal file
@@ -0,0 +1,161 @@
|
||||
package com.ubt.jimu.user.view.setting;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import butterknife.ButterKnife;
|
||||
import com.ubt.jimu.BaseActivity;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubt.jimu.base.HelpFragment;
|
||||
import com.ubt.jimu.base.cache.Cache;
|
||||
import com.ubt.jimu.base.cache.Constants;
|
||||
import com.ubt.jimu.base.db.user.UserDbHandler;
|
||||
import com.ubt.jimu.base.dialog.JimuSimpleDialog;
|
||||
import com.ubt.jimu.base.entities.ApiStatus;
|
||||
import com.ubt.jimu.base.event.MessageEvent;
|
||||
import com.ubt.jimu.course.repository.CourseResult;
|
||||
import com.ubt.jimu.unity.ModelType;
|
||||
import com.ubt.jimu.user.Constant;
|
||||
import com.ubt.jimu.user.contract.SettingContract$Presenter;
|
||||
import com.ubt.jimu.user.contract.SettingContract$View;
|
||||
import com.ubt.jimu.user.presenter.SettingPresenter;
|
||||
import com.ubt.jimu.utils.ExternalOverFroyoUtils;
|
||||
import com.ubt.jimu.utils.NetWorkUtil;
|
||||
import com.ubt.jimu.utils.ShortcutHelper;
|
||||
import com.ubtech.utils.FileHelper;
|
||||
import com.ubtech.view.widget.UButton;
|
||||
import java.io.File;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class ThePolicyActivity extends BaseActivity implements HelpFragment.OnHelpFragmentInteractionListener, SettingContract$View {
|
||||
private HelpFragment a;
|
||||
private SettingPresenter b;
|
||||
protected UButton btnLogout;
|
||||
|
||||
public static void a(Activity activity, int i) {
|
||||
activity.startActivityForResult(new Intent(activity, (Class<?>) ThePolicyActivity.class), i);
|
||||
}
|
||||
|
||||
public /* synthetic */ void D0() {
|
||||
setResult(-1);
|
||||
}
|
||||
|
||||
@Override // com.ubtech.view.BaseView
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
public void setPresenter(SettingContract$Presenter settingContract$Presenter) {
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.SettingContract$View
|
||||
public void c(ApiStatus apiStatus) {
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.SettingContract$View
|
||||
public void f(String str) {
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.SettingContract$View
|
||||
public void h() {
|
||||
hideLoading();
|
||||
toast(getString(R.string.tips_delete_account_failed));
|
||||
}
|
||||
|
||||
public void l() {
|
||||
Cache.getInstance().clearCacheUser();
|
||||
UserDbHandler.clearUser();
|
||||
ShortcutHelper.a(this);
|
||||
EventBus.b().b(new MessageEvent(1));
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.BaseActivity, com.ubt.jimu.ScreenRotationManageActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, androidx.core.app.ComponentActivity, android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
setContentView(R.layout.activity_the_policy);
|
||||
ButterKnife.a(this);
|
||||
this.b = new SettingPresenter(this, this);
|
||||
if (getIntent().getIntExtra("POLICY_TYPE", 0) == 1) {
|
||||
this.a = HelpFragment.newInstance(Constant.b, " ", 0);
|
||||
} else {
|
||||
this.a = HelpFragment.newInstance(Constant.a, " ", 0);
|
||||
}
|
||||
this.a.setListener(this);
|
||||
FragmentTransaction a = getSupportFragmentManager().a();
|
||||
a.b(R.id.llContainer, this.a);
|
||||
a.a();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.base.HelpFragment.OnHelpFragmentInteractionListener
|
||||
public void onHelpPageBack() {
|
||||
finish();
|
||||
}
|
||||
|
||||
protected void onLogout(View view) {
|
||||
new JimuSimpleDialog.Builder(this).cancel(R.string.cancel).ok(R.string.ok).content(R.string.tips_close_account).onCancel(new DialogInterface.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.l0
|
||||
@Override // android.content.DialogInterface.OnClickListener
|
||||
public final void onClick(DialogInterface dialogInterface, int i) {
|
||||
dialogInterface.dismiss();
|
||||
}
|
||||
}).onOk(new DialogInterface.OnClickListener() { // from class: com.ubt.jimu.user.view.setting.k0
|
||||
@Override // android.content.DialogInterface.OnClickListener
|
||||
public final void onClick(DialogInterface dialogInterface, int i) {
|
||||
ThePolicyActivity.this.a(dialogInterface, i);
|
||||
}
|
||||
}).cancleBtnBg(R.drawable.shape_cor50_bg92a7b6).build().show();
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.SettingContract$View
|
||||
public boolean r() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.SettingContract$View
|
||||
public boolean s() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.SettingContract$View
|
||||
public boolean t() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void a(Activity activity, int i, int i2) {
|
||||
Intent intent = new Intent(activity, (Class<?>) ThePolicyActivity.class);
|
||||
intent.putExtra("POLICY_TYPE", i);
|
||||
activity.startActivityForResult(intent, i2);
|
||||
}
|
||||
|
||||
public /* synthetic */ void a(DialogInterface dialogInterface, int i) {
|
||||
if (!NetWorkUtil.b(this)) {
|
||||
toast(getString(R.string.network_error));
|
||||
return;
|
||||
}
|
||||
this.b.b();
|
||||
dialogInterface.dismiss();
|
||||
showLoading(getString(R.string.logoff) + "...");
|
||||
}
|
||||
|
||||
@Override // com.ubt.jimu.user.contract.SettingContract$View
|
||||
public void a(ApiStatus apiStatus) {
|
||||
hideLoading();
|
||||
if (apiStatus.getCode() != 0 && !CourseResult.SUCCESS.equals(apiStatus.getMessage())) {
|
||||
toast(getString(R.string.tips_delete_account_failed));
|
||||
return;
|
||||
}
|
||||
File file = new File(ExternalOverFroyoUtils.a(this, (ModelType) null) + String.format(Constants.USER_HOME, Cache.getInstance().getUserId()));
|
||||
if (file.exists()) {
|
||||
FileHelper.a(file);
|
||||
}
|
||||
l();
|
||||
toast(getString(R.string.tips_delete_account));
|
||||
this.btnLogout.setVisibility(8);
|
||||
this.btnLogout.post(new Runnable() { // from class: com.ubt.jimu.user.view.setting.j0
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
ThePolicyActivity.this.D0();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.ubt.jimu.user.view.setting;
|
||||
|
||||
import android.view.View;
|
||||
import butterknife.Unbinder;
|
||||
import butterknife.internal.DebouncingOnClickListener;
|
||||
import butterknife.internal.Utils;
|
||||
import com.ubt.jimu.R;
|
||||
import com.ubtech.view.widget.UButton;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class ThePolicyActivity_ViewBinding implements Unbinder {
|
||||
private ThePolicyActivity b;
|
||||
private View c;
|
||||
|
||||
public ThePolicyActivity_ViewBinding(final ThePolicyActivity thePolicyActivity, View view) {
|
||||
this.b = thePolicyActivity;
|
||||
View a = Utils.a(view, R.id.btnLogout, "field 'btnLogout' and method 'onLogout'");
|
||||
thePolicyActivity.btnLogout = (UButton) Utils.a(a, R.id.btnLogout, "field 'btnLogout'", UButton.class);
|
||||
this.c = a;
|
||||
a.setOnClickListener(new DebouncingOnClickListener(this) { // from class: com.ubt.jimu.user.view.setting.ThePolicyActivity_ViewBinding.1
|
||||
@Override // butterknife.internal.DebouncingOnClickListener
|
||||
public void doClick(View view2) {
|
||||
thePolicyActivity.onLogout(view2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // butterknife.Unbinder
|
||||
public void unbind() {
|
||||
ThePolicyActivity thePolicyActivity = this.b;
|
||||
if (thePolicyActivity == null) {
|
||||
throw new IllegalStateException("Bindings already cleared.");
|
||||
}
|
||||
this.b = null;
|
||||
thePolicyActivity.btnLogout = null;
|
||||
this.c.setOnClickListener(null);
|
||||
this.c = null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user