Commit a3d14d7a authored by jyx's avatar jyx

编辑基础资料,详细资料

parent 5f3f98a1
......@@ -183,4 +183,8 @@ public class TitleBarLayout extends LinearLayout implements ITitleBarLayout {
public UnreadCountTextView getUnreadCountTextView() {
return unreadCountTextView;
}
public void setBgColor(int color) {
mTitleLayout.setBackgroundColor(color);
}
}
......@@ -11,7 +11,6 @@ import android.view.inputmethod.InputMethodManager;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.tencent.qcloud.tuicore.TUIThemeManager;
import com.tencent.qcloud.tuikit.timcommon.R;
public class BaseLightActivity extends AppCompatActivity {
......@@ -19,19 +18,22 @@ public class BaseLightActivity extends AppCompatActivity {
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
getWindow().setStatusBarColor(
getResources().getColor(TUIThemeManager.getAttrResId(this, com.tencent.qcloud.tuicore.R.attr.core_header_start_color)));
getWindow().setNavigationBarColor(getResources().getColor(R.color.navigation_bar_color));
int vis = getWindow().getDecorView().getSystemUiVisibility();
vis |= View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
vis |= View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
getWindow().getDecorView().setSystemUiVisibility(vis);
}
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
// getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
// getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
// getWindow().setStatusBarColor(getResources().getColor(R.color.black_font_color));
//// getWindow().setStatusBarColor(
//// getResources().getColor(TUIThemeManager.getAttrResId(this, com.tencent.qcloud.tuicore.R.attr.core_header_start_color)));
// getWindow().setNavigationBarColor(getResources().getColor(R.color.black_font_color));
// int vis = getWindow().getDecorView().getSystemUiVisibility();
//// vis |= View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
// vis |= View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
//
// getWindow().getDecorView().setSystemUiVisibility(vis);
// }
}
@Override
public void finish() {
hideSoftInput();
......
......@@ -3,8 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/page_title_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/read_dot_bg">
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/page_title_left_group"
......
......@@ -442,6 +442,4 @@ public abstract class TUIBaseChatFragment extends Fragment {
}
public abstract ChatPresenter getPresenter();
public abstract TitleBarLayout getTitleBarLayout();
}
package com.tencent.qcloud.tuikit.tuichat.classicui.page;
import android.os.Handler;
import android.os.Looper;
import android.view.View;
import com.tencent.qcloud.tuicore.util.ToastUtil;
import com.tencent.qcloud.tuikit.timcommon.component.TitleBarLayout;
import com.tencent.qcloud.tuikit.timcommon.component.interfaces.ITitleBarLayout;
import com.tencent.qcloud.tuikit.tuichat.R;
import com.tencent.qcloud.tuikit.tuichat.bean.C2CChatInfo;
import com.tencent.qcloud.tuikit.tuichat.bean.ChatInfo;
......@@ -36,22 +30,6 @@ public class TUIC2CChatActivity extends TUIBaseChatActivity {
chatFragment = new TUIC2CChatFragment();
chatFragment.setChatInfo((C2CChatInfo) chatInfo);
getSupportFragmentManager().beginTransaction().replace(R.id.empty_view, chatFragment).commitAllowingStateLoss();
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
@Override
public void run() {
chatFragment.getTitleBarLayout().getRightGroup().setVisibility(View.VISIBLE);
chatFragment.getInputView().setInterceptTouchEvent(true);
chatFragment.getInputView().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
TitleBarLayout titleBarLayout = chatFragment.getTitleBarLayout();
titleBarLayout.setTitle("哈哈哈", ITitleBarLayout.Position.MIDDLE);
}
}, 1000);
}
public TUIC2CChatFragment getChatFragment() {
......
......@@ -13,6 +13,7 @@ import com.tencent.qcloud.tuicore.interfaces.TUIExtensionEventListener;
import com.tencent.qcloud.tuicore.interfaces.TUIExtensionInfo;
import com.tencent.qcloud.tuikit.timcommon.component.TitleBarLayout;
import com.tencent.qcloud.tuikit.tuichat.bean.C2CChatInfo;
import com.tencent.qcloud.tuikit.tuichat.classicui.widget.ChatView;
import com.tencent.qcloud.tuikit.tuichat.classicui.widget.input.InputView;
import com.tencent.qcloud.tuikit.tuichat.config.classicui.TUIChatConfigClassic;
import com.tencent.qcloud.tuikit.tuichat.presenter.C2CChatPresenter;
......@@ -103,13 +104,8 @@ public class TUIC2CChatFragment extends TUIBaseChatFragment {
return (C2CChatInfo) chatInfo;
}
@Override
public TitleBarLayout getTitleBarLayout() {
return chatView.getTitleBar();
}
public InputView getInputView() {
return chatView.getInputView();
public ChatView getChatView() {
return chatView;
}
public void setChatInfo(C2CChatInfo c2CChatInfo) {
......
......@@ -129,11 +129,6 @@ public class TUIGroupChatFragment extends TUIBaseChatFragment {
return presenter;
}
@Override
public TitleBarLayout getTitleBarLayout() {
return titleBarLayout;
}
public GroupChatInfo getChatInfo() {
return ((GroupChatInfo) chatInfo);
}
......
......@@ -124,6 +124,8 @@ public class InputView extends LinearLayout implements View.OnClickListener, Tex
private boolean mIsIntercept = false;
protected LinearLayout mInputContainer;
protected FragmentActivity mActivity;
protected View mInputMoreView;
protected ChatInfo mChatInfo;
......@@ -185,6 +187,7 @@ public class InputView extends LinearLayout implements View.OnClickListener, Tex
mActivity = (FragmentActivity) getContext();
inflate(mActivity, R.layout.chat_input_layout, this);
mInputMoreView = findViewById(R.id.more_groups);
mInputContainer = findViewById(R.id.input_container);
mSendAudioButton = findViewById(R.id.chat_voice_input);
mAudioInputSwitchButton = findViewById(R.id.voice_input_switch);
mEmojiInputButton = findViewById(R.id.face_btn);
......@@ -1303,6 +1306,10 @@ public class InputView extends LinearLayout implements View.OnClickListener, Tex
return mChatInfo;
}
public void setBgColor(int color) {
mInputContainer.setBackgroundColor(color);
}
public void setInterceptTouchEvent(boolean isIntercept) {
this.mIsIntercept = isIntercept;
}
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/input_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:background="?attr/chat_input_area_bg"
android:orientation="vertical">
......@@ -12,14 +13,14 @@
android:layout_height="wrap_content"
android:paddingTop="5dp"
android:visibility="gone"
tools:visibility="visible"/>
tools:visibility="visible" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="5dp"
android:gravity="center_vertical">
android:padding="5dp">
<ImageView
android:id="@+id/voice_input_switch"
......@@ -35,16 +36,16 @@
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_weight="1"
android:textAlignment="viewStart"
android:background="@drawable/msg_editor_border"
android:textSize="@dimen/chat_input_text_size"
android:textColor="@color/black"
android:maxHeight="120dp"
android:minHeight="@dimen/chat_input_editor_min_height"
android:focusable="true"
android:focusableInTouchMode="true"
android:maxHeight="120dp"
android:minHeight="@dimen/chat_input_editor_min_height"
android:padding="5dp"
android:textAlignment="viewStart"
android:textColor="@color/black"
android:textCursorDrawable="@drawable/my_cursor"
android:padding="5dp" />
android:textSize="@dimen/chat_input_text_size" />
<Button
android:id="@+id/chat_voice_input"
......@@ -80,15 +81,15 @@
android:layout_width="wrap_content"
android:layout_height="@dimen/chat_input_icon_size"
android:background="@drawable/message_send_border"
android:text="@string/send"
android:gravity="center"
android:maxLines="1"
android:paddingStart="4dp"
android:paddingEnd="4dp"
android:gravity="center"
android:text="@string/send"
android:textColor="#fff"
android:textSize="13sp"
android:visibility="gone"
android:maxLines="1"
tools:visibility="visible"/>
tools:visibility="visible" />
</LinearLayout>
......@@ -96,9 +97,9 @@
android:id="@+id/quote_preview_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:paddingBottom="9.6dp"
tools:visibility="visible"/>
android:visibility="gone"
tools:visibility="visible" />
<RelativeLayout
android:id="@+id/more_groups"
......
......@@ -3,8 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/chat_background_color">
android:layout_height="match_parent">
<com.tencent.qcloud.tuikit.timcommon.component.TitleBarLayout
android:id="@+id/chat_title_bar"
......@@ -63,10 +62,10 @@
<com.tencent.qcloud.tuikit.tuichat.component.pinned.GroupPinnedView
android:id="@+id/group_pinned_message_view"
android:layout_below="@id/chat_group_apply_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"/>
android:layout_below="@id/chat_group_apply_layout"
android:visibility="gone" />
<com.tencent.qcloud.tuikit.tuichat.classicui.widget.message.MessageRecyclerView
android:id="@+id/chat_message_layout"
......@@ -129,20 +128,20 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/shortcut_container"
android:paddingTop="5dp"
android:background="?attr/chat_input_area_bg"
android:paddingTop="5dp"
android:visibility="gone"
tools:visibility="visible"/>
tools:visibility="visible" />
<FrameLayout
android:id="@+id/shortcut_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/chat_input_layout"
android:paddingTop="5dp"
android:background="?attr/chat_input_area_bg"
android:paddingTop="5dp"
android:visibility="gone"
tools:visibility="visible"/>
tools:visibility="visible" />
<com.tencent.qcloud.tuikit.tuichat.classicui.widget.input.InputView
android:id="@+id/chat_input_layout"
......@@ -158,21 +157,21 @@
android:layout_centerInParent="true"
android:background="@drawable/ic_volume_dialog_bg"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="visible">
<TextView
android:id="@+id/voice_count_down_tv"
android:textColor="@color/white"
android:textSize="13sp"
android:layout_marginBottom="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:textColor="@color/white"
android:textDirection="ltr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
android:textSize="13sp" />
<ImageView
android:id="@+id/recording_icon"
......@@ -224,10 +223,10 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5.76dp"
android:text="@string/forward_mode_onebyone"
android:layout_gravity="center_horizontal"
android:layout_marginTop="5.76dp"
android:gravity="center"
android:text="@string/forward_mode_onebyone"
android:textColor="#444444"
android:textSize="11.52sp" />
......@@ -253,10 +252,10 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5.76dp"
android:text="@string/forward_mode_merge"
android:layout_gravity="center_horizontal"
android:layout_marginTop="5.76dp"
android:gravity="center"
android:text="@string/forward_mode_merge"
android:textColor="#444444"
android:textSize="11.52sp" />
......@@ -281,10 +280,10 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5.76dp"
android:text="@string/delete_button"
android:layout_gravity="center_horizontal"
android:layout_marginTop="5.76dp"
android:gravity="center"
android:text="@string/delete_button"
android:textColor="#444444"
android:textSize="11.52sp" />
</LinearLayout>
......
......@@ -6,6 +6,6 @@
<com.tencent.qcloud.tuikit.tuiconversation.classicui.widget.ConversationListLayout
android:id="@+id/conversation_list"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent" />
</LinearLayout>
......@@ -2,23 +2,22 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical"
android:gravity="center" >
android:background="#232122"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="fitStart"
android:src="@drawable/conversation_null_data">
android:src="@drawable/conversation_null_data" />
</ImageView>
<TextView
android:id="@+id/conversation_null_text"
android:layout_marginTop="@dimen/page_margin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/page_margin"
android:text="No message"
android:textColor="@color/black">
</TextView>
android:textColor="@color/white" />
</LinearLayout>
\ No newline at end of file
......@@ -110,7 +110,7 @@
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activitys.MobileLoginActivity"
android:name=".ui.activitys.BindMobileActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:exported="false"
android:launchMode="singleTop"
......@@ -228,27 +228,32 @@
android:screenOrientation="portrait" />
<activity
android:name=".ui.activitys.WriteMoodActivity"
android:name=".ui.activitys.WriteSignatureActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activitys.UserInfoActivity"
android:name=".ui.activitys.RealAuthActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activitys.RealAuthActivity"
android:name=".ui.activitys.UserProfileActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activitys.UserProfileActivity"
android:name=".ui.activitys.UserLabelActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activitys.UserLabelActivity"
android:name=".ui.activitys.EditProfileActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activitys.BasicUserProfileActivity"
android:exported="false"
android:screenOrientation="portrait" />
......
[
{
"sort": "娱乐体育",
"name": [
"影视",
"运动体育",
"音乐",
"模特"
]
},
{
"sort": "工程制造",
"name": [
"建筑",
"土木工程",
"机械制造",
"电子",
"生物医药",
"食品",
"服饰",
"能源"
]
},
{
"sort": "金融保险",
"name": [
"投资",
"股票/基金",
"保险",
"银行",
"信托/担保"
]
},
{
"sort": "交通运输",
"name": [
"互联网",
"IT",
"通讯",
"电信运营",
"网络游戏"
]
},
{
"sort": "文化传播",
"name": [
"媒体出版",
"设计",
"文化传播",
"广告创意",
"动漫",
"公关/会展",
"摄影"
]
},
{
"sort": "公共事业",
"name": [
"医疗",
"法律",
"教育",
"科研",
"公益"
]
},
{
"sort": "商业服务",
"name": [
"咨询",
"个体经营",
"美容美发",
"旅游",
"酒店餐饮",
"贸易",
"汽车",
"物业管理",
"装修/装潢",
"侦探"
]
}
]
\ No newline at end of file
......@@ -10,7 +10,6 @@ import androidx.multidex.MultiDexApplication;
import com.downloader.PRDownloader;
import com.downloader.PRDownloaderConfig;
import com.duben.roseplaylet.ad.TTAdManagerHolder;
import com.duben.roseplaylet.common.AppConfig;
import com.duben.roseplaylet.common.Constant;
import com.duben.roseplaylet.manager.CsjAppLogManager;
import com.duben.roseplaylet.manager.CsjDJXSdkManager;
......@@ -26,7 +25,6 @@ import com.orhanobut.logger.FormatStrategy;
import com.orhanobut.logger.Logger;
import com.orhanobut.logger.PrettyFormatStrategy;
import com.tencent.bugly.crashreport.CrashReport;
import com.tencent.qcloud.tuicore.TUIConfig;
import rx.Scheduler;
import rx.schedulers.Schedulers;
......@@ -98,8 +96,6 @@ public class MintsApplication extends MultiDexApplication {
// bugly
CrashReport.initCrashReport(this, "d035276c5b", BuildConfig.DEBUG);
initIMAppInfo();
}
/**
......@@ -186,8 +182,4 @@ public class MintsApplication extends MultiDexApplication {
e.printStackTrace();
}
}
private void initIMAppInfo() {
TUIConfig.setTUIHostType(TUIConfig.TUI_HOST_TYPE_IMAPP);
}
}
......@@ -40,9 +40,11 @@ object Constant {
const val FRAGMENT_CLICK_FIVE = 4
// 协议地址
var REGISTER_URL = BuildConfig.MainIp+"/agreements/${VersionUtils.getEndPkg()}/yhxy.html"//注册协议
var PRIVACY_URL = BuildConfig.MainIp+"/agreements/${VersionUtils.getEndPkg()}/syzc.html"//隐私协议
var MEMBERS_URL = BuildConfig.MainIp+"/agreements/${VersionUtils.getEndPkg()}/gmxy.html"//会员付费服务协议
var REGISTER_URL =
BuildConfig.MainIp + "/agreements/${VersionUtils.getEndPkg()}/yhxy.html"//注册协议
var PRIVACY_URL = BuildConfig.MainIp + "/agreements/${VersionUtils.getEndPkg()}/syzc.html"//隐私协议
var MEMBERS_URL =
BuildConfig.MainIp + "/agreements/${VersionUtils.getEndPkg()}/gmxy.html"//会员付费服务协议
//0-开屏,1-信息流,2-激励视频,3-banner,4-DRAW信息流
const val GRO_MORE_ADTYPE0 = "0"
......@@ -54,6 +56,15 @@ object Constant {
const val NEED_REQUEST_LOCATION = "need_request_location"
const val FIRST_LOCATION = "first_location"
const val TO_UID = "TO_UID"
const val USER_LABEL_REQUEST_CODE = 29992222
const val LIKE_FEMALE_LABEL_REQUEST_CODE = 29992224
const val IS_LIKE_FEMALE_LABEL = "IS_LIKE_FEMALE_LABEL"
const val EDIT_PROFILE_CODE = 29992223
const val EDIT_PROFILE_SIGNATURE_STR = "EDIT_PROFILE_SIGNATURE_STR"
const val USER_LABEL_DATA = "USER_LABEL_DATA"
const val FLAVOR_LOCAL = "local"
const val USERINFO = "userInfo"
const val FLAVOR_INTERNATIONAL = "international"
......
......@@ -5,54 +5,190 @@ package com.duben.roseplaylet.common
* @date 2025/1/9
* @desc
*/
enum class UserProfile(val str: String, val arr: Array<String>) {
enum class UserProfile(
val str: String,
val arr: ArrayList<String>?,
) {
PROFILE_SG(
"身高",
arrayOf("初中,中专,高中及以下,大专,大学本科,硕士,博士")
getHeightArr()
),
PROFILE_TZ(
"体重",
arrayOf("")
getWeightArr()
),
PROFILE_SX(
"身形",
arrayOf("")
arrayListOf("大长腿", "A4腰", "丰满", "锁骨", "微胖", "170CM")
),
PROFILE_JYFW(
"交友范围",
arrayOf("")
arrayListOf("")
),
PROFILE_ZY(
"职业",
arrayOf("")
arrayListOf("")
),
PROFILE_GXBQ(
"个性标签",
arrayOf("")
arrayListOf("")
),
PROFILE_NL(
"年龄",
arrayOf("")
getAgeArr()
),
PROFILE_JYJM(
"交友节目",
arrayOf("")
arrayListOf("旅游", "夜蒲聚会", "兜风", "游艇派对", "玩游戏", "运动", "看电影", "去唱歌", "吃吃喝喝")
),
UNKNOWN(
"未知",
arrayOf("")
null
),
USUAL_LABEL(
USUAL_LABEL_MALE(
"日常",
arrayOf("林更新", "林更新", "林更新", "林更新", "林更新", "林更新", "林更新", "林更新")
arrayListOf(
"泡吧",
"不抽烟",
"旅游",
"聚会",
"不喝酒",
"酒神",
"吃货",
"游戏",
"本科",
"宅家",
"蹦迪",
"看脸",
"健身",
"读书",
"上班"
)
),
SPECIAL_LABEL(
SPECIAL_LABEL_MALE(
"特质",
arrayOf("古力娜扎", "古力娜扎", "古力娜扎", "古力娜扎", "古力娜扎", "古力娜扎", "古力娜扎", "古力娜扎")
arrayListOf(
"硬汉",
"大方",
"暖男",
"文艺",
"会玩",
"随性",
"只走心",
"浪漫",
"阳光",
"直爽",
"磁性",
"小鲜肉",
"高素质",
"爱干净",
"腹肌"
)
),
USUAL_LABEL_FEMALE(
"日常",
arrayListOf(
"泡吧",
"不抽烟",
"旅游",
"聚会",
"不喝酒",
"酒神",
"吃货",
"游戏",
"本科",
"宅家",
"Cosplay",
"颜控",
"细节控",
"声控",
"手控"
)
),
SPECIAL_LABEL_FEMALE(
"特质",
arrayListOf(
"老司机",
"气质",
"性感",
"会玩",
"高冷",
"嗲妹子",
"清纯",
"萝莉",
"妩媚",
"百变",
"直爽",
"随性",
"萌萌哒",
"爱干净",
"比较乖"
)
),
// 喜欢女生特质(男)
SPECIAL_LIKE_FEMALE(
"喜欢的女生特质",
arrayListOf(
"泡吧",
"不抽烟",
"cosplay",
"游戏",
"不喝酒",
"酒神",
"吃货",
"老司机",
"气质",
"性感",
"会玩",
"高冷",
"嗲妹子",
"清纯",
"萝莉",
"妩媚",
"百变",
"直爽",
"随性",
"萌萌哒",
"爱干净",
"比较乖"
)
),
}
fun getWeightArr(): ArrayList<String> {
val start = 30
val end = 120
val arr = ArrayList<String>()
for (i in start..end) {
arr.add("" + i + "KG")
}
return arr
}
fun getHeightArr(): ArrayList<String> {
val start = 140
val end = 230
val arr = ArrayList<String>()
for (i in start..end) {
arr.add("" + i + "CM")
}
return arr
}
fun getAgeArr(): ArrayList<String> {
val start = 1950
val end = 2025
val arr = ArrayList<String>()
for (i in start..end) {
arr.add("" + i)
}
return arr
}
\ No newline at end of file
......@@ -2,6 +2,7 @@ package com.duben.roseplaylet.manager
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.text.method.ScrollingMovementMethod
import android.view.LayoutInflater
import android.widget.TextView
import com.duben.roseplaylet.MintsApplication
......@@ -9,7 +10,7 @@ import com.duben.roseplaylet.R
import com.duben.roseplaylet.mvp.model.WXInfo
import com.duben.roseplaylet.utils.ToastUtil
import com.duben.roseplaylet.utils.UcropUtils
import com.sunfusheng.marqueeview.MarqueeView
import com.tencent.qcloud.tuicore.TUIConfig
import com.tencent.qcloud.tuikit.timcommon.config.classicui.TUIConfigClassic
import com.tencent.qcloud.tuikit.tuichat.config.classicui.TUIChatConfigClassic
import com.tencent.qcloud.tuikit.tuiconversation.config.classicui.TUIConversationConfigClassic
......@@ -22,6 +23,7 @@ import com.tencent.qcloud.tuikit.tuiconversation.config.classicui.TUIConversatio
class IMHelper private constructor() {
init {
TUIConfig.setTUIHostType(TUIConfig.TUI_HOST_TYPE_IMAPP)
customSet()
}
......@@ -32,38 +34,35 @@ class IMHelper private constructor() {
}
fun customSet() {
val appContext = MintsApplication.getContext()
//隐藏更多菜单中选项(全局)
TUIChatConfigClassic.hideItemsInMoreMenu(
TUIChatConfigClassic.CUSTOM
)
TUIChatConfigClassic.hideItemsInMoreMenu(TUIChatConfigClassic.CUSTOM)
//设置会话列表、cell 背景色
// TUIConversationConfigClassic.setListBackground(ColorDrawable(0xFFFFFFF0.toInt()))
// TUIConversationConfigClassic.setCellBackground(ColorDrawable(0xFFF0FFF0.toInt()))
// TUIConversationConfigClassic.setPinnedCellBackground(ColorDrawable(0xFFE1FFFF.toInt()))
TUIConversationConfigClassic.setListBackground(ColorDrawable(appContext.resources.getColor(R.color.color_07060C)))
TUIConversationConfigClassic.setCellBackground(ColorDrawable(appContext.resources.getColor(R.color.color_07060C)))
TUIConversationConfigClassic.setPinnedCellBackground(
ColorDrawable(appContext.resources.getColor(R.color.color_07060C))
)
//展示在线状态
TUIConversationConfigClassic.setShowUserOnlineStatusIcon(true)
//展示未读红点
TUIConversationConfigClassic.setShowCellUnreadCount(true)
//开启消息已读回执
TUIChatConfigClassic.setMessageReadReceiptNeeded(true)
//设置系统通知消息文字的字体、颜色和背景色,针对所有系统通知消息生效
TUIChatConfigClassic.setSystemMessageTextColor(Color.WHITE)
TUIChatConfigClassic.setSystemMessageFontSize(23)
TUIChatConfigClassic.setSystemMessageBackground(
ColorDrawable(MintsApplication.getContext().resources.getColor(R.color.color_07060C))
ColorDrawable(appContext.resources.getColor(R.color.color_07060C))
)
// 聊天界面背景色
TUIChatConfigClassic.setBackground(
ColorDrawable(MintsApplication.getContext().resources.getColor(R.color.color_07060C))
)
TUIConfigClassic.setSendBubbleBackground(
MintsApplication.getContext().resources.getDrawable(R.drawable.shape_bg_market)
)
TUIConfigClassic.setReceiveBubbleBackground(
MintsApplication.getContext().resources.getDrawable(R.drawable.shape_bg_market)
)
TUIChatConfigClassic.setBackground(ColorDrawable(appContext.resources.getColor(R.color.color_07060C)))
TUIConfigClassic.setSendBubbleBackground(appContext.resources.getDrawable(R.drawable.shape_bg_market))
TUIConfigClassic.setReceiveBubbleBackground(appContext.resources.getDrawable(R.drawable.shape_bg_market))
TUIChatConfigClassic.setSendTextMessageColor(Color.WHITE)
TUIChatConfigClassic.setReceiveTextMessageColor(Color.BLACK)
}
......@@ -71,14 +70,17 @@ class IMHelper private constructor() {
fun setCustomTopView(wxInfo: WXInfo?) {
val tipsView = LayoutInflater.from(MintsApplication.getContext())
.inflate(R.layout.custom_tips_view, null)
val marqueeView = tipsView.findViewById<MarqueeView<*>>(R.id.marqueeView)
val message = "请勿轻易通过第三方账户进行红包、转账、借"
marqueeView.startWithText(message)
marqueeView.startWithText(
message,
com.sunfusheng.marqueeview.R.anim.anim_left_in,
com.sunfusheng.marqueeview.R.anim.anim_left_out
)
// val marqueeView = tipsView.findViewById<MarqueeView<*>>(R.id.marqueeView)
// val message = "请勿轻易通过第三方账户进行红包、转账、借"
// marqueeView.startWithText(message)
// marqueeView.startWithText(
// message,
// com.sunfusheng.marqueeview.R.anim.anim_bottom_in,
// com.sunfusheng.marqueeview.R.anim.anim_top_out
// )
val tvTips = tipsView.findViewById<TextView>(R.id.tv_tips)
tvTips.text = "请勿轻易通过第三方账户进行红包、转账、借款等金钱往来以免上当受骗"
tvTips.movementMethod = ScrollingMovementMethod()
val tvWxNo = tipsView.findViewById<TextView>(R.id.tv_wx_no)
val tvCopy = tipsView.findViewById<TextView>(R.id.tv_copy)
......@@ -90,7 +92,6 @@ class IMHelper private constructor() {
tvSend.setOnClickListener {
}
TUIChatConfigClassic.setCustomTopView(tipsView)
}
}
\ No newline at end of file
......@@ -55,12 +55,26 @@ public class UserManager {
* vip是否永久
*/
private static final String VIP_FOREVER = "VIP_FOREVER";
/**
* 上次IM登录CODE
*/
private static final String LAST_IM_LOGIN_CODE = "LAST_IM_LOGIN_CODE";
/**
* 用户性别
*/
private static final String USER_SEX = "USER_SEX";
/**
* 认证状态,1 已认证
*/
private static final String IDCARD_STATUS = "IDCARD_STATUS";
/**
* 是否填写基础资料了
*/
private static final String HAS_BEAN = "HAS_BEAN";
private static final String VIP_DATE = "VIP_DATE";
private static final String CODE_ID = "codeId";
private static final String SHARE_CODE = "share_code";
......@@ -252,6 +266,20 @@ public class UserManager {
return ps.getInt(LAST_IM_LOGIN_CODE, BaseConstants.ERR_SUCC);
}
public void setUserSex(String userSex) {
if (ps == null) {
return;
}
ps.put(USER_SEX, userSex);
}
public String getUserSex() {
if (ps == null) {
return "1";
}
return ps.getString(USER_SEX, "1");
}
public void userLogout() {
if (ps != null) {
ps.remove(USER_ID);
......
package com.duben.roseplaylet.mvp.model;
import java.io.Serializable;
import java.util.List;
public class HallList implements Serializable {
/**
* birthday : 2021-01-01
* uid : 2401515422701300000
* career : null
* idcardStatus : 0
* distance : 11551.33
* nickName : null
* sex : 2
* lastCity : 城市
* headerUrl : https://img2.baidu.com/it/u=3360819743,727089392&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500
* hallTime : 昨日活跃
* age : 4
* likeStatus : 0
*/
private List<ListDTO> list;
public List<ListDTO> getList() {
return list;
}
public void setList(List<ListDTO> list) {
this.list = list;
}
public static class ListDTO implements Serializable {
private String birthday;
private long uid;
private String career;
private int idcardStatus;
private String distance;
private String nickName;
private int sex;
private String lastCity;
private String headerUrl;
private String hallTime;
private String age;
private int likeStatus;
public String getBirthday() {
return birthday;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
public long getUid() {
return uid;
}
public void setUid(long uid) {
this.uid = uid;
}
public String getCareer() {
return career;
}
public void setCareer(String career) {
this.career = career;
}
public int getIdcardStatus() {
return idcardStatus;
}
public void setIdcardStatus(int idcardStatus) {
this.idcardStatus = idcardStatus;
}
public String getDistance() {
return distance;
}
public void setDistance(String distance) {
this.distance = distance;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public int getSex() {
return sex;
}
public void setSex(int sex) {
this.sex = sex;
}
public String getLastCity() {
return lastCity;
}
public void setLastCity(String lastCity) {
this.lastCity = lastCity;
}
public String getHeaderUrl() {
return headerUrl;
}
public void setHeaderUrl(String headerUrl) {
this.headerUrl = headerUrl;
}
public String getHallTime() {
return hallTime;
}
public void setHallTime(String hallTime) {
this.hallTime = hallTime;
}
public String getAge() {
return age;
}
public void setAge(String age) {
this.age = age;
}
public int getLikeStatus() {
return likeStatus;
}
public void setLikeStatus(int likeStatus) {
this.likeStatus = likeStatus;
}
}
}
package com.duben.roseplaylet.mvp.model;
import com.contrarywind.interfaces.IPickerViewData;
import java.util.List;
public class JobBean implements IPickerViewData {
/**
* sort : 娱乐体育
* name : ["影视","运动体育","音乐","模特"]
*/
private String sort;
private List<String> name;
public String getSort() {
return sort;
}
public void setSort(String sort) {
this.sort = sort;
}
public List<String> getName() {
return name;
}
public void setName(List<String> name) {
this.name = name;
}
@Override
public String getPickerViewText() {
return this.sort;
}
}
\ No newline at end of file
package com.duben.roseplaylet.mvp.model
import java.util.ArrayList
data class JobEntity(
var options1Items: MutableList<ProvinceCosumer>? = null,
var options2Items: MutableList<ArrayList<String>>? = null,
) : java.io.Serializable
package com.duben.roseplaylet.mvp.model
import java.util.ArrayList
data class JobMultiItemEntity(
var beans: List<String>?= null,
var options1Items: MutableList<JobBean>? = null,
var options2Items: MutableList<ArrayList<String>>? = null,
var itemType: Int = 0,
) : java.io.Serializable
package com.duben.roseplaylet.mvp.model;
import java.io.Serializable;
public class UserProfileDataBean implements Serializable {
private UserProfileData info;
public UserProfileData getInfo() {
return info;
}
public void setInfo(UserProfileData info) {
this.info = info;
}
public static class UserProfileData implements Serializable {
/**
* sex : 2
* infoWechat :
* canChat : true
* canSee : true
* likeStatus : 0
* images :
* canSeeSurCount : 14
* black : 1
* online : true
* birthday : 2021-01-01
* lastTime : 1736233526000
* career :
* updateCount : 0
* distance : 0.00
* city :
* likeCount : 0
* findDescribe :
* uid : 2401515422701300000
* idcardStatus : 0
* interest :
* userHeight :
* hasWechat : true
* nickName :
* introduce :
* headerUrl : https://img2.baidu.com/it/u=3360819743,727089392&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500
* appearance :
* tagsOther :
* findCity :
* tagsCommon :
* bodyWeight :
* hallTime : 近日活跃
* days : 13个月
* age : 4
*/
private int sex;
private String infoWechat;
private boolean canChat;
private boolean canSee;
private int likeStatus;
private String images;
private int canSeeSurCount;
private int black;
private boolean online;
private String birthday;
private long lastTime;
private String career;
private int updateCount;
private String distance;
private String city;
private int likeCount;
private String findDescribe;
private long uid;
private int idcardStatus;
private String interest;
private String userHeight;
private boolean hasWechat;
private String nickName;
private String introduce;
private String headerUrl;
private String appearance;
private String tagsOther;
private String findCity;
private String tagsCommon;
private String bodyWeight;
private String hallTime;
private String days;
private String age;
public int getSex() {
return sex;
}
public void setSex(int sex) {
this.sex = sex;
}
public String getInfoWechat() {
return infoWechat;
}
public void setInfoWechat(String infoWechat) {
this.infoWechat = infoWechat;
}
public boolean isCanChat() {
return canChat;
}
public void setCanChat(boolean canChat) {
this.canChat = canChat;
}
public boolean isCanSee() {
return canSee;
}
public void setCanSee(boolean canSee) {
this.canSee = canSee;
}
public int getLikeStatus() {
return likeStatus;
}
public void setLikeStatus(int likeStatus) {
this.likeStatus = likeStatus;
}
public String getImages() {
return images;
}
public void setImages(String images) {
this.images = images;
}
public int getCanSeeSurCount() {
return canSeeSurCount;
}
public void setCanSeeSurCount(int canSeeSurCount) {
this.canSeeSurCount = canSeeSurCount;
}
public int getBlack() {
return black;
}
public void setBlack(int black) {
this.black = black;
}
public boolean isOnline() {
return online;
}
public void setOnline(boolean online) {
this.online = online;
}
public String getBirthday() {
return birthday;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
public long getLastTime() {
return lastTime;
}
public void setLastTime(long lastTime) {
this.lastTime = lastTime;
}
public String getCareer() {
return career;
}
public void setCareer(String career) {
this.career = career;
}
public int getUpdateCount() {
return updateCount;
}
public void setUpdateCount(int updateCount) {
this.updateCount = updateCount;
}
public String getDistance() {
return distance;
}
public void setDistance(String distance) {
this.distance = distance;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public int getLikeCount() {
return likeCount;
}
public void setLikeCount(int likeCount) {
this.likeCount = likeCount;
}
public String getFindDescribe() {
return findDescribe;
}
public void setFindDescribe(String findDescribe) {
this.findDescribe = findDescribe;
}
public long getUid() {
return uid;
}
public void setUid(long uid) {
this.uid = uid;
}
public int getIdcardStatus() {
return idcardStatus;
}
public void setIdcardStatus(int idcardStatus) {
this.idcardStatus = idcardStatus;
}
public String getInterest() {
return interest;
}
public void setInterest(String interest) {
this.interest = interest;
}
public String getUserHeight() {
return userHeight;
}
public void setUserHeight(String userHeight) {
this.userHeight = userHeight;
}
public boolean isHasWechat() {
return hasWechat;
}
public void setHasWechat(boolean hasWechat) {
this.hasWechat = hasWechat;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getIntroduce() {
return introduce;
}
public void setIntroduce(String introduce) {
this.introduce = introduce;
}
public String getHeaderUrl() {
return headerUrl;
}
public void setHeaderUrl(String headerUrl) {
this.headerUrl = headerUrl;
}
public String getAppearance() {
return appearance;
}
public void setAppearance(String appearance) {
this.appearance = appearance;
}
public String getTagsOther() {
return tagsOther;
}
public void setTagsOther(String tagsOther) {
this.tagsOther = tagsOther;
}
public String getFindCity() {
return findCity;
}
public void setFindCity(String findCity) {
this.findCity = findCity;
}
public String getTagsCommon() {
return tagsCommon;
}
public void setTagsCommon(String tagsCommon) {
this.tagsCommon = tagsCommon;
}
public String getBodyWeight() {
return bodyWeight;
}
public void setBodyWeight(String bodyWeight) {
this.bodyWeight = bodyWeight;
}
public String getHallTime() {
return hallTime;
}
public void setHallTime(String hallTime) {
this.hallTime = hallTime;
}
public String getDays() {
return days;
}
public void setDays(String days) {
this.days = days;
}
public String getAge() {
return age;
}
public void setAge(String age) {
this.age = age;
}
}
}
package com.duben.roseplaylet.mvp.presenters
import com.duben.library.net.neterror.BaseSubscriber
import com.duben.library.net.neterror.Throwable
import com.duben.roseplaylet.manager.AppHttpManager
import com.duben.roseplaylet.mvp.model.BaseResponse
import com.duben.roseplaylet.mvp.model.UserProfileDataBean
import com.duben.roseplaylet.mvp.views.BasicUserProfileView
import java.util.HashMap
class BasicUserProfilePresenter : BasePresenter<BasicUserProfileView>() {
fun initBasicInfo(birthday: String, nickName: String, sex: String, headerUrl: String) {
val vo = HashMap<String, Any>()
vo["birthday"] = birthday
vo["nickName"] = nickName
vo["sex"] = sex
vo["headerUrl"] = headerUrl
AppHttpManager.getInstance(loanApplication)
.call(loanService.initInfo(vo),
object : BaseSubscriber<BaseResponse<UserProfileDataBean>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<UserProfileDataBean>) {
if (isLinkView) return
view.hideLoading()
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> view.initBasicSuc()
else -> {
view.showToast(message)
view.initBasicFail()
}
}
}
override fun onError(e: Throwable?) {
if (isLinkView) return
view.hideLoading()
view.showToast(e?.message)
view.initBasicFail()
}
})
}
}
\ No newline at end of file
package com.duben.roseplaylet.mvp.presenters
import com.duben.library.net.neterror.BaseSubscriber
import com.duben.library.net.neterror.Throwable
import com.duben.roseplaylet.manager.AppHttpManager
import com.duben.roseplaylet.mvp.model.BaseResponse
import com.duben.roseplaylet.mvp.model.UserProfileDataBean
import com.duben.roseplaylet.mvp.views.EditProfileView
import java.util.HashMap
class EditProfilePresenter : BasePresenter<EditProfileView>() {
fun getUserInfo() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.userInfo,
object : BaseSubscriber<BaseResponse<UserProfileDataBean>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<UserProfileDataBean>) {
if (isLinkView) return
view.hideLoading()
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> view.getUserInfoSuc(baseResponse.data)
else -> {
view.showToast(message)
view.getUserInfoFail()
}
}
}
override fun onError(e: Throwable?) {
if (isLinkView) return
view.hideLoading()
view.showToast(e?.message)
view.getUserInfoFail()
}
})
}
fun setUserInfo(userProfileData: UserProfileDataBean.UserProfileData) {
val vo = HashMap<String, Any>()
vo["info"] = userProfileData
AppHttpManager.getInstance(loanApplication)
.call(loanService.setUserInfo(vo),
object : BaseSubscriber<BaseResponse<UserProfileDataBean>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<UserProfileDataBean>) {
if (isLinkView) return
view.hideLoading()
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> view.setUserInfoSuc()
else -> {
view.showToast(message)
view.setUserInfoFail()
}
}
}
override fun onError(e: Throwable?) {
if (isLinkView) return
view.hideLoading()
view.showToast(e?.message)
view.setUserInfoFail()
}
})
}
}
\ No newline at end of file
......@@ -96,7 +96,6 @@ class MyPresenter : BasePresenter<MyView>() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.getMyInfo(vo),
object : BaseSubscriber<BaseResponse<UserBean>>() {
override fun onCompleted() {
if (isLinkView)
return
......
......@@ -5,13 +5,18 @@ import com.duben.library.net.neterror.Throwable
import com.duben.roseplaylet.manager.AppHttpManager
import com.duben.roseplaylet.mvp.model.BannerList
import com.duben.roseplaylet.mvp.model.BaseResponse
import com.duben.roseplaylet.mvp.model.HallList
import com.duben.roseplaylet.mvp.views.SquareView
class SquarePresenter : BasePresenter<SquareView>() {
fun autoList() {
fun saveGps(latitude: String, longitude: String, city: String) {
val vo = hashMapOf<String, Any>()
vo["latitude"] = latitude
vo["longitude"] = longitude
vo["city"] = city
AppHttpManager.getInstance(loanApplication)
.call(loanService.autoList(), object : BaseSubscriber<BaseResponse<BannerList>>() {
.call(loanService.saveGps(vo), object : BaseSubscriber<BaseResponse<BannerList>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
......@@ -25,9 +30,10 @@ class SquarePresenter : BasePresenter<SquareView>() {
val message = baseResponse.message
when (code) {
200 -> view.autoListSuc(baseResponse.data)
200 -> {
}
else -> {
view.autoListFail()
view.showToast(message)
}
}
......@@ -37,14 +43,11 @@ class SquarePresenter : BasePresenter<SquareView>() {
if (isLinkView) return
view.hideLoading()
view.showToast(e?.message)
view.autoListFail()
}
})
}
fun getHallList(type: Int, page: Int, size: Int) {
//1 推荐 2活跃 3新人
val vo = hashMapOf<String, Any>()
......@@ -52,13 +55,13 @@ class SquarePresenter : BasePresenter<SquareView>() {
vo["page"] = page
vo["size"] = size
AppHttpManager.getInstance(loanApplication)
.call(loanService.getHallList(vo), object : BaseSubscriber<BaseResponse<BannerList>>() {
.call(loanService.getHallList(vo), object : BaseSubscriber<BaseResponse<HallList>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<BannerList>) {
override fun onNext(baseResponse: BaseResponse<HallList>) {
if (isLinkView) return
view.hideLoading()
......@@ -84,7 +87,6 @@ class SquarePresenter : BasePresenter<SquareView>() {
})
}
fun topTabs() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.topTabs(),
......
......@@ -5,11 +5,48 @@ import com.duben.library.net.neterror.Throwable
import com.duben.roseplaylet.manager.AppHttpManager
import com.duben.roseplaylet.mvp.model.BaseResponse
import com.duben.roseplaylet.mvp.model.NineListBean
import com.duben.roseplaylet.mvp.model.UserProfileDataBean
import com.duben.roseplaylet.mvp.views.UserInfoView
class UserInfoPresenter : BasePresenter<UserInfoView>() {
fun getMorePage(toUid: String) {
val vo = hashMapOf<String, Any>()
vo["toUid"] = toUid
AppHttpManager.getInstance(loanApplication)
.call(loanService.getMorePage(vo),
object : BaseSubscriber<BaseResponse<UserProfileDataBean>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<UserProfileDataBean>) {
if (isLinkView) return
view.hideLoading()
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> view.getMorePageSuc(baseResponse.data)
else -> {
view.showToast(message)
view.getMorePageFail()
}
}
}
override fun onError(e: Throwable?) {
if (isLinkView) return
view.hideLoading()
view.showToast(e?.message)
view.getMorePageFail()
}
})
}
fun seeWechat(toUid: String) {
val vo = hashMapOf<String, Any>()
vo["toUid"] = toUid
AppHttpManager.getInstance(loanApplication)
......@@ -28,7 +65,7 @@ class UserInfoPresenter : BasePresenter<UserInfoView>() {
val message = baseResponse.message
when (code) {
// 200 -> view.getMorePageSuc()
200 -> view.seeWechatSuc()
else -> {
view.showToast(message)
view.getMorePageFail()
......@@ -36,6 +73,43 @@ class UserInfoPresenter : BasePresenter<UserInfoView>() {
}
}
override fun onError(e: Throwable?) {
if (isLinkView) return
view.hideLoading()
view.showToast(e?.message)
view.seeWechatFail()
}
})
}
fun unlockWechat(toUid: String) {
val vo = hashMapOf<String, Any>()
vo["toUid"] = toUid
AppHttpManager.getInstance(loanApplication)
.call(loanService.unlockWechat(vo),
object : BaseSubscriber<BaseResponse<NineListBean>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<NineListBean>) {
if (isLinkView) return
view.hideLoading()
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> view.unlockWechatSuc()
else -> {
view.showToast(message)
view.unlockWechatFail()
}
}
}
override fun onError(e: Throwable?) {
if (isLinkView) return
view.hideLoading()
......
package com.duben.roseplaylet.mvp.views
interface BasicUserProfileView : BaseView {
fun initBasicSuc()
fun initBasicFail()
}
package com.duben.roseplaylet.mvp.views
import com.duben.roseplaylet.mvp.model.UserProfileDataBean
interface EditProfileView : BaseView {
fun getUserInfoSuc(data: UserProfileDataBean)
fun getUserInfoFail()
fun setUserInfoSuc()
fun setUserInfoFail()
}
package com.duben.roseplaylet.mvp.views
import com.duben.roseplaylet.mvp.model.BannerList
import com.duben.roseplaylet.mvp.model.HallList
interface SquareView : BaseView {
fun autoListSuc(list: BannerList)
fun autoListFail()
fun topTabsSuc(data: BannerList?)
fun getHallListSuc(list: BannerList)
fun getHallListSuc(list: HallList)
fun getHallListFail()
}
\ No newline at end of file
package com.duben.roseplaylet.mvp.views
import com.duben.roseplaylet.mvp.model.NineListBean
import com.duben.roseplaylet.mvp.model.UserProfileDataBean
interface UserInfoView : BaseView {
fun getMorePageSuc(data: NineListBean)
fun getMorePageSuc(data: UserProfileDataBean)
fun getMorePageFail()
fun seeWechatSuc()
fun seeWechatFail()
fun unlockWechatSuc()
fun unlockWechatFail()
}
package com.duben.roseplaylet.net;
import com.duben.roseplaylet.MintsApplication;
import com.duben.roseplaylet.utils.ToastUtil;
import com.google.gson.Gson;
import com.duben.roseplaylet.common.Constant;
import com.duben.roseplaylet.manager.UserManager;
......@@ -102,6 +104,15 @@ public class GsonConverterFactory extends Converter.Factory {
// }
} catch (Exception e) {
}
} else if (code == 9404) {
// 缺少基础资料
ToastUtil.show(MintsApplication.getContext(), "缺少基础资料");
} else if (code == 9405) {
// 无vip或金币
ToastUtil.show(MintsApplication.getContext(), "无vip或金币");
} else if (code == 9406) {
// 未认证
ToastUtil.show(MintsApplication.getContext(), "未认证");
}
}
......
......@@ -4,12 +4,13 @@ import android.content.Context;
import android.text.TextUtils;
import com.duben.roseplaylet.mvp.model.FaceParam;
import com.duben.roseplaylet.mvp.model.HallList;
import com.duben.roseplaylet.mvp.model.RecommendBannerList;
import com.duben.roseplaylet.mvp.model.UserProfileDataBean;
import com.google.gson.JsonObject;
import com.duben.roseplaylet.BuildConfig;
import com.duben.roseplaylet.mvp.model.BannerList;
import com.duben.roseplaylet.mvp.model.BaseResponse;
import com.duben.roseplaylet.mvp.model.BannerList;
import com.duben.roseplaylet.mvp.model.HotStyleTypesList;
import com.duben.roseplaylet.mvp.model.IndexList;
import com.duben.roseplaylet.mvp.model.NineListBean;
......@@ -17,7 +18,6 @@ import com.duben.roseplaylet.mvp.model.NineShowBean;
import com.duben.roseplaylet.mvp.model.OrderRecordBean;
import com.duben.roseplaylet.mvp.model.RecoBean;
import com.duben.roseplaylet.mvp.model.UserBean;
import com.duben.roseplaylet.mvp.model.VedioBean;
import com.duben.roseplaylet.mvp.model.Version;
import com.duben.roseplaylet.mvp.model.VipBean;
import com.duben.roseplaylet.mvp.model.WxPayParamBean;
......@@ -54,7 +54,7 @@ public interface LoanService {
*
* @return
*/
@POST("api/user/visitorlogin")
@POST("roseApi/user/visitorlogin")
Observable<BaseResponse<UserBean>> visitorlogin(@Body Map<String, Object> vo);
/**
......@@ -62,7 +62,7 @@ public interface LoanService {
*
* @return
*/
@POST("api/user/sendMobileCode")
@POST("roseApi/user/sendMobileCode")
Observable<BaseResponse<Object>> sendMobileCode(@Body Map<String, Object> vo);
/**
......@@ -70,7 +70,7 @@ public interface LoanService {
*
* @return
*/
@POST("api/user/mobilelogin")
@POST("roseApi/user/mobilelogin")
Observable<BaseResponse<UserBean>> login(@Body Map<String, Object> vo);
/**
......@@ -86,7 +86,7 @@ public interface LoanService {
*
* @return
*/
@POST("api/user/saveTerminalInfo")
@POST("roseApi/user/saveTerminalInfo")
Observable<BaseResponse<Object>> saveTerminalInfo(@Body Map<String, Object> vo);
/**
......@@ -132,7 +132,7 @@ public interface LoanService {
*
* @return
*/
@POST("api/user/baseMsg")
@POST("roseApi/user/baseMsg")
Observable<BaseResponse<UserBean>> getMyInfo(@Body Map<String, Object> vo);
/**
......@@ -379,7 +379,7 @@ public interface LoanService {
* 进入同城,拉取同城列表信息接口
*/
@POST("roseApi/hall/hallList")
Observable<BaseResponse<JsonObject>> getHallList(@Body Map<String, Object> vo);
Observable<BaseResponse<HallList>> getHallList(@Body Map<String, Object> vo);
/**
* 基础资料
......@@ -403,7 +403,7 @@ public interface LoanService {
* 二级资料页
*/
@POST("roseApi/hall/morePage")
Observable<BaseResponse<JsonObject>> getMorePage(@Body Map<String, Object> vo);
Observable<BaseResponse<UserProfileDataBean>> getMorePage(@Body Map<String, Object> vo);
/**
* 查看微信号
......@@ -411,11 +411,23 @@ public interface LoanService {
@POST("roseApi/hall/seeWechat")
Observable<BaseResponse<JsonObject>> seeWechat(@Body Map<String, Object> vo);
/**
* 金币解锁和免费次数解锁同一接口
*/
@POST("roseApi/hall/unlockWechat")
Observable<BaseResponse<JsonObject>> unlockWechat(@Body Map<String, Object> vo);
/**
* 查看资料
*/
@POST("roseApi/user/info")
Observable<BaseResponse<JsonObject>> getUserInfo();
Observable<BaseResponse<UserProfileDataBean>> getUserInfo();
/**
* 编辑资料
*/
@POST("roseApi/user/setInfo")
Observable<BaseResponse<UserProfileDataBean>> setUserInfo(@Body Map<String, Object> vo);
/**
* 我喜欢的
......@@ -435,6 +447,24 @@ public interface LoanService {
@POST("roseApi/user/seeMeList")
Observable<BaseResponse<JsonObject>> getSeeMeList(@Body Map<String, Object> vo);
/**
* 看过我的
*/
@POST("roseApi/hall/unlockInfoByCoin")
Observable<BaseResponse<JsonObject>> unlockInfoByCoin(@Body Map<String, Object> vo);
/**
* 拉黑 拉白
*/
@POST("roseApi/hall/black")
Observable<BaseResponse<JsonObject>> setBlack(@Body Map<String, Object> vo);
/**
* 拉黑 拉白
*/
@POST("roseApi/hall/white")
Observable<BaseResponse<JsonObject>> setWhite(@Body Map<String, Object> vo);
/**
* 默认http工厂
*/
......
......@@ -73,18 +73,20 @@ public class OkHttpInterceptor implements Interceptor {
* @return
*/
private String createChannel() {
String channel = MateUtils.INSTANCE.getAppMetaData(MintsApplication.getContext(), "CHANNEL_NAME");
try {
// 穿山甲分包渠道
String ttChannel = HumeSDK.getChannel(MintsApplication.getContext());
if (!TextUtils.isEmpty(ttChannel)) {
// 此处方式不能修改,已和后端约定
channel = channel + "_" + ttChannel;
}
} catch (Exception e) {
e.printStackTrace();
}
return channel;
return "share_mints";
// String channel = MateUtils.INSTANCE.getAppMetaData(MintsApplication.getContext(), "CHANNEL_NAME");
// try {
// // 穿山甲分包渠道
// String ttChannel = HumeSDK.getChannel(MintsApplication.getContext());
// if (!TextUtils.isEmpty(ttChannel)) {
// // 此处方式不能修改,已和后端约定
// channel = channel + "_" + ttChannel;
// }
// } catch (Exception e) {
// e.printStackTrace();
// }
// return channel;
}
/**
......
package com.duben.roseplaylet.ui.activitys
import android.app.Dialog
import android.media.AudioManager
import android.os.Bundle
import android.os.Handler
import android.os.Looper
......@@ -27,7 +26,7 @@ import com.duben.roseplaylet.utils.BackInputUtil
import com.duben.roseplaylet.utils.LogUtil
import com.duben.roseplaylet.utils.SpanUtils
import com.duben.roseplaylet.utils.ToastUtil
import kotlinx.android.synthetic.main.activity_mobile_login.*
import kotlinx.android.synthetic.main.activity_bind_mobile.*
import kotlinx.android.synthetic.main.header_layout.*
......@@ -36,7 +35,7 @@ import kotlinx.android.synthetic.main.header_layout.*
* 作者:孟崔广
* 时间:2020/12/2 14:21
*/
class MobileLoginActivity : BaseActivity(), LoginView, View.OnClickListener {
class BindMobileActivity : BaseActivity(), LoginView, View.OnClickListener {
companion object {
val TYPE = "type"
......@@ -62,7 +61,7 @@ class MobileLoginActivity : BaseActivity(), LoginView, View.OnClickListener {
initListener()
}
override fun getContentViewLayoutID() = R.layout.activity_mobile_login
override fun getContentViewLayoutID() = R.layout.activity_bind_mobile
override fun toggleOverridePendingTransition() = true
......
package com.duben.roseplaylet.ui.activitys
import android.graphics.Color
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.view.View
import android.view.WindowManager
import com.duben.roseplaylet.MintsApplication
import com.duben.roseplaylet.R
import com.duben.roseplaylet.utils.ToastUtil
import com.gyf.barlibrary.ImmersionBar
import com.tencent.qcloud.tuikit.timcommon.component.interfaces.ITitleBarLayout
import com.tencent.qcloud.tuikit.tuichat.bean.C2CChatInfo
import com.tencent.qcloud.tuikit.tuichat.bean.ChatInfo
import com.tencent.qcloud.tuikit.tuichat.classicui.page.TUIBaseChatActivity
......@@ -29,8 +30,15 @@ class IMActivity : TUIBaseChatActivity() {
private lateinit var chatFragment: TUIC2CChatFragment
override fun onCreate(savedInstanceState: Bundle?) {
ImmersionBar.with(this).statusBarDarkFont(false, 0.5f).init()
super.onCreate(savedInstanceState)
// 状态栏黑底白字
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION)
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
window.statusBarColor = resources.getColor(R.color.color_171619)
window.navigationBarColor = resources.getColor(R.color.color_171619)
var vis = window.decorView.systemUiVisibility
vis = vis or View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
window.decorView.systemUiVisibility = vis
}
override fun initChat(chatInfo: ChatInfo) {
......@@ -51,20 +59,20 @@ class IMActivity : TUIBaseChatActivity() {
private fun initChatSetting() {
Handler(Looper.getMainLooper()).postDelayed({
// chatFragment.titleBarLayout.rightGroup.visibility = View.VISIBLE
val chatView = chatFragment.chatView
chatFragment.inputView.setInterceptTouchEvent(true)
chatFragment.inputView.setBackgroundColor(
resources.getColor(R.color.color_171619)
)
chatFragment.inputView.setOnClickListener {
chatView.viewline.visibility = View.GONE
chatView.inputView.setInterceptTouchEvent(true)
chatView.inputView.setBgColor(resources.getColor(R.color.color_171619))
chatView.inputView.setOnClickListener {
}
val titleBarLayout = chatFragment.titleBarLayout
// titleBarLayout.setBackgroundColor(
// resources.getColor(R.color.color_15141A)
// )
titleBarLayout.setTitle("哈哈哈", ITitleBarLayout.Position.MIDDLE)
val titleBarLayout = chatView.titleBar
titleBarLayout.setBgColor(resources.getColor(R.color.color_15141A))
titleBarLayout.middleTitle.setTextColor(Color.WHITE)
// titleBarLayout.setTitle("哈哈哈", ITitleBarLayout.Position.MIDDLE)
titleBarLayout.setRightIcon(R.mipmap.ic_alipay)
titleBarLayout.rightGroup.setOnClickListener {
ToastUtil.show(MintsApplication.getContext(), "OOOOOOO")
......
......@@ -4,6 +4,7 @@ import android.Manifest
import android.app.Activity
import android.content.Intent
import android.content.pm.ActivityInfo
import android.graphics.Color
import android.text.TextUtils
import android.view.View
import android.widget.TextView
......@@ -67,8 +68,10 @@ class RealAuthActivity : BaseActivity(), View.OnClickListener, RealAuthView {
realAuthPresenter.attachView(this)
tv_title.text = "真人认证"
tv_title.setTextColor(Color.WHITE)
iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_back)
iv_left_icon.setImageResource(R.mipmap.ic_arrow_white)
line.visibility = View.GONE
initProfile()
initListener()
......@@ -333,8 +336,10 @@ class RealAuthActivity : BaseActivity(), View.OnClickListener, RealAuthView {
}
}
for (stringDatum in stringData) {
data.add(PickBean(stringDatum, false))
if (stringData != null) {
for (stringDatum in stringData) {
data.add(PickBean(stringDatum, false))
}
}
return data
......
......@@ -2,8 +2,6 @@ package com.duben.roseplaylet.ui.activitys
import android.annotation.SuppressLint
import android.app.Dialog
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.os.Handler
import android.os.Looper
......@@ -180,7 +178,7 @@ class SettingsActivity : BaseActivity(), View.OnClickListener {
}
R.id.item_phone -> {
if (TextUtils.isEmpty(userManager.mobile)) {
readyGo(MobileLoginActivity::class.java)
readyGo(BindMobileActivity::class.java)
return
}
}
......
package com.duben.roseplaylet.ui.activitys
import android.view.View
import com.duben.roseplaylet.R
import com.duben.roseplaylet.ui.activitys.base.BaseActivity
import com.duben.library.utils.nodoubleclick.AntiShake
import com.duben.roseplaylet.mvp.model.NineListBean
import com.duben.roseplaylet.mvp.presenters.UserInfoPresenter
import com.duben.roseplaylet.mvp.views.UserInfoView
import kotlinx.android.synthetic.main.activity_user_info.*
import kotlinx.android.synthetic.main.header_layout.*
/**
* 描述:用户信息
*/
class UserInfoActivity : BaseActivity(), View.OnClickListener, UserInfoView {
private val userInfoPresenter by lazy { UserInfoPresenter() }
override fun getContentViewLayoutID() = R.layout.activity_user_info
override fun isApplyKitKatTranslucency() = false
override fun initViewsAndEvents() {
userInfoPresenter.attachView(this)
initView()
initListener()
}
private fun initView() {
iv_faith_value.setOnClickListener(this)
ll_jwyzr.setOnClickListener(this)
ll_dzh.setOnClickListener(this)
}
override fun onClick(v: View?) {
if (AntiShake.check(v?.id)) return
when (v?.id) {
R.id.iv_left_icon -> finish()
R.id.iv_faith_value -> { // 查看诚信值
}
R.id.ll_jwyzr -> { // 加为意中人
}
R.id.ll_dzh -> { // 打招呼
}
}
}
private fun initListener() {
// iv_left_icon.setOnClickListener(this)
}
override fun onDestroy() {
userInfoPresenter.detachView()
super.onDestroy()
}
override fun getMorePageSuc(data: NineListBean) {
}
override fun getMorePageFail() {
}
}
......@@ -2,10 +2,14 @@ package com.duben.roseplaylet.ui.activitys
import android.content.Intent
import android.graphics.Color
import android.os.Bundle
import android.text.TextUtils
import android.view.View
import com.duben.library.utils.nodoubleclick.AntiShake
import com.duben.roseplaylet.R
import com.duben.roseplaylet.common.Constant
import com.duben.roseplaylet.common.UserProfile
import com.duben.roseplaylet.manager.UserManager
import com.duben.roseplaylet.ui.activitys.base.BaseActivity
import com.duben.roseplaylet.ui.adapter.FlowTagAdapter
import kotlinx.android.synthetic.main.activity_user_label.*
......@@ -13,53 +17,110 @@ import kotlinx.android.synthetic.main.header_layout.*
class UserLabelActivity : BaseActivity(), View.OnClickListener {
private var userSex = UserManager.getInstance().userSex
companion object {
const val MAX_SELECT_COUNT = 6
}
private var selectCount = 0
private var isLikeFemale = false
private var selectCount = 0
private val usualData = arrayListOf<String>()
private val specialData = arrayListOf<String>()
private val likeData = arrayListOf<String>()
override fun getBundleExtras(extras: Bundle?) {
super.getBundleExtras(extras)
extras?.let {
isLikeFemale = it.getBoolean(Constant.IS_LIKE_FEMALE_LABEL, false)
}
}
override fun getContentViewLayoutID() = R.layout.activity_user_label
override fun isApplyKitKatTranslucency() = false
override fun initViewsAndEvents() {
tv_right.visibility = View.VISIBLE
tv_title.text = "个性标签"
tv_right.text = "确定"
tv_title.setTextColor(Color.WHITE)
tv_right.setTextColor(Color.WHITE)
iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_white)
tv_label1.text = UserProfile.USUAL_LABEL.str
tv_label2.text = UserProfile.SPECIAL_LABEL.str
if (isLikeFemale) {
// 喜欢的女生特质
tv_title.text = UserProfile.SPECIAL_LIKE_FEMALE.str
tv_label1.visibility = View.GONE
tv_label2.visibility = View.GONE
view_line.visibility = View.GONE
usualData.addAll(UserProfile.USUAL_LABEL.arr)
specialData.addAll(UserProfile.SPECIAL_LABEL.arr)
UserProfile.SPECIAL_LIKE_FEMALE.arr?.let {
likeData.addAll(it)
}
val usualAdapter = FlowTagAdapter(this, usualData)
flowlayout_usual.adapter = usualAdapter
val likeAdapter = FlowTagAdapter(this, likeData)
flowlayout_usual.adapter = likeAdapter
val specialAdapter = FlowTagAdapter(this, specialData)
flowlayout_special.adapter = specialAdapter
flowlayout_usual.setOnTagClickListener { _, _, _ ->
updateData()
false
}
} else {
tv_title.text = "个性标签"
flowlayout_usual.setOnTagClickListener { view, position, parent ->
updateData()
false
}
if (TextUtils.equals(userSex, "1")) {
initMale()
} else {
initFeMale()
}
flowlayout_special.setOnTagClickListener { view, position, parent ->
updateData()
false
val usualAdapter = FlowTagAdapter(this, usualData)
flowlayout_usual.adapter = usualAdapter
val specialAdapter = FlowTagAdapter(this, specialData)
flowlayout_special.adapter = specialAdapter
flowlayout_usual.setOnTagClickListener { _, _, _ ->
updateData()
false
}
flowlayout_special.setOnTagClickListener { _, _, _ ->
updateData()
false
}
}
initListener()
}
private fun initFeMale() {
tv_label1.text = UserProfile.USUAL_LABEL_FEMALE.str
tv_label2.text = UserProfile.SPECIAL_LABEL_FEMALE.str
UserProfile.USUAL_LABEL_FEMALE.arr?.let {
usualData.addAll(it)
}
UserProfile.SPECIAL_LABEL_FEMALE.arr?.let {
specialData.addAll(it)
}
}
private fun initMale() {
tv_label1.text = UserProfile.USUAL_LABEL_MALE.str
tv_label2.text = UserProfile.SPECIAL_LABEL_MALE.str
UserProfile.USUAL_LABEL_MALE.arr?.let {
usualData.addAll(it)
}
UserProfile.SPECIAL_LABEL_MALE.arr?.let {
specialData.addAll(it)
}
}
private fun updateData() {
selectCount = flowlayout_usual.selectedList.size + flowlayout_special.selectedList.size
......@@ -89,7 +150,7 @@ class UserLabelActivity : BaseActivity(), View.OnClickListener {
flowlayout_usual.setMaxSelectCount(MAX_SELECT_COUNT - flowlayout_special.selectedList.size)
}
}
tv_select.text = "已选择${selectCount}/${MAX_SELECT_COUNT}"
tv_select.text = String.format("已选择${selectCount}/${MAX_SELECT_COUNT}")
}
override fun onClick(v: View?) {
......@@ -115,9 +176,15 @@ class UserLabelActivity : BaseActivity(), View.OnClickListener {
}
}
val sb = StringBuilder()
for (label in labelData) {
sb.append("$label,")
}
val resultIntent = Intent()
resultIntent.putExtra(RealAuthActivity.USER_LABEL_DATA, labelData)
resultIntent.putExtra(RealAuthActivity.USER_LABEL_DATA, sb.toString())
setResult(RealAuthActivity.USER_LABEL_REQUEST_CODE, resultIntent)
onBackPressed()
}
}
}
......
package com.duben.roseplaylet.ui.activitys
import android.os.Bundle
import android.view.View
import com.duben.library.utils.GlideUtils
import com.duben.roseplaylet.R
import com.duben.roseplaylet.ui.activitys.base.BaseActivity
import com.duben.library.utils.nodoubleclick.AntiShake
import com.duben.roseplaylet.mvp.model.NineListBean
import com.duben.roseplaylet.common.Constant
import com.duben.roseplaylet.mvp.model.UserProfileDataBean
import com.duben.roseplaylet.mvp.presenters.UserInfoPresenter
import com.duben.roseplaylet.mvp.views.UserInfoView
import kotlinx.android.synthetic.main.activity_user_profile.*
......@@ -18,8 +20,19 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserInfoView {
private var headerImg =
"https://pics0.baidu.com/feed/810a19d8bc3eb13589ac35cdb62485dcfd1f4422.jpeg"
private var toUid = ""
private val userInfoPresenter by lazy { UserInfoPresenter() }
private var userProfileData: UserProfileDataBean.UserProfileData? = null
override fun getBundleExtras(extras: Bundle?) {
super.getBundleExtras(extras)
extras?.let {
toUid = it.getString(Constant.TO_UID, "")
}
}
override fun getContentViewLayoutID() = R.layout.activity_user_profile
override fun isApplyKitKatTranslucency() = false
......@@ -27,6 +40,8 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserInfoView {
override fun initViewsAndEvents() {
userInfoPresenter.attachView(this)
userInfoPresenter.getMorePage(toUid)
initView()
initListener()
}
......@@ -45,15 +60,27 @@ class UserProfileActivity : BaseActivity(), View.OnClickListener, UserInfoView {
private fun initListener() {
// iv_left_icon.setOnClickListener(this)
tv_wechat.setOnClickListener(this)
tv_chat.setOnClickListener(this)
}
override fun getMorePageSuc(data: UserProfileDataBean) {
this.userProfileData = data.info
}
override fun getMorePageFail() {
}
override fun seeWechatSuc() {
}
override fun getMorePageSuc(data: NineListBean) {
override fun seeWechatFail() {
}
override fun unlockWechatSuc() {
}
override fun getMorePageFail() {
override fun unlockWechatFail() {
}
override fun onDestroy() {
......
......@@ -48,7 +48,6 @@ import com.tencent.mm.opensdk.openapi.IWXAPI
import com.tencent.mm.opensdk.openapi.WXAPIFactory
import com.youth.banner.listener.OnPageChangeListener
import kotlinx.android.synthetic.main.activity_new_vip.*
import kotlinx.android.synthetic.main.header_layout.*
import java.net.URLEncoder
......@@ -315,8 +314,8 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
// }
if (!UserManager.getInstance().userIsLogin()) {
val b = Bundle()
b.putString(MobileLoginActivity.TYPE, "vip")
readyGoThenKill(MobileLoginActivity::class.java, b)
b.putString(BindMobileActivity.TYPE, "vip")
readyGoThenKill(BindMobileActivity::class.java, b)
} else {
readyGoThenKill(MainActivity::class.java)
}
......
package com.duben.roseplaylet.ui.activitys
import android.content.Intent
import android.text.TextUtils
import android.view.View
import com.duben.roseplaylet.R
import com.duben.roseplaylet.ui.activitys.base.BaseActivity
import com.duben.library.utils.nodoubleclick.AntiShake
import com.duben.roseplaylet.R
import com.duben.roseplaylet.common.Constant
import com.duben.roseplaylet.mvp.presenters.WriteMoodPresenter
import com.duben.roseplaylet.mvp.views.WriteMoodView
import kotlinx.android.synthetic.main.activity_write_mood.*
import com.duben.roseplaylet.ui.activitys.base.BaseActivity
import kotlinx.android.synthetic.main.activity_write_signature.*
import kotlinx.android.synthetic.main.header_layout.*
/**
* 描述:写心情
* 描述:个性签名
*/
class WriteMoodActivity : BaseActivity(), View.OnClickListener, WriteMoodView {
class WriteSignatureActivity : BaseActivity(), View.OnClickListener, WriteMoodView {
private val writeMoodPresenter by lazy { WriteMoodPresenter() }
override fun getContentViewLayoutID() = R.layout.activity_write_mood
override fun getContentViewLayoutID() = R.layout.activity_write_signature
override fun isApplyKitKatTranslucency() = false
override fun initViewsAndEvents() {
writeMoodPresenter.attachView(this)
// tv_title.text = "发布动态"
tv_title.text = "个性签名"
initListener()
}
......@@ -33,7 +37,17 @@ class WriteMoodActivity : BaseActivity(), View.OnClickListener, WriteMoodView {
when (v?.id) {
R.id.iv_left_icon -> finish()
R.id.btn_publish -> {
val toString = et_mood.text.toString()
if (TextUtils.isEmpty(toString)) {
showToast("请输入个性签名")
return
}
setResult(
Constant.EDIT_PROFILE_CODE,
Intent().putExtra(Constant.EDIT_PROFILE_SIGNATURE_STR, toString)
)
onBackPressed()
}
}
}
......
......@@ -26,11 +26,9 @@ import com.duben.roseplaylet.R;
import com.duben.roseplaylet.common.Constant;
import com.duben.roseplaylet.mvp.views.BaseView;
import com.duben.roseplaylet.ui.widgets.LoadingDialog;
import com.duben.roseplaylet.utils.StatusBarUtil;
import com.duben.roseplaylet.utils.ToastUtil;
import com.duben.library.base.BaseAppCompatActivity;
public abstract class BaseActivity extends BaseAppCompatActivity implements BaseView {
protected LoadingDialog progressDialog;
......@@ -46,16 +44,20 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
}
try {
if (TextUtils.equals(getClass().getSimpleName(), "SplashActivity") ||
TextUtils.equals(getClass().getSimpleName(), "GuideActivity")
if (TextUtils.equals(getClass().getSimpleName(), "SplashActivity")
|| TextUtils.equals(getClass().getSimpleName(), "GuideActivity")
) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
} else if (TextUtils.equals(getClass().getSimpleName(), "VideoActivity")) {
StatusBarUtil.transparencyBar(this); //设置状态栏全透明
} else if (TextUtils.equals(getClass().getSimpleName(), "VideoActivity")
|| TextUtils.equals(getClass().getSimpleName(), "RealAuthActivity")
|| TextUtils.equals(getClass().getSimpleName(), "EditProfileActivity")
|| TextUtils.equals(getClass().getSimpleName(), "WriteSignatureActivity")
) {
setDarkStatusBar();
} else {
StatusBarUtil.transparencyBar(this); //设置状态栏全透明
StatusBarUtil.StatusBarLightMode(this); //设置白底黑字
setLightStatusBar();
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
......@@ -72,6 +74,28 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
registerExitApp();
}
private void setLightStatusBar() {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
getWindow().setStatusBarColor(getResources().getColor(R.color.white));
getWindow().setNavigationBarColor(getResources().getColor(R.color.white));
int vis = getWindow().getDecorView().getSystemUiVisibility();
vis |= View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
vis |= View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
getWindow().getDecorView().setSystemUiVisibility(vis);
}
private void setDarkStatusBar() {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
getWindow().setStatusBarColor(getResources().getColor(R.color.black));
getWindow().setNavigationBarColor(getResources().getColor(R.color.black));
int vis = getWindow().getDecorView().getSystemUiVisibility();
vis |= View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
getWindow().getDecorView().setSystemUiVisibility(vis);
}
public void statusBarDark(boolean isDark) {
ImmersionBar.with(this).statusBarDarkFont(isDark, 0.5f).init();
}
......@@ -98,7 +122,6 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
}
}
return super.dispatchTouchEvent(ev);
}
// 根据EditText所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
......
package com.duben.roseplaylet.ui.adapter
import android.content.Intent
import android.os.Bundle
import android.view.View
import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.duben.library.utils.GlideUtils
import com.duben.roseplaylet.R
import com.duben.roseplaylet.mvp.model.VedioBean
import com.duben.roseplaylet.ui.activitys.UserInfoActivity
import com.duben.roseplaylet.common.Constant
import com.duben.roseplaylet.mvp.model.HallList
import com.duben.roseplaylet.ui.activitys.UserProfileActivity
class SquareAdapter : BaseQuickAdapter<VedioBean, BaseViewHolder>(R.layout.item_square) {
class SquareAdapter : BaseQuickAdapter<HallList.ListDTO, BaseViewHolder>(R.layout.item_square) {
override fun convert(holder: BaseViewHolder, item: HallList.ListDTO) {
holder.getView<TextView>(R.id.tv_recommend_name).text = item.nickName
holder.getView<TextView>(R.id.tv_status).text = item.hallTime
holder.getView<TextView>(R.id.tv_recommend_location).text = item.distance
val tvRealLabel = holder.getView<TextView>(R.id.tv_real_label)
if (item.idcardStatus == 1) {
tvRealLabel.visibility = View.VISIBLE
} else {
tvRealLabel.visibility = View.GONE
}
override fun convert(holder: BaseViewHolder, item: VedioBean) {
holder.getView<TextView>(R.id.tv_recommend_name).text = item.title
holder.getView<TextView>(R.id.tv_recommend_name).text = item.title
holder.getView<TextView>(R.id.tv_recommend_location).text
GlideUtils.loadBlurImageView(
holder.itemView.context,
"",
item.headerUrl,
holder.getView(R.id.iv_recommend_header)
)
holder.itemView.setOnClickListener {
val intent = Intent(it.context, UserInfoActivity::class.java)
val intent = Intent(it.context, UserProfileActivity::class.java)
val bundle = Bundle()
bundle.putString(Constant.TO_UID, item.uid.toString())
intent.putExtras(bundle)
it.context.startActivity(intent)
}
}
......
......@@ -2,8 +2,6 @@ package com.duben.roseplaylet.ui.adapter
import androidx.fragment.app.Fragment
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.duben.roseplaylet.mvp.model.HotStyleTypesBean
import com.duben.roseplaylet.ui.fragment.MovieFragment
import com.duben.roseplaylet.ui.fragment.SquareListFragment
class SquarePageAdapter(
......@@ -20,7 +18,7 @@ class SquarePageAdapter(
override fun getItemCount() = data.size
override fun createFragment(position: Int): Fragment {
val newFragment = SquareListFragment.newInstance()
val newFragment = SquareListFragment.newInstance(position + 1)
fragments[position] = newFragment
return newFragment
}
......
......@@ -22,7 +22,6 @@ class MessageFragment : LazyLoadBaseFragment(), View.OnClickListener {
private val tabsData = arrayListOf<String>()
private val fragmentsData = mutableListOf<Fragment>()
private var vpAdapter: MsgPageAdapter? = null
private var mSelectTabIndex = 0
private val userManager by lazy { UserManager.getInstance() }
......@@ -33,6 +32,9 @@ class MessageFragment : LazyLoadBaseFragment(), View.OnClickListener {
}
private fun initView() {
tv_clear_noread.setOnClickListener(this)
tv_clear_list.setOnClickListener(this)
tabsData.add(String.format("聊天"))
tabsData.add(String.format("系统消息"))
......@@ -46,17 +48,27 @@ class MessageFragment : LazyLoadBaseFragment(), View.OnClickListener {
// 初始化Tab
tab.id = position
if (tabsData.size > 0) {
tab.customView = getTabView(tabsData[position])
if (position == 0) {
tab.customView = getTabView(tabsData[position], true)
} else {
tab.customView = getTabView(tabsData[position], false)
}
}
}.attach()
tab_msg.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {
override fun onTabSelected(tab: TabLayout.Tab?) {
updateTab(tab, true)
mSelectTabIndex = tab!!.id
tab?.let {
updateTab(it.customView, true)
if (it.position == 0) {
tv_clear_list.visibility = View.VISIBLE
} else {
tv_clear_list.visibility = View.GONE
}
}
}
override fun onTabUnselected(tab: TabLayout.Tab?) {
updateTab(tab, false)
tab?.let { updateTab(it.customView, false) }
}
override fun onTabReselected(tab: TabLayout.Tab?) {
......@@ -64,23 +76,27 @@ class MessageFragment : LazyLoadBaseFragment(), View.OnClickListener {
})
}
private fun getTabView(text: String): View {
val view = LayoutInflater.from(requireContext()).inflate(R.layout.item_video_tab, null)
view.findViewById<TextView>(R.id.item_tv).text = text
return view
}
private fun updateTab(tab: TabLayout.Tab?, isSelected: Boolean) {
tab?.customView?.let {
private fun updateTab(view: View?, isSelected: Boolean) {
view?.let {
val text = it.findViewById<TextView>(R.id.item_tv)
val bar = it.findViewById<View>(R.id.view_bar)
if (isSelected) {
text.setTextColor(ContextCompat.getColor(requireContext(), R.color.red))
text.setTextColor(ContextCompat.getColor(requireContext(), R.color.color_E4C46C))
bar.visibility = View.VISIBLE
} else {
text.setTextColor(ContextCompat.getColor(requireContext(), R.color.color_8D8F90))
text.setTextColor(ContextCompat.getColor(requireContext(), R.color.color_959595))
bar.visibility = View.INVISIBLE
}
}
}
private fun getTabView(text: String, isSelected: Boolean): View {
val view = LayoutInflater.from(requireContext()).inflate(R.layout.item_square_tab, null)
view.findViewById<TextView>(R.id.item_tv).text = text
updateTab(view, isSelected)
return view
}
override fun onFragmentResume() {
super.onFragmentResume()
......@@ -93,7 +109,12 @@ class MessageFragment : LazyLoadBaseFragment(), View.OnClickListener {
if (AntiShake.check(v?.id)) return
when (v?.id) {
R.id.tv_clear_noread -> {
// 清除未读
}
R.id.tv_clear_list -> {
// 清除列表
}
}
}
}
\ No newline at end of file
......@@ -38,6 +38,8 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
private val myPresenter by lazy { MyPresenter() }
private val userManager by lazy { UserManager.getInstance() }
private var toUid = ""
override fun getContentViewLayoutID() = R.layout.fragment_main_my
override fun initViewsAndEvents() {
......@@ -122,14 +124,18 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
// if (!userManager.vipFlag) {
// readyGo(VipActivity::class.java)
// }
readyGo(EditProfileActivity::class.java)
}
R.id.ll_my_setting -> {
// readyGo(SettingsActivity::class.java)
readyGo(RealAuthActivity::class.java)
// readyGo(RealAuthActivity::class.java)
readyGo(BasicUserProfileActivity::class.java)
}
R.id.tv_my_account, R.id.ll_my_login -> {
if (!userManager.userIsLogin()) {
readyGo(MobileLoginActivity::class.java)
readyGo(BindMobileActivity::class.java)
}
}
R.id.ll_my_record -> {
......@@ -146,7 +152,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
initUserLocalData()
}
R.id.ll_my_payrecord -> {
readyGo(OrderRecordActivity::class.java)
// readyGo(OrderRecordActivity::class.java)
}
}
}
......@@ -156,22 +162,8 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
}
private fun loginStatus(consumer: UserBean) {
// 1-匹配用户
// if (consumer.activiteFlag == 1) {
// // 匹配
// ll_my_vip.visibility = View.VISIBLE
// ll_my_payrecord.visibility = View.VISIBLE
// ll_contactus.visibility = View.VISIBLE
// line_my_payrecord.visibility = View.VISIBLE
// line_my_contactus.visibility = View.VISIBLE
// } else {
// // 未匹配
// ll_my_vip.visibility = View.GONE
// ll_my_payrecord.visibility = View.GONE
// ll_contactus.visibility = View.GONE
// line_my_payrecord.visibility = View.GONE
// line_my_contactus.visibility = View.GONE
// }
toUid = consumer.idcode
// 2-是否有手机号
if (!TextUtils.isEmpty(userManager.mobile)) {
......
......@@ -25,7 +25,6 @@ import com.duben.roseplaylet.mvp.views.SquareView
import com.duben.roseplaylet.ui.adapter.*
import com.duben.roseplaylet.ui.fragment.base.LazyLoadBaseFragment
import com.duben.roseplaylet.utils.AppPreferencesManager
import com.duben.roseplaylet.utils.LogUtil
import com.duben.roseplaylet.utils.PermissionXUtils
import com.duben.roseplaylet.utils.SpanUtils
import com.google.android.material.tabs.TabLayout
......@@ -51,7 +50,6 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener
override fun initViewsAndEvents() {
initVp()
initLocation()
tv_location.setOnClickListener(this)
}
......@@ -65,7 +63,7 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener
super.onFragmentResume()
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_TWO) {
banner?.start()
squarePresenter.topTabs()
// squarePresenter.topTabs()
}
}
......@@ -267,25 +265,20 @@ class SquareFragment : LazyLoadBaseFragment(), SquareView, View.OnClickListener
// app全局使用
val curLongitude = loc.longitude
val curLatitude = loc.latitude
val poiName = loc.poiName
LogUtil.d("AAAAAA ------> curLongitude${curLongitude} curLatitude${curLatitude} poiName${poiName}")
// val poiName = loc.poiName
val city = loc.city
squarePresenter.saveGps(curLatitude.toString(), curLongitude.toString(), city)
mLocationClient?.stopLocation()
}
}
override fun getHallListSuc(list: BannerList) {
override fun getHallListSuc(list: HallList) {
}
override fun getHallListFail() {
}
override fun autoListSuc(data: BannerList) {}
override fun autoListFail() {}
fun ViewPager2.desensitization() {
//动态设置ViewPager2 灵敏度
try {
......
......@@ -20,8 +20,9 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene
companion object {
private const val SQUARE_TYPE = "SQUARE_TYPE"
fun newInstance(): Fragment {
fun newInstance(type: Int): Fragment {
val args = Bundle()
args.putInt(SQUARE_TYPE, type)
val fragment = SquareListFragment()
fragment.arguments = args
return fragment
......@@ -30,6 +31,7 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene
private val squarePresenter by lazy { SquarePresenter() }
private var mType = 1
private var hotPage = 1 // 分页
private var hotPageSize = Constant.PAGE_SIZE // 分页
......@@ -42,14 +44,14 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene
initRecy()
initListener()
arguments?.let {}
arguments?.let {
mType = it.getInt(SQUARE_TYPE, 1)
}
}
override fun onResume() {
super.onResume()
hotPageSize = 15
onRefresh()
// onRefresh()
}
override fun onDestroy() {
......@@ -57,17 +59,26 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene
squarePresenter.detachView()
}
fun onRefresh() {
override fun onFragmentFirstVisible() {
super.onFragmentFirstVisible()
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_TWO) {
hotPage = 1
srl_square.resetNoMoreData()
squarePresenter.autoList()
squarePresenter.getHallList(mType, hotPage, hotPageSize)
}
}
// fun onRefresh() {
// if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_TWO) {
// hotPage = 1
// srl_square.resetNoMoreData()
// squarePresenter.getHallList(mType, hotPage, hotPageSize)
// }
// }
override fun onLoadMore(refreshLayout: RefreshLayout) {
hotPage = ++hotPage
squarePresenter.autoList()
squarePresenter.getHallList(mType, hotPage, hotPageSize)
}
private fun initRecy() {
......@@ -89,7 +100,9 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene
MainExpressManager.instance.destroy()
}
override fun autoListSuc(data: BannerList) {
override fun topTabsSuc(data: BannerList?) {}
override fun getHallListSuc(data: HallList) {
if (activity == null || requireActivity().isFinishing) {
srl_square?.finishRefresh(true)
return
......@@ -110,9 +123,5 @@ class SquareListFragment : LazyLoadBaseFragment(), SquareView, OnLoadMoreListene
}
}
override fun autoListFail() {}
override fun topTabsSuc(data: BannerList?) {}
override fun getHallListSuc(list: BannerList) {}
override fun getHallListFail() {}
}
\ No newline at end of file
package com.duben.roseplaylet.ui.widgets
import android.app.Dialog
import android.content.Context
import android.view.Gravity
import android.view.KeyEvent
import android.view.View
import android.view.WindowManager
import android.widget.ImageView
import android.widget.TextView
import com.duben.roseplaylet.R
class HallDialog(private val context: Context, private val listener: DialogListener?) :
Dialog(context, R.style.dialog) {
private val lp: WindowManager.LayoutParams
private val tv_vip_btn: TextView
private val tv_vip_coin: TextView
private val iv_close: ImageView
init {
setContentView(R.layout.dialog_hall)
// 设置window属性
lp = window!!.attributes
lp.gravity = Gravity.CENTER
lp.width = WindowManager.LayoutParams.MATCH_PARENT
lp.windowAnimations = R.style.DialogAnimFade
window!!.attributes = lp
// 设置外部不可关闭
setCancelable(false)
setCanceledOnTouchOutside(false)
setOnKeyListener { _, i, _ -> i == KeyEvent.KEYCODE_BACK }
tv_vip_btn = findViewById<View>(R.id.tv_vip_btn) as TextView
tv_vip_coin = findViewById<View>(R.id.tv_vip_coin) as TextView
iv_close = findViewById<View>(R.id.iv_close) as ImageView
iv_close.setOnClickListener {
dismiss()
}
listener?.setDialog(this)
tv_vip_btn.setOnClickListener(listener)
tv_vip_coin.setOnClickListener(listener)
}
}
\ No newline at end of file
......@@ -32,9 +32,9 @@ class SinglePickDialog(
setContentView(R.layout.dialog_pick)
// 设置window属性
val lp: WindowManager.LayoutParams = window!!.attributes
lp.gravity = Gravity.CENTER
lp.gravity = Gravity.BOTTOM
lp.width = WindowManager.LayoutParams.MATCH_PARENT
lp.windowAnimations = R.style.DialogAnimFade
lp.windowAnimations = R.style.DialogAnimBottom
window!!.attributes = lp
// 设置外部不可关闭
......
......@@ -52,7 +52,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
vup = new VersionUpdatePresenter();
}
if (app_activity != null) {
vup.updateVersion(app_activity.get());
// vup.updateVersion(app_activity.get());
}
}
}
......
package com.duben.roseplaylet.utils
import android.content.Context
import com.duben.roseplaylet.mvp.model.*
import com.google.gson.Gson
import com.orhanobut.logger.Logger
import org.json.JSONArray
object JobData {
fun getJsonData(context: Context): JobMultiItemEntity {
val data = JobMultiItemEntity()
try {
val options2Items = arrayListOf<ArrayList<String>>()
//解析数据
val JsonData: String = GetJsonDataUtil().getJson(context, "job.json")
val jsonBean: ArrayList<JobBean> = parseData(JsonData)
data.options1Items = jsonBean
for (i in jsonBean.indices) { //遍历省份
val cityList = ArrayList<String>() //该省的城市列表(第二级)
for (c in 0 until jsonBean[i].name.size) { //遍历该省份的所有城市
val cityName = jsonBean[i].name[c]
cityList.add(cityName.toString()) //添加城市
}
/**
* 添加城市数据
*/
options2Items.add(cityList)
}
data.options2Items = options2Items
} catch (e: Exception) {
e.printStackTrace()
}
LogUtil.d("AAAAAAAAALLLLLLLLLLLLLLL")
Logger.d(data.toString())
return data
}
/**
* 解析省市
*/
fun getJsonDataForProvince(context: Context): JobMultiItemEntity {
val data = JobMultiItemEntity()
try {
//解析数据
data.options1Items = parseData(GetJsonDataUtil().getJson(context, "job.json"))
} catch (e: Exception) {
e.printStackTrace()
}
return data
}
private fun parseData(result: String?): ArrayList<JobBean> { //Gson 解析
val detail = arrayListOf<JobBean>()
try {
val data = JSONArray(result)
val gson = Gson()
for (i in 0 until data.length()) {
val entity = gson.fromJson(data.optJSONObject(i).toString(), JobBean::class.java)
detail.add(entity)
}
} catch (e: Exception) {
e.printStackTrace()
}
return detail
}
}
\ No newline at end of file
......@@ -2,14 +2,14 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle" android:useLevel="false">
<!-- <corners android:radius="80dp" />-->
<!-- <corners android:radius="80dp" />-->
<solid android:color="#AAAAAA" />
</shape>
</item>
<item android:state_pressed="false">
<shape android:shape="rectangle" android:useLevel="false">
<!-- <corners android:radius="80dp" />-->
<solid android:color="#ffffff" />
<!-- <corners android:radius="80dp" />-->
<solid android:color="@color/color_232122" />
</shape>
</item>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/shape_bg_hall_btn2" android:state_checked="true" />
<item android:drawable="@drawable/shape_bg_hall_btn1" android:state_checked="false" />
<item android:drawable="@drawable/shape_bg_hall_btn1" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="@color/color_232122" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="10dip" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="@color/color_313035" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="50dip" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="50dip" />
<gradient
android:angle="0"
android:centerColor="@color/color_FDEFCA"
android:endColor="@color/color_E7C26A"
android:startColor="@color/color_EBCA7B" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="50dip" />
<solid android:color="@color/color_383838" />
<stroke
android:width="1dp"
android:color="@color/color_FCE8BA" />
</shape>
\ No newline at end of file
......@@ -4,6 +4,6 @@
<solid android:color="@color/main_mints" />
<corners android:bottomRightRadius="5dip" />
<corners android:bottomRightRadius="10dip" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/color_4C4B51" />
<corners android:radius="5dip" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="@color/color_232122" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="10dip" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="50dp" />
<solid android:color="@color/color_E8CF83" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_232122">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/header_layout" />
<com.duben.roseplaylet.ui.widgets.ElasticScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical">
<com.duben.roseplaylet.ui.widgets.CircleImageView
android:id="@+id/iv_avatar"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginTop="50dp"
android:src="@mipmap/ic_my_avat" />
<TextView
android:id="@+id/tv_avatar_hint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="上传本人真实清晰近照,能大大提高约会成功率"
android:textColor="@color/color_959595" />
<EditText
android:id="@+id/et_nickname"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginStart="30dp"
android:layout_marginTop="50dp"
android:layout_marginEnd="30dp"
android:background="@drawable/shape_bg_hall_btn1"
android:gravity="center_vertical"
android:hint="请输入您的昵称"
android:paddingStart="20dp"
android:textColor="@color/white"
android:textColorHint="@color/color_959595"
android:textSize="18sp" />
<TextView
android:id="@+id/tv_age"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginStart="30dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="30dp"
android:background="@drawable/shape_bg_hall_btn1"
android:gravity="center_vertical"
android:hint="请选择您的年龄"
android:paddingStart="20dp"
android:textColor="@color/white"
android:textColorHint="@color/color_959595"
android:textSize="18sp" />
<RadioGroup
android:id="@+id/rg_sex"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rb_female"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_marginStart="30dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="15dp"
android:layout_weight="1"
android:background="@drawable/checkbox_sex_style"
android:button="@null"
android:gravity="center"
android:text="女"
android:textColor="@color/color_959595"
android:textSize="18sp" />
<RadioButton
android:id="@+id/rb_male"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_marginStart="15dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="30dp"
android:layout_weight="1"
android:background="@drawable/checkbox_sex_style"
android:button="@null"
android:gravity="center"
android:text="男"
android:textColor="@color/color_959595"
android:textSize="18sp" />
</RadioGroup>
<TextView
android:id="@+id/tv_sax_hint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="注册完成后,您的性别将无法更改"
android:textColor="@color/color_959595" />
</LinearLayout>
</com.duben.roseplaylet.ui.widgets.ElasticScrollView>
</LinearLayout>
<TextView
android:id="@+id/tv_save"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_gravity="bottom"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="30dp"
android:background="@drawable/shape_profile_chat"
android:gravity="center"
android:text="保存"
android:textColor="@color/black" />
</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:orientation="vertical">
android:background="@color/color_232122">
<include layout="@layout/header_layout" />
<com.duben.roseplaylet.ui.widgets.ElasticScrollView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:overScrollMode="never">
android:orientation="vertical">
<include layout="@layout/header_layout" />
<LinearLayout
<com.duben.roseplaylet.ui.widgets.ElasticScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_marginBottom="80dp"
android:fillViewport="true"
android:overScrollMode="never">
<include
android:id="@+id/layout_avatar"
layout="@layout/layout_basic_header"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginBottom="10dp" />
<include
android:id="@+id/layout_nickname"
layout="@layout/layout_basic_edit" />
<include
android:id="@+id/layout_wechat"
layout="@layout/layout_basic_edit" />
<include
android:id="@+id/layout_gxqm"
layout="@layout/layout_basic_edit" />
<include
android:id="@+id/layout_nl"
layout="@layout/layout_basic_text" />
<include
android:id="@+id/layout_zy"
layout="@layout/layout_basic_text" />
<include
android:id="@+id/layout_sg"
layout="@layout/layout_basic_text" />
<include
android:id="@+id/layout_tz"
layout="@layout/layout_basic_text" />
<include
android:id="@+id/layout_sx"
layout="@layout/layout_basic_text" />
<include
android:id="@+id/layout_jyfw"
layout="@layout/layout_basic_text" />
<include
android:id="@+id/layout_jyjm"
layout="@layout/layout_basic_text" />
<include
android:id="@+id/layout_gxbq"
layout="@layout/layout_basic_text" />
android:layout_height="match_parent"
android:orientation="vertical">
<include
android:id="@+id/layout_avatar"
layout="@layout/layout_basic_header"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginBottom="10dp" />
<include
android:id="@+id/layout_nickname"
layout="@layout/layout_basic_edit" />
<include
android:id="@+id/layout_wechat"
layout="@layout/layout_basic_edit"
android:visibility="gone" />
<include
android:id="@+id/layout_gxqm"
layout="@layout/layout_basic_text" />
<include
android:id="@+id/layout_nl"
layout="@layout/layout_basic_text" />
<include
android:id="@+id/layout_zy"
layout="@layout/layout_basic_text" />
<include
android:id="@+id/layout_sg"
layout="@layout/layout_basic_text" />
<include
android:id="@+id/layout_tz"
layout="@layout/layout_basic_text" />
<include
android:id="@+id/layout_sx"
layout="@layout/layout_basic_text"
android:visibility="gone" />
<include
android:id="@+id/layout_jyfw"
layout="@layout/layout_basic_text" />
<include
android:id="@+id/layout_jyjm"
layout="@layout/layout_basic_text" />
<include
android:id="@+id/layout_gxbq"
layout="@layout/layout_basic_text" />
<include
android:id="@+id/layout_xhdnstz"
layout="@layout/layout_basic_text"
android:visibility="gone" />
</LinearLayout>
</com.duben.roseplaylet.ui.widgets.ElasticScrollView>
</LinearLayout>
<TextView
android:id="@+id/tv_save"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_gravity="bottom"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="30dp"
android:background="@drawable/shape_profile_chat"
android:gravity="center"
android:text="保存"
android:textColor="@color/black" />
</FrameLayout>
</LinearLayout>
</com.duben.roseplaylet.ui.widgets.ElasticScrollView>
</LinearLayout>
......@@ -143,7 +143,7 @@
android:layout_height="match_parent"
android:layout_below="@id/ll_step_progress"
android:orientation="vertical"
android:visibility="gone">
android:visibility="visible">
<LinearLayout
android:layout_width="match_parent"
......@@ -207,7 +207,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/ll_step_progress"
android:orientation="vertical">
android:orientation="vertical"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
......
......@@ -53,6 +53,7 @@
</com.duben.roseplaylet.ui.widgets.TouchInterceptingFrameLayout>
<View
android:id="@+id/view_line"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_marginTop="15dp"
......
......@@ -3,19 +3,20 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:background="@color/color_232122"
android:orientation="vertical">
<include layout="@layout/header_layout" />
<EditText
android:id="@+id/et_mood"
android:layout_width="fill_parent"
android:layout_height="140dp"
android:layout_margin="10dp"
android:background="@drawable/shape_et_feedback"
android:background="@drawable/shape_et_signature"
android:gravity="top"
android:hint="分享你此刻的心情,让大家关注!"
android:maxLength="150"
android:hint="请填写您的签名:"
android:maxLength="20"
android:padding="10dp"
android:textSize="16sp" />
......@@ -24,7 +25,7 @@
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_margin="10dp"
android:background="@drawable/shape_bg_green"
android:background="@drawable/shape_main_black"
android:elevation="2dp"
android:text="发布心情"
android:textColor="@color/white"
......
......@@ -5,17 +5,30 @@
android:layout_height="match_parent"
android:orientation="vertical">
<com.sunfusheng.marqueeview.MarqueeView
android:id="@+id/marqueeView"
<!-- <com.sunfusheng.marqueeview.MarqueeView-->
<!-- android:id="@+id/marqueeView"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="30dp"-->
<!-- android:background="@color/color_48484C"-->
<!-- app:mvAnimDuration="1000"-->
<!-- app:mvDirection="bottom_to_top"-->
<!-- app:mvInterval="3000"-->
<!-- app:mvSingleLine="true"-->
<!-- app:mvTextColor="@color/color_F9F9F9"-->
<!-- app:mvTextSize="14sp" />-->
<TextView
android:id="@+id/tv_tips"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_height="25dp"
android:background="@color/color_48484C"
app:mvAnimDuration="1000"
app:mvDirection="bottom_to_top"
app:mvInterval="3000"
app:mvSingleLine="true"
app:mvTextColor="@color/color_F9F9F9"
app:mvTextSize="14sp" />
android:gravity="center"
android:lines="1"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:textColor="@color/color_8F8E94"
android:textSize="16sp" />
<RelativeLayout
android:layout_width="match_parent"
......
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="30dp"
android:layout_marginEnd="30dp"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/iv_avatar"
android:background="@drawable/shape_bg_hall"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="80dp"
android:text="解锁私聊,同时解锁联系方式"
android:textColor="@color/color_FCE8BA"
android:textSize="20sp" />
<TextView
android:layout_width="200dp"
android:layout_height="40dp"
android:layout_marginTop="30dp"
android:background="@drawable/shape_bg_hall_btn1"
android:gravity="center"
android:text="限时特享5折起"
android:textColor="@color/color_FCE8BA"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_vip_btn"
android:layout_width="260dp"
android:layout_height="45dp"
android:layout_marginTop="10dp"
android:background="@drawable/shape_bg_hall_btn2"
android:gravity="center"
android:text="会员免费"
android:textColor="@color/color_9F6A32"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_vip_coin"
android:layout_width="260dp"
android:layout_height="45dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="30dp"
android:background="@drawable/shape_bg_hall_btn3"
android:gravity="center"
android:text="直接联系(200金币)"
android:textColor="@color/color_FCE8BA"
android:textSize="14sp" />
</LinearLayout>
<ImageView
android:id="@+id/iv_avatar"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_centerHorizontal="true"
android:layout_marginBottom="-35dp"
android:src="@mipmap/ic_my_avat" />
<ImageView
android:id="@+id/iv_close"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_below="@id/ll_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"
android:src="@mipmap/ic_close" />
</RelativeLayout>
</FrameLayout>
......@@ -7,9 +7,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_10"
android:layout_marginEnd="@dimen/dp_10"
android:background="@drawable/shape_bg_write"
android:background="@drawable/shape_main_black"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
......@@ -25,13 +23,13 @@
android:layout_marginTop="15dp"
android:layout_marginBottom="15dp"
android:text="@string/app_name"
android:textColor="@color/main_mints"
android:textColor="@color/white"
android:textSize="22sp" />
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="@color/main_mints" />
android:background="@color/white" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
......@@ -64,7 +62,7 @@
android:layout_marginTop="2dp"
android:gravity="center"
android:text="取消"
android:textColor="@color/black"
android:textColor="@color/white"
android:textSize="16sp"
app:layout_constraintEnd_toStartOf="@id/tv_confirm"
app:layout_constraintHorizontal_weight="1"
......
......@@ -3,39 +3,56 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:background="@color/color_232122"
android:orientation="vertical"
android:paddingTop="30dp">
<LinearLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:gravity="center_vertical">
android:layout_height="wrap_content">
<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_msg"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_marginStart="10dp"
android:layout_weight="1"
app:tabIndicatorColor="@color/red"
app:tabIndicatorHeight="2dp"
app:tabMode="fixed"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:layout_marginRight="10dp"
app:tabBackground="@null"
app:tabIndicatorHeight="0dp"
app:tabMaxWidth="200dp"
app:tabMinWidth="20dp"
app:tabMode="scrollable"
app:tabPaddingEnd="6dp"
app:tabPaddingStart="6dp"
app:tabRippleColor="@null" />
<TextView
android:id="@+id/tv_clear_noread"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="清除未读" />
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_clear_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="清除列表" />
<TextView
android:id="@+id/tv_clear_noread"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="清除未读"
android:textColor="@color/white" />
<TextView
android:id="@+id/tv_clear_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text="清除列表"
android:textColor="@color/white" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/vp2"
......
......@@ -60,7 +60,7 @@
</com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
......@@ -70,6 +70,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</androidx.core.widget.NestedScrollView>
</FrameLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment