Commit ee250984 by 霍志良

feat:UI

parent 018a071b
......@@ -10,7 +10,7 @@ ext {
"m-fm" : "0.0.30.03",
"m-user" : "0.0.61.37",
"m-home" : "0.0.22.67",
"m-im" : "0.0.19.41",
"m-im" : "0.0.19.42",
"m-dynamic" : "0.0.7.24",
"m-article" : "0.0.0.10",
......@@ -93,7 +93,7 @@ ext {
"m-fm" : "0.0.30.01",
"m-user" : "0.0.61.37",
"m-home" : "0.0.22.67",
"m-im" : "0.0.19.39",
"m-im" : "0.0.19.42",
"m-dynamic" : "0.0.7.24",
"m-article" : "0.0.0.8",
......
......@@ -18,6 +18,7 @@ public class MsgViewHolderLingxiAnswerQuestion extends MsgViewHolderBase {
private ArrayList<QuestionItemBean> itemBeans;
private StringBuffer sb;
private boolean isContainsOther=false;
private String others;
public MsgViewHolderLingxiAnswerQuestion(BaseMultiItemFetchLoadAdapter adapter) {
super(adapter);
}
......@@ -47,33 +48,29 @@ public class MsgViewHolderLingxiAnswerQuestion extends MsgViewHolderBase {
sb=new StringBuffer();
for (int j=0;j<itemBeans.size();j++){
if (itemBeans.get(j).getOther().trim().length()>0){
others= itemBeans.get(j).getOther();
isContainsOther=true;
break;
}
}
for (int i=0;i<itemBeans.size();i++){
if (i==(itemBeans.size()-1)&&itemBeans.get(i).getName().contains("其他")){
if (itemBeans.get(i).getOther().trim().length()>0){
//如果其他有内容就换行
sb.append("#"+itemBeans.get(i).getName()+"\r\n ").append(itemBeans.get(i).getOther());
}else{
sb.append("、"+itemBeans.get(i).getName());
}
}else{
if (isContainsOther){
sb.append("#"+itemBeans.get(i).getName()+" ");
}else{
sb.append("、"+itemBeans.get(i).getName()+" ");
}
}
}
if (itemBeans.size()==1&&!itemBeans.get(0).getName().contains("其他")){
answer_question.setText(itemBeans.get(0).getName());
}else{
if (!isContainsOther){
sb.replace(0,1,"");
}
if (others==null&&others.isEmpty()){
answer_question.setText(sb.toString());
}else{
answer_question.setText(sb.append("\r\n").append(others).toString());
}
}
}
}
......@@ -107,7 +107,7 @@ public class MsgViewHolderLingxiWhichQuestion extends MsgViewHolderBase implemen
}
for (int i = 0; i < questionList.size(); i++) {
questionList.get(i).setSelected(false);
if (questionList.get(i).getName().length() > 6) {
if (questionList.get(i).getName().length() > 5) {
isSingleChoice = true;
}
}
......
......@@ -1084,7 +1084,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
if (event.getStrSelected().contains("其他")){
question_multiple.setVisibility(View.VISIBLE);
question_multiple.setText(event.getStrSelected().replace("、","#"));
question_multiple.setText(event.getStrSelected());
}
}
}else if (event.isFromInputPanel()){
......
......@@ -3,13 +3,15 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="婚姻家庭婚"
android:text="婚姻家庭婚"
android:textColor="@color/platform_color_1DA1F2"
android:gravity="center"
android:minWidth="110dp"
android:maxWidth="110dp"
android:background="@drawable/im_background_18dp_e8f5fe"
android:paddingTop="@dimen/platform_dp_8"
android:paddingBottom="@dimen/platform_dp_8"
android:textSize="@dimen/im_text_size_15"
android:id="@+id/tv_which_question"
android:layout_marginBottom="@dimen/platform_dp_16"
android:layout_marginRight="@dimen/platform_dp_9"
......
......@@ -31,6 +31,7 @@
android:layout_height="wrap_content"
android:orientation="vertical"
android:minWidth="263dp"
android:maxWidth="263dp"
app:layout_constraintTop_toBottomOf="@id/multiple_choice_title"
app:layout_constraintStart_toStartOf="@id/multiple_choice_title"
app:layout_constraintEnd_toEndOf="parent"
......
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