Commit 8afee2bd1e51efccbe98689758c1f6b9ab1d314a
1 parent
38c88362
Exists in
yxb_dev
and in
2 other branches
no message
Showing
4 changed files
with
13 additions
and
10 deletions
Show diff stats
app/src/main/AndroidManifest.xml
app/src/main/java/com/shunzhi/parent/adapter/SchoolListAdapter.java
| ... | ... | @@ -32,7 +32,6 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { |
| 32 | 32 | public SchoolListAdapter(Context context, List<SortBean> list) { |
| 33 | 33 | this.context = context; |
| 34 | 34 | this.list = list; |
| 35 | - Log.e("sss-===",list.size()+""); | |
| 36 | 35 | ischeck = new boolean[list.size()]; |
| 37 | 36 | for (int i=0;i<ischeck.length;i++){ |
| 38 | 37 | ischeck[i]=false; |
| ... | ... | @@ -93,12 +92,18 @@ public class SchoolListAdapter extends BaseRecyclerViewAdapter<SortBean> { |
| 93 | 92 | item_view.setOnClickListener(new View.OnClickListener() { |
| 94 | 93 | @Override |
| 95 | 94 | public void onClick(View v) { |
| 96 | - ischeck[position] = true; | |
| 97 | - if(currentPosition!=-1) { | |
| 95 | + if(ischeck[position]){ | |
| 96 | + currentPosition=-1; | |
| 98 | 97 | ischeck[currentPosition] = false; |
| 98 | + currentSortBean = null; | |
| 99 | + }else { | |
| 100 | + ischeck[position] = true; | |
| 101 | + if (currentPosition != -1) { | |
| 102 | + ischeck[currentPosition] = false; | |
| 103 | + } | |
| 104 | + currentPosition = position; | |
| 105 | + currentSortBean = object; | |
| 99 | 106 | } |
| 100 | - currentPosition = position; | |
| 101 | - currentSortBean=object; | |
| 102 | 107 | notifyDataSetChanged(); |
| 103 | 108 | } |
| 104 | 109 | }); | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/activity/binding/SelectSchoolActivity.java
| ... | ... | @@ -96,7 +96,7 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContra |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | private void setSchoolList() { |
| 99 | - mPresenter.schoolListResult(AppContext.getInstance().cityName, ""); | |
| 99 | + mPresenter.schoolListResult(AppContext.getInstance().district, ""); | |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | @Override | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/activity/mywebview/WebViewActivity.java
| ... | ... | @@ -4,7 +4,6 @@ import android.content.Context; |
| 4 | 4 | import android.content.Intent; |
| 5 | 5 | import android.graphics.Bitmap; |
| 6 | 6 | import android.os.Bundle; |
| 7 | -import android.util.Log; | |
| 8 | 7 | import android.view.View; |
| 9 | 8 | import android.webkit.JavascriptInterface; |
| 10 | 9 | import android.webkit.WebChromeClient; |
| ... | ... | @@ -68,7 +67,7 @@ public class WebViewActivity extends BaseCompatActivity { |
| 68 | 67 | @Override |
| 69 | 68 | public void onClick(View v) { |
| 70 | 69 | if(type!=-1&&type!= AppConfig.ORDER_CENTER) { |
| 71 | - startActivity(new Intent().setClass(WebViewActivity.this, MainActivity.class)); | |
| 70 | + startActivity(new Intent().setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP).setClass(WebViewActivity.this, MainActivity.class)); | |
| 72 | 71 | }else{ |
| 73 | 72 | finish(); |
| 74 | 73 | } |
| ... | ... | @@ -134,7 +133,7 @@ public class WebViewActivity extends BaseCompatActivity { |
| 134 | 133 | } else { |
| 135 | 134 | super.onBackPressedSupport(); |
| 136 | 135 | if (type != -1 && type != AppConfig.ORDER_CENTER) { |
| 137 | - startActivity(new Intent().setClass(this, MainActivity.class)); | |
| 136 | + startActivity(new Intent().setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP).setClass(this, MainActivity.class)); | |
| 138 | 137 | } |
| 139 | 138 | } |
| 140 | 139 | } | ... | ... |