mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-24 02:12: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,10 +538,14 @@ public class MessageList extends K9ListActivity implements
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (progress) {
|
if (mQueryString == null) {
|
||||||
mActionBar.setCustomView(mActionBarProgressView);
|
if (progress) {
|
||||||
|
mActionBar.setCustomView(mActionBarProgressView);
|
||||||
|
} else {
|
||||||
|
mActionBar.setCustomView(mCustomRefreshView);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
mActionBar.setCustomView(mCustomRefreshView);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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