1
0
Fork 0
mirror of https://github.com/MatomoCamp/matomocamp-companion-android.git synced 2024-09-19 16:13:46 +02:00

Misc. small cleanups

This commit is contained in:
Christophe Beyls 2015-04-02 02:29:59 +02:00
parent c54b339dc2
commit b1d823d245
3 changed files with 10 additions and 8 deletions

View file

@ -82,8 +82,7 @@ public class MainActivity extends ActionBarActivity implements ListView.OnItemCl
private final int iconResId; private final int iconResId;
private final boolean keep; private final boolean keep;
private Section(Class<? extends Fragment> fragmentClass, @StringRes int titleResId, private Section(Class<? extends Fragment> fragmentClass, int titleResId, int iconResId, boolean keep) {
@DrawableRes int iconResId, boolean keep) {
this.fragmentClassName = fragmentClass.getName(); this.fragmentClassName = fragmentClass.getName();
this.titleResId = titleResId; this.titleResId = titleResId;
this.iconResId = iconResId; this.iconResId = iconResId;
@ -94,10 +93,12 @@ public class MainActivity extends ActionBarActivity implements ListView.OnItemCl
return fragmentClassName; return fragmentClassName;
} }
@StringRes
public int getTitleResId() { public int getTitleResId() {
return titleResId; return titleResId;
} }
@DrawableRes
public int getIconResId() { public int getIconResId() {
return iconResId; return iconResId;
} }
@ -453,10 +454,10 @@ public class MainActivity extends ActionBarActivity implements ListView.OnItemCl
private class MainMenuAdapter extends BaseAdapter { private class MainMenuAdapter extends BaseAdapter {
private Section[] sections = Section.values(); private final Section[] sections = Section.values();
private LayoutInflater inflater; private final LayoutInflater inflater;
private int currentSectionForegroundColor; private final int currentSectionForegroundColor;
private int currentSectionBackgroundColor; private final int currentSectionBackgroundColor;
public MainMenuAdapter(LayoutInflater inflater) { public MainMenuAdapter(LayoutInflater inflater) {
this.inflater = inflater; this.inflater = inflater;

View file

@ -18,7 +18,8 @@
<android.support.v4.widget.DrawerLayout <android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout" android:id="@+id/drawer_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="0dp"
android:layout_weight="1">
<!-- Main content view --> <!-- Main content view -->

View file

@ -20,7 +20,7 @@
<item name="android:scrollViewStyle">@style/ScrollView.Fosdem</item> <item name="android:scrollViewStyle">@style/ScrollView.Fosdem</item>
</style> </style>
<style name="AppTheme.NoActionBar" tools:ignore="newApi"> <style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item> <item name="windowActionBar">false</item>
<item name="android:windowNoTitle">true</item> <item name="android:windowNoTitle">true</item>
<!-- Allows the action mode icons to be shown on top of the Toolbar --> <!-- Allows the action mode icons to be shown on top of the Toolbar -->