Merge remote-tracking branch 'origin/develop_new' into develop_new
# Conflicts: # app/src/main/res/layout/fragment_game_home.xml
This commit is contained in:
@@ -705,7 +705,7 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
|
||||
CrashReport.setUserId(this, uid + "");
|
||||
|
||||
Log.i("checkLostUser", "onLogin");
|
||||
checkLostUser(uid);
|
||||
// checkLostUser(uid);
|
||||
|
||||
//登录完成后检查更新
|
||||
AppUpgradeHelper.checkAppUpgrade(this);
|
||||
|
@@ -19,6 +19,7 @@ import com.yizhuan.erban.community.widget.DynamicNickDetailWidget;
|
||||
import com.yizhuan.erban.home.bean.HomePlayInfo;
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtilsV2;
|
||||
import com.yizhuan.xchat_android_core.community.dynamic.DynamicModel;
|
||||
import com.yizhuan.xchat_android_core.utils.TextUtils;
|
||||
import com.yizhuan.xchat_android_core.utils.net.DontWarnObserver;
|
||||
import com.yizhuan.xchat_android_core.utils.net.RxHelper;
|
||||
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
|
||||
@@ -42,6 +43,7 @@ public class HomePlayAdapter extends BaseQuickAdapter<HomePlayInfo, BaseViewHold
|
||||
return;
|
||||
}
|
||||
//tag
|
||||
helper.setVisible(R.id.iv_tag,!TextUtils.isEmptyText(item.getRoomTag()));
|
||||
ImageLoadUtilsV2.loadImage(helper.getView(R.id.iv_tag), item.getRoomTag());
|
||||
|
||||
helper.setText(R.id.tv_online_num,item.getOnlineNum()+"")
|
||||
|
@@ -11,10 +11,8 @@ import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.coorchice.library.utils.LogUtils;
|
||||
import com.trello.rxlifecycle2.android.FragmentEvent;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseFragment;
|
||||
import com.yizhuan.erban.common.NoDataFragment;
|
||||
import com.yizhuan.erban.home.adapter.HomeRoomFragmentAdapter;
|
||||
import com.yizhuan.erban.home.bean.HomeTabMapInfo;
|
||||
|
@@ -17,6 +17,7 @@ import android.view.WindowManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.coorchice.library.utils.LogUtils;
|
||||
import com.ishumei.smantifraud.SmAntiFraud;
|
||||
import com.netease.mobsec.rjsb.watchman;
|
||||
import com.orhanobut.logger.Logger;
|
||||
@@ -61,6 +62,7 @@ public class LoginCodeActivity extends BaseLoginAct {
|
||||
private String mPhone;
|
||||
private boolean isSuperAdmin = false;
|
||||
private CodeDownDescTimer timer;
|
||||
private static final String TYPE_SMS = "1";
|
||||
|
||||
public static void start(Context context,String phone) {
|
||||
Intent intent = new Intent(context, LoginCodeActivity.class);
|
||||
@@ -160,9 +162,8 @@ public class LoginCodeActivity extends BaseLoginAct {
|
||||
if (mPhone.length() != 11){
|
||||
return;
|
||||
}
|
||||
String deviceId = DeviceUuidFactory.getDeviceId(this);
|
||||
AuthModel.get()
|
||||
.sendLoginCode(mPhone, deviceId)
|
||||
.sendLoginCode(mPhone,TYPE_SMS)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||
.subscribe(new SingleObserver<String>() {
|
||||
@@ -182,7 +183,7 @@ public class LoginCodeActivity extends BaseLoginAct {
|
||||
public void onError(Throwable e) {
|
||||
toast(e.getMessage());
|
||||
// finish();
|
||||
Logger.e(TAG, "获取短信失败!");
|
||||
LogUtils.e( "获取短信失败!");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -88,7 +88,6 @@ public class AddUserInfoFragment extends BaseFragment
|
||||
tvRandomNick = view.findViewById(R.id.tv_random_nick);
|
||||
rgGender = view.findViewById(R.id.rg_gender);
|
||||
rbMale = view.findViewById(R.id.rb_male);
|
||||
tvRandomNick.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
|
||||
@@ -120,8 +119,7 @@ public class AddUserInfoFragment extends BaseFragment
|
||||
private void init() {
|
||||
tvNick.setFilters(new InputFilter[]{new InputFilter.LengthFilter(8)});
|
||||
// 设置默认昵称
|
||||
tvNick.setText(R.string.text_default_nick);
|
||||
tvRandomNick.setVisibility(View.VISIBLE);
|
||||
setRandomNick();
|
||||
rgGender.setOnCheckedChangeListener((radioGroup, i) -> gender = i == rbMale.getId()?UserInfo.GENDER_MALE:UserInfo.GENDER_FEMALE);
|
||||
}
|
||||
|
||||
@@ -152,6 +150,15 @@ public class AddUserInfoFragment extends BaseFragment
|
||||
case R.id.tv_random_nick:
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_INFORMATION_RANDOM_NAME,
|
||||
"随机昵称");
|
||||
setRandomNick();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void setRandomNick(){
|
||||
tvRandomNick.setEnabled(false);
|
||||
UserModel.get().getRandomNick()
|
||||
.compose(bindUntilEvent(FragmentEvent.DESTROY_VIEW))
|
||||
@@ -169,11 +176,6 @@ public class AddUserInfoFragment extends BaseFragment
|
||||
}
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void commit() {
|
||||
|
@@ -344,7 +344,7 @@ public class SearchActivity extends BaseMvpActivity<ISearchView, SearchPresenter
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
if (TextUtils.isEmpty(s.toString())) {
|
||||
if (s.length()<=0) {
|
||||
ivClearText.setVisibility(View.GONE);
|
||||
showHistory();
|
||||
} else {
|
||||
@@ -462,7 +462,9 @@ public class SearchActivity extends BaseMvpActivity<ISearchView, SearchPresenter
|
||||
|
||||
private void clearSearch(){
|
||||
llSearchDetail.setVisibility(View.GONE);
|
||||
if (roomFrg == null){ return;}
|
||||
roomFrg.clear();
|
||||
if (userFrg == null){return;}
|
||||
userFrg.clear();
|
||||
}
|
||||
|
||||
|
@@ -74,6 +74,9 @@ public class SearchDetailFragment extends BaseMvpFragment<ISearchView, SearchPre
|
||||
}
|
||||
|
||||
public void clear(){
|
||||
if (searchAdapter == null){
|
||||
return;
|
||||
}
|
||||
searchAdapter.setNewData(null);
|
||||
}
|
||||
|
||||
|
@@ -101,7 +101,6 @@
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:paddingEnd="@dimen/dp_9"
|
||||
android:paddingStart="@dimen/dp_9"
|
||||
android:paddingTop="@dimen/dp_15"
|
||||
android:textColor="@color/white"
|
||||
@@ -123,12 +122,13 @@
|
||||
android:id="@+id/tv_random_nick"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:visibility="visible"
|
||||
android:visibility="gone"
|
||||
android:src="@mipmap/ic_random_nick"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_nick"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginEnd="75dp"
|
||||
android:paddingTop="@dimen/dp_15"
|
||||
android:paddingStart="9dp"
|
||||
android:paddingEnd="@dimen/dp_9"
|
||||
/>
|
||||
|
||||
<View
|
||||
|
@@ -6,7 +6,6 @@
|
||||
<data>
|
||||
|
||||
<import type="android.view.View"/>
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="android.view.View.OnClickListener" />
|
||||
@@ -59,12 +58,13 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/dp_13"
|
||||
android:src="@mipmap/ic_home_ranking"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:onClick="@{click}"
|
||||
android:layout_marginStart="@dimen/dp_13"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:src="@mipmap/ic_home_ranking" />
|
||||
android:onClick="@{click}"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_to_sign_in"
|
||||
@@ -74,42 +74,42 @@
|
||||
android:layout_marginStart="@dimen/dp_11"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:visibility="gone"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_to_sign_in"
|
||||
android:visibility="gone" />
|
||||
android:src="@drawable/icon_to_sign_in" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.yizhuan.erban.utils.VpSwipeRefreshLayout
|
||||
android:id="@+id/refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title_bar">
|
||||
android:focusable="true"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp">
|
||||
|
||||
<com.yizhuan.erban.home.widget.StickyScrollView
|
||||
android:id="@+id/sticky_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/sticky_scroll_view">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_follow_room"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:paddingTop="@dimen/dp_8"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:itemCount="1"
|
||||
tools:listitem="@layout/item_home_concerns" />
|
||||
/>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -117,59 +117,64 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toBottomOf="@id/rv_follow_room"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:paddingStart="14dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:paddingBottom="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/rv_follow_room">
|
||||
|
||||
>
|
||||
<com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator
|
||||
android:id="@+id/magic_indicator"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_38"
|
||||
android:layout_weight="1"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_room_more"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_weight="1"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_room_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableRight="@drawable/arrow_right_white"
|
||||
android:drawablePadding="@dimen/dp_3"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:paddingTop="@dimen/dp_5"
|
||||
android:text="更多房间"
|
||||
app:layout_constraintTop_toTopOf="@id/magic_indicator"
|
||||
app:layout_constraintStart_toEndOf="@id/magic_indicator"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@id/magic_indicator"
|
||||
android:paddingTop="@dimen/dp_5"
|
||||
android:onClick="@{click}"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/magic_indicator"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/magic_indicator"
|
||||
app:layout_constraintTop_toTopOf="@id/magic_indicator" />
|
||||
android:drawablePadding="@dimen/dp_3"
|
||||
android:drawableRight="@drawable/arrow_right_white"
|
||||
/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
<com.yizhuan.erban.ui.widget.ContentWrapViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_indicator"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_indicator" />
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_roll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:background="@color/color_F9F9F9"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_pager"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_pager">
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
>
|
||||
|
||||
<com.jude.rollviewpager.RollPagerView
|
||||
android:id="@+id/roll_view"
|
||||
@@ -178,10 +183,12 @@
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
app:rollviewpager_hint_gravity="left"
|
||||
app:rollviewpager_hint_paddingBottom="8dp" />
|
||||
app:rollviewpager_hint_paddingBottom="8dp"
|
||||
/>
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
|
||||
<!-- </com.google.android.material.appbar.CollapsingToolbarLayout>-->
|
||||
|
||||
<FrameLayout
|
||||
@@ -190,8 +197,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/color_F9F9F9"
|
||||
android:tag="sticky"
|
||||
app:layout_constraintTop_toBottomOf="@+id/fl_roll_view">
|
||||
|
||||
app:layout_constraintTop_toBottomOf="@+id/fl_roll_view"
|
||||
>
|
||||
<com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator
|
||||
android:id="@+id/magic_indicator_bottom"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -207,7 +214,15 @@
|
||||
android:id="@+id/view_pager_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/fl_indicator" />
|
||||
app:layout_constraintBottom_toTopOf="@+id/view"
|
||||
app:layout_constraintTop_toBottomOf="@id/fl_indicator"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
<!-- </androidx.coordinatorlayout.widget.CoordinatorLayout>-->
|
||||
|
||||
@@ -219,9 +234,9 @@
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_marginBottom="@dimen/dp_15"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:visibility="gone">
|
||||
|
||||
<com.jude.rollviewpager.RollPagerView
|
||||
android:id="@+id/activity_img"
|
||||
|
@@ -20,6 +20,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="13.5dp"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.yizhuan.erban.common.widget.StatusLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/status_layout">
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_F9F9F9" />
|
||||
android:background="@color/color_F9F9F9"
|
||||
android:paddingBottom="@dimen/dp_60"/>
|
||||
|
||||
|
||||
</com.yizhuan.erban.common.widget.StatusLayout>
|
Binary file not shown.
Before Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 26 KiB |
@@ -6,12 +6,13 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="@drawable/bg_login">
|
||||
|
||||
<ImageView
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/iv_logo_quick_pass"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="108dp"
|
||||
android:src="@drawable/splash_logo"
|
||||
android:layout_marginTop="60dp"
|
||||
android:layout_width="97dp"
|
||||
android:layout_height="97dp"
|
||||
android:src="@mipmap/app_logo"
|
||||
android:layout_marginTop="90dp"
|
||||
app:riv_corner_radius="15dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -21,10 +22,10 @@
|
||||
android:id="@+id/tv_slogan_quick_pass"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="9.5dp"
|
||||
android:text=""
|
||||
android:textSize="@dimen/dp_16"
|
||||
android:textColor="@color/color_B3B3B3"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text="@string/app_name"
|
||||
android:textSize="@dimen/dp_18"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_logo_quick_pass"
|
||||
|
@@ -1324,17 +1324,14 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
* @param phone
|
||||
* @return
|
||||
*/
|
||||
public Single<String> sendLoginCode(String phone, String deviceId) {
|
||||
return api.sendCode(phone, deviceId)
|
||||
public Single<String> sendLoginCode(String phone, String type) {
|
||||
return api.sendCode(phone, type)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.map(new Function<ServiceResult<String>, String>() {
|
||||
@Override
|
||||
public String apply(ServiceResult<String> objectServiceResult) throws Exception {
|
||||
.map(objectServiceResult -> {
|
||||
if (!objectServiceResult.isSuccess()) {
|
||||
throw new RuntimeException(objectServiceResult.getMessage());
|
||||
}
|
||||
return objectServiceResult.getData();
|
||||
}
|
||||
return objectServiceResult.getMessage();
|
||||
}).observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
@@ -1585,11 +1582,11 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
* 发送验证码
|
||||
*
|
||||
* @param phone
|
||||
* @param deviceInfo
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
@POST("sms/login/code")
|
||||
Single<ServiceResult<String>> sendCode(@Query("phone") String phone, @Query("deviceInfo") String deviceInfo);
|
||||
@POST("sms/getCode")
|
||||
Single<ServiceResult<String>> sendCode(@Query("mobile") String phone, @Query("type") String type);
|
||||
|
||||
/**
|
||||
* 验证验证码
|
||||
|
Reference in New Issue
Block a user