优化
This commit is contained in:
parent
2d456c0afd
commit
3735616af5
@ -17,16 +17,21 @@ import com.shayu.onetoone.activity.AbsOTOActivity;
|
|||||||
import com.shayu.onetoone.adapter.LabelTagAdapter;
|
import com.shayu.onetoone.adapter.LabelTagAdapter;
|
||||||
import com.shayu.onetoone.adapter.LableChooseAdapter;
|
import com.shayu.onetoone.adapter.LableChooseAdapter;
|
||||||
import com.shayu.onetoone.bean.LabelBean;
|
import com.shayu.onetoone.bean.LabelBean;
|
||||||
|
import com.shayu.onetoone.bean.UserBean;
|
||||||
import com.shayu.onetoone.manager.OTONetManager;
|
import com.shayu.onetoone.manager.OTONetManager;
|
||||||
import com.shayu.onetoone.manager.RouteManager;
|
import com.shayu.onetoone.manager.RouteManager;
|
||||||
import com.xuexiang.xui.widget.flowlayout.FlowTagLayout;
|
import com.xuexiang.xui.widget.flowlayout.FlowTagLayout;
|
||||||
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.bean.HttpCallbackModel;
|
import com.yunbao.common.bean.HttpCallbackModel;
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import io.rong.imkit.userinfo.RongUserInfoManager;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置标签
|
* 设置标签
|
||||||
@ -69,10 +74,41 @@ public class ChooseLabelActivity extends AbsOTOActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<LabelBean> data) {
|
public void onSuccess(List<LabelBean> data) {
|
||||||
lableChooseAdapter.setList(data);
|
lableChooseAdapter.setList(data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (isUserHome) {
|
||||||
|
next.setVisibility(View.GONE);
|
||||||
|
getUserLabel();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void getUserLabel() {
|
||||||
|
|
||||||
|
OTONetManager.getInstance(mContext).getBaseInfos(true, new com.yunbao.common.http.base.HttpCallback<com.shayu.onetoone.bean.UserBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(com.shayu.onetoone.bean.UserBean data) {
|
||||||
|
String[] strs = data.getInfo().getCn_label().split(",");
|
||||||
|
List<String> tempStrlist = Arrays.asList(strs);
|
||||||
|
|
||||||
|
String[] ids = data.getInfo().getLabel_id().split(",");
|
||||||
|
List<String> tempIdlist = Arrays.asList(ids);
|
||||||
|
|
||||||
|
for (int i = 0; i < tempStrlist.size(); i++) {
|
||||||
|
myLabelList.add(new LabelBean.Children(Integer.parseInt(tempIdlist.get(i)), tempStrlist.get(i)));
|
||||||
|
}
|
||||||
|
myAdapter.setData(myLabelList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ public class SettingActivity extends AbsActivity {
|
|||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
private void intiData() {
|
private void intiData() {
|
||||||
versionCode.setText(VersionUtil.getVersion());
|
versionCode.setText(VersionUtil.getVersion());
|
||||||
cacheSize.setText(GlideCatchUtil.getInstance().getCacheSize() + "MB");
|
cacheSize.setText(GlideCatchUtil.getInstance().getCacheSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ public class LabelBean extends BaseModel {
|
|||||||
private String en_title;
|
private String en_title;
|
||||||
private List<Children> children;
|
private List<Children> children;
|
||||||
|
|
||||||
public class Children {
|
public static class Children {
|
||||||
private int id;
|
private int id;
|
||||||
private int pid;
|
private int pid;
|
||||||
private String cn_title;
|
private String cn_title;
|
||||||
@ -30,6 +30,12 @@ public class LabelBean extends BaseModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Children() {
|
public Children() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Children(int id, String cn_title) {
|
||||||
|
this.id = id;
|
||||||
|
this.cn_title = cn_title;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
|
|
||||||
<com.makeramen.roundedimageview.RoundedImageView
|
<com.makeramen.roundedimageview.RoundedImageView
|
||||||
android:id="@+id/avatar"
|
android:id="@+id/avatar"
|
||||||
android:layout_width="46dp"
|
android:layout_width="45dp"
|
||||||
android:layout_height="46dp"
|
android:layout_height="45dp"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginRight="25dp"
|
android:layout_marginRight="25dp"
|
||||||
@ -350,11 +350,11 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginLeft="70dp"
|
android:layout_marginLeft="70dp"
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginRight="25dp"
|
android:layout_marginRight="25dp"
|
||||||
android:layout_height="wrap_content">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/auth_status"
|
android:id="@+id/auth_status"
|
||||||
@ -375,13 +375,13 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="16dp"
|
android:layout_width="16dp"
|
||||||
android:layout_height="18dp"
|
android:layout_height="18dp"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:src="@mipmap/icon_arrow_right" />
|
android:src="@mipmap/icon_arrow_right" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
Loading…
x
Reference in New Issue
Block a user