mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-24 10:22:15 -05:00
Have a nice title for messagelist displaying a query.
This commit is contained in:
parent
a730e67514
commit
f11e3d5059
@ -523,10 +523,10 @@ public class MessageList extends K9ListActivity implements
|
|||||||
// query result display
|
// query result display
|
||||||
} else if (mQueryString != null) {
|
} else if (mQueryString != null) {
|
||||||
if (mTitle != null) {
|
if (mTitle != null) {
|
||||||
String dispString = mAdapter.mListener.formatHeader(MessageList.this, mTitle, mUnreadMessageCount, getTimeFormat());
|
setTitle(mTitle);
|
||||||
setTitle(dispString);
|
|
||||||
} else {
|
} else {
|
||||||
setTitle(getString(R.string.search_results) + ": " + mQueryString);
|
setTitle(getString(R.string.search_results));
|
||||||
|
//setSubTitle(mQueryString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -538,11 +538,15 @@ public class MessageList extends K9ListActivity implements
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mQueryString == null) {
|
||||||
if (progress) {
|
if (progress) {
|
||||||
mActionBar.setCustomView(mActionBarProgressView);
|
mActionBar.setCustomView(mActionBarProgressView);
|
||||||
} else {
|
} else {
|
||||||
mActionBar.setCustomView(mCustomRefreshView);
|
mActionBar.setCustomView(mCustomRefreshView);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -662,8 +666,12 @@ public class MessageList extends K9ListActivity implements
|
|||||||
context = this;
|
context = this;
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
// need this for actionbar initialization
|
||||||
|
mQueryString = getIntent().getStringExtra(EXTRA_QUERY);
|
||||||
|
|
||||||
mInflater = getLayoutInflater();
|
mInflater = getLayoutInflater();
|
||||||
initializeActionBar();
|
mActionBar = getSupportActionBar();
|
||||||
|
if (mQueryString == null) initializeActionBar();
|
||||||
initializeLayout();
|
initializeLayout();
|
||||||
|
|
||||||
// Only set "touchable" when we're first starting up the activity.
|
// Only set "touchable" when we're first starting up the activity.
|
||||||
@ -886,10 +894,6 @@ public class MessageList extends K9ListActivity implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initializeActionBar() {
|
private void initializeActionBar() {
|
||||||
requestWindowFeature(Window.FEATURE_PROGRESS);
|
|
||||||
|
|
||||||
mActionBar = getSupportActionBar();
|
|
||||||
|
|
||||||
mCustomRefreshView = mInflater.inflate(R.layout.actionbar_top_custom, null);
|
mCustomRefreshView = mInflater.inflate(R.layout.actionbar_top_custom, null);
|
||||||
ImageButton mCustomRefresh = (ImageButton) mCustomRefreshView.findViewById(R.id.actionbar_refresh_button);
|
ImageButton mCustomRefresh = (ImageButton) mCustomRefreshView.findViewById(R.id.actionbar_refresh_button);
|
||||||
mCustomRefresh.setOnClickListener(new OnClickListener() {
|
mCustomRefresh.setOnClickListener(new OnClickListener() {
|
||||||
|
Loading…
Reference in New Issue
Block a user