|
|
@@ -53,17 +53,17 @@ public class DetailActivity extends AppCompatActivity implements
|
|
|
|
|
|
String email_to = null,email_subject = null,email_content = null;
|
|
|
TextView mtitleview;
|
|
|
- @Override
|
|
|
- public void setTitle(CharSequence title) {
|
|
|
-// View mActionBarView = LayoutInflater.from(this).inflate(R.layout.actionbar_customtitle, null);
|
|
|
+// @Override
|
|
|
+// public void setTitle(CharSequence title) {
|
|
|
+//// View mActionBarView = LayoutInflater.from(this).inflate(R.layout.actionbar_customtitle, null);
|
|
|
+////
|
|
|
+//// TextView mtitleviewtitleview = mActionBarView.findViewById(R.id.title);
|
|
|
//
|
|
|
-// TextView mtitleviewtitleview = mActionBarView.findViewById(R.id.title);
|
|
|
-
|
|
|
- if(title==null)
|
|
|
- title="";
|
|
|
- if(mtitleview!=null)
|
|
|
- mtitleview.setText(title);
|
|
|
- }
|
|
|
+// if(title==null)
|
|
|
+// title="";
|
|
|
+// if(mtitleview!=null)
|
|
|
+// mtitleview.setText(title);
|
|
|
+// }
|
|
|
private void setCustomActionBar() {
|
|
|
ActionBar.LayoutParams lp =new ActionBar.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT, ActionBar.LayoutParams.MATCH_PARENT, Gravity.CENTER);
|
|
|
View mActionBarView = LayoutInflater.from(this).inflate(R.layout.actionbar_customtitle, null);
|
|
|
@@ -82,19 +82,20 @@ public class DetailActivity extends AppCompatActivity implements
|
|
|
else if(function_name.equals("Cargo Tracking"))
|
|
|
title="Cargo Detail";
|
|
|
mtitleview.setText(title);
|
|
|
+ setTitle(title);
|
|
|
//
|
|
|
// mActionBarView.setBackgroundColor(Color.YELLOW);
|
|
|
// titleview.setBackgroundColor(Color.BLUE);
|
|
|
ActionBar actionBar = getSupportActionBar();
|
|
|
actionBar.setCustomView(mActionBarView, lp);
|
|
|
- actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
|
|
|
- actionBar.setDisplayShowCustomEnabled(true);
|
|
|
+// actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
|
|
|
+// actionBar.setDisplayShowCustomEnabled(true);
|
|
|
actionBar.setDisplayHomeAsUpEnabled(true);
|
|
|
|
|
|
|
|
|
// actionBar.setIcon(getNumberDrawable());
|
|
|
// actionBar.setDisplayShowHomeEnabled(true);
|
|
|
- actionBar.setDisplayShowTitleEnabled(false);
|
|
|
+ actionBar.setDisplayShowTitleEnabled(true);
|
|
|
}
|
|
|
|
|
|
public DetailActivity get_instance()
|