Commit 555b1333 by mReturn

优化sop设置项显示方式

parent 197dd59e
......@@ -133,7 +133,7 @@ public class CommonUtils {
* @return
*/
public static boolean isDoc(String name){
String reg = "(pdf|doc|docx|xls|xlsx)";
String reg = "(txt|doc|docx|xls|xlsx)";
Pattern p = Pattern.compile(reg);
return p.matcher(name).find();
}
......
......@@ -164,6 +164,7 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
mBind.rbNo.setChecked(true);
}
setAnswerStatuView();
mBind.llContent.setVisibility(View.VISIBLE);
}
mBind.btnNext.setOnClickListener(view -> {
preSaveData();
......@@ -172,7 +173,14 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
//根据是否已设置sop判断布局显示
private void setAnswerStatuView() {
if (TextUtils.isEmpty(currentSop.getTextResult()) && !canEdit) {
if (currentSop.getTextOption()!=2){
mBind.tvRadio.setVisibility(View.GONE);
mBind.rgSop.setVisibility(View.GONE);
}else {
mBind.tvRadio.setVisibility(View.VISIBLE);
mBind.rgSop.setVisibility(View.VISIBLE);
}
if (currentSop.getTextOption()!=2 || TextUtils.isEmpty(currentSop.getTextResult()) && !canEdit) {
mBind.tvRemark.setVisibility(View.GONE);
mBind.edtRemark.setVisibility(View.GONE);
} else {
......@@ -182,7 +190,7 @@ public class SopLocalActivity extends BaseActivity<SImplePresenter, ActivitySopL
}
mImages = (ArrayList<String>) CommonUtils.string2ListUrl(currentSop.getPhotoResult());
mVideos = (ArrayList<String>) CommonUtils.string2ListUrl(currentSop.getVideoResult());
if (mImages.size() == 0 && mVideos.size() == 0 && !canEdit) {
if (currentSop.getPhotoOption()!=2 || mImages.size() == 0 && mVideos.size() == 0 && !canEdit) {
mBind.llPhoto.setVisibility(View.GONE);
mBind.photo.setVisibility(View.GONE);
} else {
......
......@@ -14,9 +14,8 @@
android:id="@+id/tv_title"
style="@style/text_title"
android:layout_width="match_parent"
android:layout_centerHorizontal="false"
android:layout_marginLeft="60dp"
android:layout_marginRight="20dp"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:singleLine="true"
android:gravity="center"
android:text="" />
......@@ -30,17 +29,39 @@
</RelativeLayout>
<ImageView style="@style/card_line" />
<TextView
style="@style/common_text_style"
android:id="@+id/tv_detail"
android:layout_margin="5dp"
android:textSize="14sp"
/>
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerview"
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="wrap_content"
android:overScrollMode="never"
android:scrollbars="none"
>
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
<TextView
style="@style/common_text_style"
android:id="@+id/tv_detail"
android:layout_margin="5dp"
android:textSize="14sp"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="43dp"
android:paddingLeft="15dp"
android:gravity="center_vertical"
android:text="附件"
android:background="#f5f5f5"
android:textColor="@color/cl_home_title_text_color"
android:textSize="14sp" />
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
</ScrollView>
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -48,8 +48,8 @@
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:hint="@string/limit_10_words"
android:maxLength="10" />
android:hint="限20个字"
android:maxLength="20" />
<Button
android:id="@+id/btn_query"
......
......@@ -23,13 +23,6 @@
/>
<TextView
android:id="@+id/tv_right_title"
style="@style/title_right_text"
android:text="@string/company_mobile"
android:textColor="#3faafc"
android:textSize="@dimen/dp_13.3"
android:visibility="gone" />
</RelativeLayout>
<android.support.v4.widget.NestedScrollView
......@@ -39,6 +32,8 @@
android:overScrollMode="never">
<LinearLayout
android:id="@+id/ll_content"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
......@@ -81,6 +76,7 @@
android:orientation="horizontal">
<TextView
android:id="@+id/tv_radio"
style="@style/common_text_style"
android:layout_marginLeft="5dp"
android:text="选项:" />
......
......@@ -52,7 +52,7 @@
style="@style/ll_horizontal"
android:layout_marginLeft="6dp"
android:layout_marginTop="5dp"
android:gravity="bottom">
android:gravity="center_vertical">
<TextView
android:id="@+id/tv_author"
......
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 sign in to comment