Commit e56d2f35898d0928b7d8dfa656dc4d656f029aba
1 parent
4065e67b
Exists in
yxb_dev
and in
2 other branches
no message
Showing
3 changed files
with
24 additions
and
1 deletions
Show diff stats
app/src/main/java/com/shunzhi/parent/ui/activity/mywebview/WebViewActivity.java
... | ... | @@ -28,7 +28,7 @@ public class WebViewActivity extends BaseCompatActivity { |
28 | 28 | |
29 | 29 | NestedScrollWebView nesteScrollWebView; |
30 | 30 | LinearLayout binding_success, binding_success2; |
31 | - ImageView close_btn; | |
31 | + ImageView close_btn,close_btn_right; | |
32 | 32 | TextView tv_info, zuoye, title_web; |
33 | 33 | |
34 | 34 | int type; |
... | ... | @@ -62,11 +62,23 @@ public class WebViewActivity extends BaseCompatActivity { |
62 | 62 | |
63 | 63 | binding_success2 = findViewById(R.id.binding_success2); |
64 | 64 | close_btn = findViewById(R.id.close_btn); |
65 | + close_btn_right = findViewById(R.id.close_btn_right); | |
65 | 66 | tv_info = findViewById(R.id.tv_info); |
66 | 67 | zuoye = findViewById(R.id.zuoye); |
67 | 68 | title_web = findViewById(R.id.title_web); |
68 | 69 | |
69 | 70 | |
71 | + close_btn_right.setOnClickListener(new View.OnClickListener() { | |
72 | + @Override | |
73 | + public void onClick(View v) { | |
74 | + if(type!=-1&&type!= AppConfig.ORDER_CENTER) { | |
75 | + startActivity(new Intent().setClass(WebViewActivity.this, MainActivity.class)); | |
76 | + }else{ | |
77 | + finish(); | |
78 | + } | |
79 | + } | |
80 | + }); | |
81 | + | |
70 | 82 | close_btn.setOnClickListener(new View.OnClickListener() { |
71 | 83 | @Override |
72 | 84 | public void onClick(View v) { | ... | ... |
app/src/main/res/drawable-xhdpi/close.png
app/src/main/res/layout/activity_web_view.xml
... | ... | @@ -35,6 +35,17 @@ |
35 | 35 | android:textColor="@color/textColor" |
36 | 36 | |
37 | 37 | /> |
38 | + <ImageView | |
39 | + android:id="@+id/close_btn_right" | |
40 | + android:layout_width="wrap_content" | |
41 | + android:layout_height="match_parent" | |
42 | + android:gravity="center" | |
43 | + android:paddingLeft="@dimen/size_dp_15" | |
44 | + android:src="@drawable/close" | |
45 | + android:layout_alignParentRight="true" | |
46 | + android:paddingRight="@dimen/size_dp_15" | |
47 | + android:textColor="@color/textColor" | |
48 | + android:textSize="@dimen/textSize16" /> | |
38 | 49 | |
39 | 50 | </RelativeLayout> |
40 | 51 | ... | ... |