working on title
This commit is contained in:
parent
56427a7621
commit
b816fcd07a
|
@ -279,13 +279,13 @@ private int bottomSelectedIndex;
|
|||
public void swithToolbarItems( ) {
|
||||
|
||||
Log.e( TAG, "swithToolbarItems: " );
|
||||
boolean showToggle =bottomSelectedIndex !=1;
|
||||
boolean showToggle =true;//bottomSelectedIndex !=1;
|
||||
boolean showSpinner = bottomSelectedIndex ==1;
|
||||
boolean showTitle = bottomSelectedIndex !=1;
|
||||
String title = bottomSelectedIndex==0?"我的书架":"排行榜";
|
||||
|
||||
toggle.setDrawerIndicatorEnabled(showToggle);
|
||||
toggle.syncState();
|
||||
// txtTitle.setVisibility(View.GONE);
|
||||
// toggle.setDrawerIndicatorEnabled(showToggle);
|
||||
// toggle.syncState();
|
||||
|
||||
spinner.setVisibility( showSpinner?View.VISIBLE:View.GONE);
|
||||
|
||||
|
@ -296,7 +296,7 @@ private int bottomSelectedIndex;
|
|||
title ="";
|
||||
}
|
||||
txtTitle.setText(title);
|
||||
this.setTitle(title);
|
||||
// this.setTitle(title);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ public class HttpMethods {
|
|||
public Response intercept(Chain chain) throws IOException {
|
||||
Response originalResponse = chain.proceed(chain.request());
|
||||
String cacheControl = originalResponse.header("Cache-Control");
|
||||
int maxAge =0; //一小时
|
||||
int maxAge =60*60; //一小时
|
||||
if (cacheControl == null || cacheControl.contains("no-store") || cacheControl.contains("no-cache") ||
|
||||
cacheControl.contains("must-revalidate") || cacheControl.contains("max-age=0")) { //目标网站禁用cache则设置为1小时
|
||||
return originalResponse.newBuilder()
|
||||
|
@ -252,11 +252,7 @@ public class HttpMethods {
|
|||
.header("Cache-Control", "public, max-age=" + maxAge)
|
||||
.build();
|
||||
} else {
|
||||
return originalResponse.newBuilder()
|
||||
.removeHeader("Pragma")
|
||||
.header("Cache-Control", "public, max-age=" + maxAge)
|
||||
.build();
|
||||
// return originalResponse;
|
||||
return originalResponse;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
android:layout_weight="1"
|
||||
android:visibility="visible"
|
||||
android:textColor="@color/white"
|
||||
android:background="@color/colorAccent"
|
||||
|
||||
/>
|
||||
<android.support.v7.widget.AppCompatSpinner
|
||||
android:id="@+id/sexSelect"
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
android:gravity="center">
|
||||
<LinearLayout
|
||||
android:id="@+id/llTuijian2"
|
||||
|
|
Loading…
Reference in New Issue