Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

android / dayu

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit 555b1333 authored 4 years ago by mReturn's avatar mReturn
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

优化sop设置项显示方式

parent 197dd59e
Show whitespace changes
Inline Side-by-side
Showing with 42 additions and 16 deletions
  • baseSDK/src/main/java/com/dayu/utils/CommonUtils.java
  • orderCenter/src/main/java/com/dayu/order/ui/activity/SopLocalActivity.java
  • orderCenter/src/main/res/layout/activity_konwledge_detail.xml
  • orderCenter/src/main/res/layout/activity_konwledge_query.xml
  • orderCenter/src/main/res/layout/activity_sop_local.xml
  • orderCenter/src/main/res/layout/item_knowledge_list.xml
baseSDK/src/main/java/com/dayu/utils/CommonUtils.java
View file @ 555b1333
......@@ -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();
}
......
This diff is collapsed. Click to expand it.
orderCenter/src/main/java/com/dayu/order/ui/activity/SopLocalActivity.java
View file @ 555b1333
......@@ -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 {
......
This diff is collapsed. Click to expand it.
orderCenter/src/main/res/layout/activity_konwledge_detail.xml
View file @ 555b1333
......@@ -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,6 +29,16 @@
</RelativeLayout>
<ImageView style="@style/card_line" />
<ScrollView
android:layout_width="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"
......@@ -37,10 +46,22 @@
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
This diff is collapsed. Click to expand it.
orderCenter/src/main/res/layout/activity_konwledge_query.xml
View file @ 555b1333
......@@ -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"
......
This diff is collapsed. Click to expand it.
orderCenter/src/main/res/layout/activity_sop_local.xml
View file @ 555b1333
......@@ -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="选项:" />
......
This diff is collapsed. Click to expand it.
orderCenter/src/main/res/layout/item_knowledge_list.xml
View file @ 555b1333
......@@ -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"
......
This diff is collapsed. Click to expand it.
  • Write
  • Preview
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