修复bug
This commit is contained in:
parent
28f00f1c8a
commit
0324b638fa
@ -119,11 +119,14 @@ 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));
|
||||
|
||||
public static List<NewCommunityType> getCommunityTypeList(boolean isHome, Context mContext) {
|
||||
List<NewCommunityType> newCommunityTypeList = new ArrayList<>();
|
||||
if (isHome) {
|
||||
NewCommunityType type0 = new NewCommunityType();
|
||||
type0.setId(0);
|
||||
type0.setTalk_name(mContext.getString(R.string.recomment));
|
||||
newCommunityTypeList.add(type0);
|
||||
}
|
||||
NewCommunityType type17 = new NewCommunityType();
|
||||
type17.setId(17);
|
||||
type17.setTalk_name(mContext.getResources().getString(R.string.main_active_type_01));
|
||||
@ -144,8 +147,6 @@ public class CommonAppConfig {
|
||||
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);
|
||||
|
@ -36,7 +36,7 @@ public class LabelTagAdapter extends BaseTagAdapter<String, TextView> {
|
||||
|
||||
@Override
|
||||
protected void convert(TextView textView, String item, int position) {
|
||||
textView.setText(item);
|
||||
textView.setText("#"+item);
|
||||
}
|
||||
|
||||
public interface OnSureOnClickListener {
|
||||
|
@ -255,7 +255,7 @@
|
||||
<string name="login_auth_success">Login successfully</string>
|
||||
<string name="login_auth_failure">privilege grant failed</string>
|
||||
<string name="login_auth_cancle">Authorization cancelled</string>
|
||||
<string name="live">Live broadcast</string>
|
||||
<string name="live">Live</string>
|
||||
<string name="login_tip_4">Log in</string>
|
||||
<string name="shopmall">shopmall</string>
|
||||
<string name="recomment">Hot</string>
|
||||
@ -426,7 +426,7 @@
|
||||
<string name="live_pk_time_2">Penalty time</string>
|
||||
<string name="live_no_data_6">No video</string>
|
||||
<string name="live_no_data_7">Let\'s release our own video</string>
|
||||
<string name="main_home">home page</string>
|
||||
<string name="main_home">Home</string>
|
||||
<string name="main_near">nearby</string>
|
||||
<string name="main_list">Ranking</string>
|
||||
<string name="main_me">My</string>
|
||||
|
@ -256,7 +256,7 @@
|
||||
<string name="login_auth_success">Login successfully</string>
|
||||
<string name="login_auth_failure">privilege grant failed</string>
|
||||
<string name="login_auth_cancle">Authorization cancelled</string>
|
||||
<string name="live">Live broadcast</string>
|
||||
<string name="live">Live</string>
|
||||
<string name="login_tip_4">Log in</string>
|
||||
<string name="shopmall">shopmall</string>
|
||||
<string name="recomment">Hot</string>
|
||||
@ -427,7 +427,7 @@
|
||||
<string name="live_pk_time_2">Penalty time</string>
|
||||
<string name="live_no_data_6">No video</string>
|
||||
<string name="live_no_data_7">Let\'s release our own video</string>
|
||||
<string name="main_home">home page</string>
|
||||
<string name="main_home">Home</string>
|
||||
<string name="main_near">nearby</string>
|
||||
<string name="main_list">Ranking</string>
|
||||
<string name="main_me">My</string>
|
||||
|
@ -55,6 +55,8 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import io.rong.imkit.picture.tools.DateUtils;
|
||||
|
||||
public class CommunitySendActivity extends AbsActivity {
|
||||
public static final int PERMISSION_REQUEST_CODE_IMG = 0;
|
||||
public static final int PERMISSION_REQUEST_CODE_VIDEO = 1;
|
||||
@ -91,7 +93,7 @@ public class CommunitySendActivity extends AbsActivity {
|
||||
|
||||
@Override
|
||||
protected void main() {
|
||||
newCommunityTypeList = CommonAppConfig.getCommunityTypeList(mContext);
|
||||
newCommunityTypeList = CommonAppConfig.getCommunityTypeList(false, mContext);
|
||||
content = findViewById(R.id.content);
|
||||
submit = findViewById(R.id.submit);
|
||||
submit.setVisibility(View.VISIBLE);
|
||||
@ -214,7 +216,7 @@ public class CommunitySendActivity extends AbsActivity {
|
||||
|
||||
@Override
|
||||
public void onDel(int position) {
|
||||
|
||||
activeImageAdapter.deleteItem(position);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -222,7 +224,6 @@ public class CommunitySendActivity extends AbsActivity {
|
||||
private void submit() {
|
||||
if (isImage) {
|
||||
if (imgUrlList.size() == 0) {
|
||||
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@ -289,10 +290,17 @@ public class CommunitySendActivity extends AbsActivity {
|
||||
|
||||
public void showTimeChooseDialog() {
|
||||
Calendar startCalendar = Calendar.getInstance();
|
||||
//startCalendar.set(1990, 1, 1);
|
||||
|
||||
startCalendar.set(1990, 1, 1);
|
||||
Calendar endCalendar = Calendar.getInstance();
|
||||
endCalendar.setTime(new Date());
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
int month = calendar.get(Calendar.MONTH) + 1; // Calendar.MONTH 从0开始计数
|
||||
int day = calendar.get(Calendar.DAY_OF_MONTH);
|
||||
int hour = calendar.get(Calendar.HOUR); // 使用24小时制
|
||||
int minute = calendar.get(Calendar.MINUTE);
|
||||
int second = calendar.get(Calendar.SECOND);
|
||||
endCalendar.set(year, month, day, hour, minute, second);
|
||||
|
||||
TimePickerView timePickerView = new TimePickerBuilder(CommunitySendActivity.this, new OnTimeSelectListener() {
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
@ -306,8 +314,7 @@ public class CommunitySendActivity extends AbsActivity {
|
||||
.setTitleText("")//标题文字
|
||||
.setOutSideCancelable(true)//点击屏幕,点在控件外部范围时,是否取消显示
|
||||
.isCyclic(false)//是否循环滚动
|
||||
.setRangDate(startCalendar, endCalendar)
|
||||
.setLabel("", "", "", "", "", "")//默认设置为年月日时分秒
|
||||
.setDate(endCalendar).setRangDate(startCalendar, endCalendar).setLabel("", "", "", "", "", "")//默认设置为年月日时分秒
|
||||
.isCenterLabel(false) //是否只显示中间选中项的label文字,false则每项item全部都带有label。
|
||||
.build();
|
||||
timePickerView.show();
|
||||
|
@ -243,6 +243,7 @@ public class UserHomeActivity extends AbsActivity {
|
||||
authorIcon.setVisibility(View.VISIBLE);
|
||||
authenticationLayout.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
imgUp.setVisibility(View.GONE);
|
||||
authorIcon.setVisibility(View.GONE);
|
||||
authenticationLayout.setVisibility(View.GONE);
|
||||
}
|
||||
@ -309,7 +310,12 @@ public class UserHomeActivity extends AbsActivity {
|
||||
|
||||
}
|
||||
});
|
||||
bannerImgList = userInfo.getUserHomeTopInfo().getUser_home_banner();
|
||||
bannerImgList = new ArrayList<>();
|
||||
if (isAnchor) {
|
||||
bannerImgList = userInfo.getUserHomeTopInfo().getUser_home_banner();
|
||||
} else {
|
||||
bannerImgList.add(userInfo.getUserHomeTopInfo().getUser_avatar());
|
||||
}
|
||||
tempList = new ArrayList<>();
|
||||
for (int i = 0; i < bannerImgList.size(); i++) {
|
||||
tempList.add(new UserHomeImgBean(bannerImgList.get(i)));
|
||||
@ -768,23 +774,10 @@ public class UserHomeActivity extends AbsActivity {
|
||||
tempList.get(0).setShow(true);
|
||||
}
|
||||
userHomeImgAdapter.setCommentBeanList(tempList);
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private File uri2File(Uri uri) {
|
||||
String img_path;
|
||||
String[] proj = {MediaStore.Images.Media.DATA};
|
||||
Cursor actualimagecursor = this.managedQuery(uri, proj, null, null, null);
|
||||
if (actualimagecursor == null) {
|
||||
img_path = uri.getPath();
|
||||
} else {
|
||||
int actual_image_column_index = actualimagecursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
||||
actualimagecursor.moveToFirst();
|
||||
img_path = actualimagecursor.getString(actual_image_column_index);
|
||||
}
|
||||
File file = new File(img_path);
|
||||
return file;
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ public class MainHomeNewViewHolder extends AbsMainHomeChildViewHolder implements
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
List<NewCommunityType> list = CommonAppConfig.getCommunityTypeList(mContext);
|
||||
List<NewCommunityType> list = CommonAppConfig.getCommunityTypeList(true,mContext);
|
||||
typeHot = list.get(0).getTalk_name();
|
||||
select = list.get(0).getId();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user