diff --git a/app/src/main/java/com/monke/monkeybook/base/MBaseActivity.java b/app/src/main/java/com/monke/monkeybook/base/MBaseActivity.java index 11b27c9..e288f07 100644 --- a/app/src/main/java/com/monke/monkeybook/base/MBaseActivity.java +++ b/app/src/main/java/com/monke/monkeybook/base/MBaseActivity.java @@ -66,7 +66,7 @@ public void onWindowFocusChanged(boolean hasFocus) { @Override public boolean onCreateOptionsMenu(Menu menu) { if (menu != null) { - if(menu instanceof MenuBuilder) { + if (menu instanceof MenuBuilder) { ((MenuBuilder) menu).setOptionalIconsVisible(true); } for (int i = 0; i < menu.size(); i++) { diff --git a/app/src/main/java/com/monke/monkeybook/widget/theme/AppCompat.java b/app/src/main/java/com/monke/monkeybook/widget/theme/AppCompat.java index 407c361..1ce952e 100644 --- a/app/src/main/java/com/monke/monkeybook/widget/theme/AppCompat.java +++ b/app/src/main/java/com/monke/monkeybook/widget/theme/AppCompat.java @@ -26,6 +26,7 @@ import com.google.android.material.internal.NavigationMenuView; import com.google.android.material.navigation.NavigationView; import com.monke.monkeybook.R; +import com.monke.monkeybook.utils.DensityUtil; import com.monke.monkeybook.utils.ScreenUtils; import java.lang.reflect.Field; @@ -53,7 +54,7 @@ public static void useCustomIconForSearchView(SearchView searchView, String hint searchIcon.setBounds(0, 0, textSize, textSize); setTint(searchIcon, normalColor); searchText.setCompoundDrawablesRelative(searchIcon, null, null, null); - searchText.setCompoundDrawablePadding(ScreenUtils.dpToPx(5)); + searchText.setCompoundDrawablePadding(DensityUtil.dp2px(searchText.getContext(), 5)); searchText.setIncludeFontPadding(false); AppCompatImageView close = searchView.findViewById(R.id.search_close_btn); @@ -62,11 +63,12 @@ public static void useCustomIconForSearchView(SearchView searchView, String hint LinearLayout plate = searchView.findViewById(R.id.search_plate); LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) plate.getLayoutParams(); - params.topMargin = ScreenUtils.dpToPx(5); - params.bottomMargin = ScreenUtils.dpToPx(5); + params.topMargin = DensityUtil.dp2px(plate.getContext(), 5); + params.bottomMargin = params.topMargin; plate.setLayoutParams(params); - plate.setPaddingRelative(ScreenUtils.dpToPx(6), 0, ScreenUtils.dpToPx(6), 0); + int padding = DensityUtil.dp2px(plate.getContext(), 6); + plate.setPaddingRelative(padding, 0, padding, 0); if (showBg) { Drawable bag = searchView.getResources().getDrawable(R.drawable.bg_search_field); diff --git a/app/version.properties b/app/version.properties index aa520b0..f79431e 100644 --- a/app/version.properties +++ b/app/version.properties @@ -1,2 +1,2 @@ -#Fri Jun 21 15:54:21 CST 2019 -VERSION_CODE=3132 +#Thu Jun 27 16:20:14 CST 2019 +VERSION_CODE=3134 diff --git a/basemvplib/build.gradle b/basemvplib/build.gradle index 7caec36..df0a08f 100644 --- a/basemvplib/build.gradle +++ b/basemvplib/build.gradle @@ -14,8 +14,6 @@ android { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } - android { - } } compileOptions { @@ -33,7 +31,6 @@ dependencies { api 'io.reactivex.rxjava2:rxandroid:2.1.1' api 'io.reactivex.rxjava2:rxjava:2.2.10' //Retrofit - api 'com.squareup.okhttp3:logging-interceptor:4.0.0' api 'com.squareup.retrofit2:retrofit:2.6.0' api 'com.squareup.retrofit2:adapter-rxjava2:2.6.0' api 'com.squareup.retrofit2:converter-scalars:2.6.0' diff --git a/basemvplib/src/main/java/com/monke/basemvplib/OkHttpHelper.java b/basemvplib/src/main/java/com/monke/basemvplib/OkHttpHelper.java index 3b9124a..1245d1f 100644 --- a/basemvplib/src/main/java/com/monke/basemvplib/OkHttpHelper.java +++ b/basemvplib/src/main/java/com/monke/basemvplib/OkHttpHelper.java @@ -112,6 +112,7 @@ private Interceptor getHeaderInterceptor() { }; } + //请求头拦截器 public class RequestHeadersInterceptor implements Interceptor { @Override @@ -126,6 +127,7 @@ public Response intercept(Chain chain) throws IOException { } } + //响应头拦截器 public class CacheControlInterceptor implements Interceptor { @Override