mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-21 16:35:09 -05:00
Add "overview" menu item to navigation drawer.
This commit is contained in:
parent
b374f2972d
commit
fc6516e1d3
@ -81,7 +81,7 @@ public class MainActivity extends ActionBarActivity implements OverviewFragment.
|
||||
|
||||
drawer.setDrawerListener(toggle);
|
||||
|
||||
LinearLayout drawerContent = (LinearLayout) findViewById(R.id.drawer_content);
|
||||
LinearLayout serverContainer = (LinearLayout) findViewById(R.id.server_container);
|
||||
|
||||
for (final Server server : Yaaic.getInstance().getServersAsArrayList()) {
|
||||
TextView serverView = (TextView) getLayoutInflater().inflate(R.layout.item_drawer_server, drawer, false);
|
||||
@ -96,7 +96,7 @@ public class MainActivity extends ActionBarActivity implements OverviewFragment.
|
||||
}
|
||||
});
|
||||
|
||||
drawerContent.addView(serverView, 0);
|
||||
serverContainer.addView(serverView, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Yaaic - Yet Another Android IRC Client
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Yaaic - Yet Another Android IRC Client
|
||||
|
||||
Copyright 2009-2015 Sebastian Kaspari
|
||||
@ -35,6 +36,31 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="@drawable/navigation_item_background"
|
||||
android:clickable="true"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center_vertical"
|
||||
android:onClick="onOverview"
|
||||
android:paddingLeft="16dp"
|
||||
android:text="@string/navigation_overview"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="@color/divider" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/server_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
|
@ -3,6 +3,7 @@
|
||||
<string name="add_server_menu">Add server</string>
|
||||
<string name="add_server_list">Add server</string>
|
||||
|
||||
<string name="navigation_overview">Overview</string>
|
||||
<string name="navigation_settings">Settings</string>
|
||||
<string name="navigation_about">About</string>
|
||||
<string name="disconnect_menu">Disconnect all</string>
|
||||
|
Loading…
Reference in New Issue
Block a user