This commit is contained in:
hch
2024-03-22 17:47:12 +08:00
parent 2cc58b920f
commit 4d4d3d1bae
19 changed files with 173 additions and 77 deletions

View File

@@ -1,5 +1,6 @@
package com.yunbao.common;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
@@ -12,6 +13,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yunbao.common.bean.ConfigBean;
import com.yunbao.common.bean.FansMedalBean;
import com.yunbao.common.bean.NewCommunityType;
import com.yunbao.common.bean.UserBean;
import com.yunbao.common.bean.UserItemBean;
import com.yunbao.common.http.CommonHttpUtil;
@@ -117,10 +119,45 @@ public class CommonAppConfig {
private String mAppName;
private Boolean mTiBeautyEnable;//是否使用萌颜 true使用萌颜 false 使用基础美颜
public static List<NewCommunityType> getCommunityTypeList(Context mContext) {
NewCommunityType type0 = new NewCommunityType();
type0.setId(0);
type0.setTalk_name(mContext.getString(R.string.recomment));
NewCommunityType type17 = new NewCommunityType();
type17.setId(17);
type17.setTalk_name(mContext.getResources().getString(R.string.main_active_type_01));
NewCommunityType type16 = new NewCommunityType();
type16.setId(16);
type16.setTalk_name(mContext.getResources().getString(R.string.main_active_type_02));
NewCommunityType type15 = new NewCommunityType();
type15.setId(15);
type15.setTalk_name(mContext.getResources().getString(R.string.main_active_type_03));
NewCommunityType type14 = new NewCommunityType();
type14.setId(14);
type14.setTalk_name(mContext.getResources().getString(R.string.main_active_type_04));
NewCommunityType type13 = new NewCommunityType();
type13.setId(13);
type13.setTalk_name(mContext.getResources().getString(R.string.main_active_type_05));
List<NewCommunityType> newCommunityTypeList = new ArrayList<>();
newCommunityTypeList.add(type0);
newCommunityTypeList.add(type17);
newCommunityTypeList.add(type16);
newCommunityTypeList.add(type15);
newCommunityTypeList.add(type14);
newCommunityTypeList.add(type13);
return newCommunityTypeList;
}
public String getUid() {
if (TextUtils.isEmpty(mUid)) {
String[] uidAndToken = SpUtil.getInstance()
.getMultiStringValue(new String[]{SpUtil.UID, SpUtil.TOKEN});
String[] uidAndToken = SpUtil.getInstance().getMultiStringValue(new String[]{SpUtil.UID, SpUtil.TOKEN});
if (uidAndToken != null) {
if (!TextUtils.isEmpty(uidAndToken[0]) && !TextUtils.isEmpty(uidAndToken[1])) {
mUid = uidAndToken[0];
@@ -311,9 +348,7 @@ public class CommonAppConfig {
mUid = null;
mToken = null;
mLoginIM = false;
SpUtil.getInstance().removeValue(
SpUtil.UID, SpUtil.TOKEN, SpUtil.USER_INFO, SpUtil.IM_LOGIN
);
SpUtil.getInstance().removeValue(SpUtil.UID, SpUtil.TOKEN, SpUtil.USER_INFO, SpUtil.IM_LOGIN);
}
@@ -349,12 +384,7 @@ public class CommonAppConfig {
mProvince = null;
mCity = null;
mDistrict = null;
SpUtil.getInstance().removeValue(
SpUtil.LOCATION_LNG,
SpUtil.LOCATION_LAT,
SpUtil.LOCATION_PROVINCE,
SpUtil.LOCATION_CITY,
SpUtil.LOCATION_DISTRICT);
SpUtil.getInstance().removeValue(SpUtil.LOCATION_LNG, SpUtil.LOCATION_LAT, SpUtil.LOCATION_PROVINCE, SpUtil.LOCATION_CITY, SpUtil.LOCATION_DISTRICT);
}

View File

@@ -3,6 +3,7 @@ package com.yunbao.common.bean;
public class NewCommunityType extends BaseModel {
private int id;
private String talk_name;
private String talk_name_en;
private String img;
private String is_hot;
private String hot_time;
@@ -11,13 +12,12 @@ public class NewCommunityType extends BaseModel {
public NewCommunityType() {
}
public NewCommunityType(int id, String talk_name, String img, String is_hot, String hot_time, String sort) {
this.id = id;
this.talk_name = talk_name;
this.img = img;
this.is_hot = is_hot;
this.hot_time = hot_time;
this.sort = sort;
public String getTalk_name_en() {
return talk_name_en;
}
public void setTalk_name_en(String talk_name_en) {
this.talk_name_en = talk_name_en;
}
public int getId() {

View File

@@ -36,7 +36,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="请输入200字以内的文字"
android:text="@string/_200"
android:textColor="#333333" />
</LinearLayout>
@@ -50,7 +50,7 @@
android:layout_marginBottom="15dp"
android:background="@color/white"
android:gravity="start"
android:hint="写点什么写点什么写点什么写点什么写点什么写点什么写点什么写点什么写点什么写点什么写点什么写点什么写点什么写点什么写点什么写点什么..."
android:hint="@string/video_say_something"
android:maxEms="200"
android:maxLength="200"
android:textSize="14dp" />
@@ -112,7 +112,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="图文"
android:text="@string/pricture"
android:textColor="#333333"
android:textSize="14dp" />
@@ -135,7 +135,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="视频"
android:text="@string/video"
android:textColor="#333333"
android:textSize="14dp" />
@@ -172,7 +172,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="选择话题"
android:text="@string/choose_topic"
android:textColor="#333333"
android:textSize="14dp"
android:textStyle="bold" />
@@ -218,7 +218,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="选择时间"
android:text="@string/send_active_time"
android:textColor="#333333"
android:textSize="14dp"
android:textStyle="bold" />
@@ -229,7 +229,7 @@
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="立即发表"
android:text="@string/now_send"
android:textColor="#333333"
android:textSize="12dp" />

View File

@@ -320,7 +320,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:visibility="gone">
android:visibility="visible">
<ImageView
android:layout_width="25dp"
@@ -375,7 +375,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="主播粉絲團"
android:text="@string/user_home_anchor"
android:textColor="#333333"
android:textSize="12dp"
android:textStyle="bold" />
@@ -384,7 +384,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="粉絲團名稱"
android:text="@string/fan_group_name"
android:textColor="#777777"
android:textSize="14dp" />
@@ -823,7 +823,7 @@
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:paddingLeft="5dp"
android:text="编辑资料"
android:text="@string/edit_profile"
android:textColor="@color/white"
android:textSize="14dp"
android:textStyle="bold" />

View File

@@ -65,7 +65,7 @@
android:paddingLeft="15dp"
android:gravity="center"
android:paddingRight="15dp"
android:text="发布"
android:text="@string/send"
android:textColor="@color/white"
android:textSize="16dp"
android:visibility="gone" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 KiB

View File

@@ -258,7 +258,7 @@
<string name="live">Live broadcast</string>
<string name="login_tip_4">Log in</string>
<string name="shopmall">shopmall</string>
<string name="recomment">Recommend</string>
<string name="recomment">Hot</string>
<string name="main_type_find">Find</string>
<string name="cust_server">CSD</string>
<string name="live_anchor">Anchor</string>

View File

@@ -10,5 +10,18 @@
<string name="_9">Add up to 9 pictures</string>
<string name="not_interested">not interested</string>
<string name="person_like">people liked it</string>
<string name="fan_group_name">主播守護團</string>
<string name="fan_group_name">Fan group name</string>
<string name="user_home_anchor">Anchor fan group</string>
<string name="main_active_type_01">Beauty</string>
<string name="main_active_type_02">Rookie</string>
<string name="main_active_type_03">Figure</string>
<string name="main_active_type_04">Live</string>
<string name="main_active_type_05">Life</string>
<string name="send_active_time">Selection period</string>
<string name="now_send">Now</string>
<string name="choose_topic">Select topic</string>
<string name="pricture">picture</string>
<string name="_200">Please enter text within 200 words</string>
<string name="time_hour">hour</string>
<string name="time_minute">minute</string>
</resources>

View File

@@ -1476,4 +1476,17 @@
<string name="not_interested">不感興趣</string>
<string name="person_like">人觉得很赞</string>
<string name="fan_group_name">主播守護團</string>
<string name="user_home_anchor">主播粉絲團</string>
<string name="main_active_type_01">美圖</string>
<string name="main_active_type_02">新秀</string>
<string name="main_active_type_03">身材</string>
<string name="main_active_type_04">直播</string>
<string name="main_active_type_05">生活</string>
<string name="send_active_time">選擇時間</string>
<string name="now_send">立即發表</string>
<string name="choose_topic">選擇話題</string>
<string name="pricture">圖文</string>
<string name="_200">请输入200字以内的文字</string>
<string name="time_hour"></string>
<string name="time_minute"></string>
</resources>

View File

@@ -1476,4 +1476,17 @@
<string name="not_interested">不感興趣</string>
<string name="person_like">人觉得很赞</string>
<string name="fan_group_name">主播守護團</string>
<string name="user_home_anchor">主播粉絲團</string>
<string name="main_active_type_01">美圖</string>
<string name="main_active_type_02">新秀</string>
<string name="main_active_type_03">身材</string>
<string name="main_active_type_04">直播</string>
<string name="main_active_type_05">生活</string>
<string name="send_active_time">選擇時間</string>
<string name="now_send">立即發表</string>
<string name="choose_topic">選擇話題</string>
<string name="pricture">圖文</string>
<string name="_200">请输入200字以内的文字</string>
<string name="time_hour"></string>
<string name="time_minute"></string>
</resources>

View File

@@ -1473,4 +1473,17 @@
<string name="not_interested">不感興趣</string>
<string name="person_like">人觉得很赞</string>
<string name="fan_group_name">主播守護團</string>
<string name="user_home_anchor">主播粉絲團</string>
<string name="main_active_type_01">美圖</string>
<string name="main_active_type_02">新秀</string>
<string name="main_active_type_03">身材</string>
<string name="main_active_type_04">直播</string>
<string name="main_active_type_05">生活</string>
<string name="send_active_time">選擇時間</string>
<string name="now_send">立即發表</string>
<string name="choose_topic">選擇話題</string>
<string name="pricture">圖文</string>
<string name="_200">请输入200字以内的文字</string>
<string name="time_hour"></string>
<string name="time_minute"></string>
</resources>

View File

@@ -258,7 +258,7 @@
<string name="live">Live broadcast</string>
<string name="login_tip_4">Log in</string>
<string name="shopmall">shopmall</string>
<string name="recomment">Recommend</string>
<string name="recomment">Hot</string>
<string name="main_type_find">Find</string>
<string name="cust_server">CSD</string>
<string name="live_anchor">Anchor</string>
@@ -669,7 +669,7 @@
<string name="receive_awards">ReceiveAwards</string>
<string name="one_free">One free gift privilege!</string>
<string name="send">Send</string>
<string name="send">release</string>
<string name="sorry">I am sorry</string>
<string name="video">video</string>
<string name="FILE_PROVIDER">myname.pdlive.shayu.fileprovider</string>
@@ -1495,6 +1495,19 @@ Limited ride And limited avatar frame</string>
<string name="not_interested">不感興趣</string>
<string name="person_like">人觉得很赞</string>
<string name="fan_group_name">主播守護團</string>
<string name="user_home_anchor">主播粉絲團</string>
<string name="main_active_type_01">美圖</string>
<string name="main_active_type_02">新秀</string>
<string name="main_active_type_03">身材</string>
<string name="main_active_type_04">直播</string>
<string name="main_active_type_05">生活</string>
<string name="send_active_time">選擇時間</string>
<string name="now_send">立即發表</string>
<string name="choose_topic">選擇話題</string>
<string name="pricture">圖文</string>
<string name="_200">请输入200字以内的文字</string>
<string name="time_hour"></string>
<string name="time_minute"></string>
</resources>