Fix application and first activity titles bug.
Change-Id: I066af1301c8e5525b5ade310c770273f72007b10
This commit is contained in:
@@ -21,10 +21,9 @@
|
||||
|
||||
<activity
|
||||
android:name=".activity.ComputersActivity"
|
||||
android:label="@string/title_computers"
|
||||
android:theme="@style/Theme.ImpressRemote.Computers">
|
||||
|
||||
<intent-filter android:label="@string/application_name">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
|
@@ -31,8 +31,8 @@
|
||||
<item name="android:navigationMode">tabMode</item>
|
||||
<item name="navigationMode">tabMode</item>
|
||||
|
||||
<item name="android:displayOptions">showTitle|showHome|useLogo</item>
|
||||
<item name="displayOptions">showTitle|showHome|useLogo</item>
|
||||
<item name="android:displayOptions">showHome|useLogo</item>
|
||||
<item name="displayOptions">showHome|useLogo</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.ImpressRemote.ComputerCreation" parent="Theme.ImpressRemote">
|
||||
|
@@ -31,9 +31,21 @@ public class ComputersActivity extends SherlockFragmentActivity implements Actio
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setUpTitle();
|
||||
setUpContent();
|
||||
}
|
||||
|
||||
private void setUpTitle() {
|
||||
// Looks hacky but it seems to be the best way to set activity title
|
||||
// different to application’s label. The other way is setting title
|
||||
// to intents filter but it shows wrong label for recent apps screen.
|
||||
|
||||
ActionBar aActionBar = getSupportActionBar();
|
||||
|
||||
aActionBar.setTitle(R.string.title_computers);
|
||||
aActionBar.setDisplayShowTitleEnabled(true);
|
||||
}
|
||||
|
||||
private void setUpContent() {
|
||||
if (BluetoothOperator.isAvailable()) {
|
||||
setUpComputersLists();
|
||||
|
Reference in New Issue
Block a user