Browse Source

DownloadsActivity Toolbar fix

pull/24/head
Ezerous 8 years ago
parent
commit
1aec1d6cd9
  1. 8
      app/src/main/AndroidManifest.xml
  2. 10
      app/src/main/java/gr/thmmy/mthmmy/activities/downloads/DownloadsActivity.java

8
app/src/main/AndroidManifest.xml

@ -63,7 +63,13 @@
android:name="android.support.PARENT_ACTIVITY" android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.main.MainActivity"/> android:value=".activities.main.MainActivity"/>
</activity> </activity>
<activity android:name=".activities.downloads.DownloadsActivity"> <activity
android:name=".activities.downloads.DownloadsActivity"
android:parentActivityName=".activities.main.MainActivity"
android:theme="@style/AppTheme.NoActionBar">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.main.MainActivity"/>
</activity> </activity>
</application> </application>

10
app/src/main/java/gr/thmmy/mthmmy/activities/downloads/DownloadsActivity.java

@ -81,15 +81,15 @@ public class DownloadsActivity extends BaseActivity implements DownloadsAdapter.
} }
} else downloadsUrl = downloadsIndexUrl; } else downloadsUrl = downloadsIndexUrl;
//Initialize toolbar
toolbar = (Toolbar) findViewById(R.id.toolbar); toolbar = (Toolbar) findViewById(R.id.toolbar);
toolbar.setTitle(downloadsTitle); toolbar.setTitle(downloadsTitle);
/*setSupportActionBar(toolbar); setSupportActionBar(toolbar);
if (getSupportActionBar() != null) { getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
}*/
createDrawer(); createDrawer();
// drawer.setSelection(DOWNLOADS_ID);
progressBar = (MaterialProgressBar) findViewById(R.id.progressBar); progressBar = (MaterialProgressBar) findViewById(R.id.progressBar);

Loading…
Cancel
Save