Skip to content

Commit

Permalink
Merge pull request #1643 from jandrop/develop
Browse files Browse the repository at this point in the history
Added material Navigation Drawer and Spanish Translations
  • Loading branch information
m4gr3d committed Oct 14, 2015
2 parents 9b1ba8f + fa8f8ab commit 0ef8019
Show file tree
Hide file tree
Showing 41 changed files with 693 additions and 251 deletions.
2 changes: 1 addition & 1 deletion Android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ android {
defaultConfig {
applicationId 'org.droidplanner.android'
minSdkVersion 14
targetSdkVersion 22
targetSdkVersion 23
versionCode versionMajor * 100000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
versionName "Tower-v${versionMajor}.${versionMinor}.${versionPatch}"

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
150 changes: 18 additions & 132 deletions Android/res/layout/activity_drawer_navigation_ui.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>

<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/drawer_layout"
>
android:fitsSystemWindows="true"
tools:openDrawer="start">

<FrameLayout
android:layout_width="match_parent"
Expand All @@ -16,7 +16,7 @@
<FrameLayout
android:id="@+id/content_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent" />

<org.droidplanner.android.view.FitsSystemWindowsFrameLayout
android:layout_width="wrap_content"
Expand All @@ -26,152 +26,38 @@

<org.droidplanner.android.view.SlidingDrawer
android:id="@+id/action_drawer_container"
android:minWidth="170dp"
android:layout_width="@dimen/action_drawer_width"
android:layout_height="wrap_content"
android:layout_gravity="end"
app:content="@+id/action_drawer_content"
app:handle="@+id/slideButtonLeft"
android:layout_marginBottom="@dimen/action_drawer_margin_bottom"
android:orientation="horizontal">
android:minWidth="170dp"
android:orientation="horizontal"
app:content="@+id/action_drawer_content"
app:handle="@+id/slideButtonLeft">

<View
android:id="@+id/slideButtonLeft"
android:layout_width="0dp"
android:layout_height="0dp"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"/>
android:focusableInTouchMode="false" />

<FrameLayout
android:id="@+id/action_drawer_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
android:layout_height="wrap_content" />

</org.droidplanner.android.view.SlidingDrawer>
</org.droidplanner.android.view.FitsSystemWindowsFrameLayout>
</FrameLayout>

<LinearLayout
android:layout_width="240dp"
android:layout_height="match_parent"
<android.support.design.widget.NavigationView
android:id="@+id/navigation_drawer_container"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
tools:layout_gravity=""
android:orientation="vertical"
android:fitsSystemWindows="true">

<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@android:color/white"
>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
android:id="@+id/navigation_account"
style="@style/navigationDrawerEntry"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_account_circle_grey600_24dp"
android:drawableStart="@drawable/ic_account_circle_grey600_24dp"
android:text="@string/account_label"/>

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:background="@color/light_grey"/>

<TextView
android:id="@+id/navigation_flight_data"
style="@style/navigationDrawerEntry"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_flight_grey600_24dp"
android:drawableStart="@drawable/ic_flight_grey600_24dp"
android:text="@string/flight_data"
/>

<TextView
android:id="@+id/navigation_editor"
style="@style/navigationDrawerEntry"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_edit_grey600_24dp"
android:drawableStart="@drawable/ic_edit_grey600_24dp"
android:text="@string/editor"/>

<TextView
android:id="@+id/navigation_locator"
style="@style/navigationDrawerEntry"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_history_grey600_24dp"
android:drawableStart="@drawable/ic_history_grey600_24dp"
android:text="@string/locator"/>

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:background="@color/light_grey"/>

<TextView
style="@style/navigationDrawerEntry"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/navigation_params"
android:drawableLeft="@drawable/ic_action_database"
android:drawableStart="@drawable/ic_action_database"
android:text="@string/screen_parameters"/>

<TextView
style="@style/navigationDrawerEntry"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/navigation_checklist"
android:drawableLeft="@drawable/ic_action_paste"
android:drawableStart="@drawable/ic_action_paste"
android:text="@string/screen_checklist"
/>

<TextView
style="@style/navigationDrawerEntry"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/navigation_calibration"
android:drawableLeft="@drawable/ic_action_gear"
android:drawableStart="@drawable/ic_action_gear"
android:text="@string/screen_cal"
/>

</LinearLayout>
</ScrollView>

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/light_grey"/>

<TextView
style="@style/navigationDrawerEntry"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:id="@+id/navigation_settings"
android:drawableLeft="@drawable/ic_settings_grey600_24dp"
android:drawableStart="@drawable/ic_settings_grey600_24dp"
android:text="@string/settings"/>

</LinearLayout>

</android.support.v4.widget.DrawerLayout>
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/navigation_drawer_items" />
</android.support.v4.widget.DrawerLayout>
4 changes: 3 additions & 1 deletion Android/res/layout/fragment_setup_imu_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,12 @@
<Button
android:id="@+id/buttonStep"
android:layout_height="wrap_content"
android:padding="8dp"
android:layout_width="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/button_green_drawable"
style="@style/modeControl"
android:text="@string/button_setup_calibrate"/>

</RelativeLayout>
</LinearLayout>
</LinearLayout>
26 changes: 26 additions & 0 deletions Android/res/layout/nav_header_main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/navigation_account"
android:layout_width="match_parent"
android:layout_height="160dp"
android:background="@color/header_background"
android:gravity="bottom"
android:orientation="vertical"
android:padding="16dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark">

<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="16dp"
android:src="@drawable/ic_account_circle_white_48dp" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="16dp"
android:text="@string/account_label"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />

</LinearLayout>
49 changes: 49 additions & 0 deletions Android/res/menu/navigation_drawer_items.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">

<group android:checkableBehavior="single">
<item
android:id="@+id/navigation_flight_data"
android:icon="@drawable/ic_menu_flight_data_grey600_24dp"
android:title="@string/flight_data" />

<item
android:id="@+id/navigation_editor"
android:icon="@drawable/ic_menu_editor_grey600_24dp"
android:title="@string/editor" />

<item
android:id="@+id/navigation_locator"
android:icon="@drawable/ic_menu_flight_history_grey600_24dp"
android:title="@string/locator" />
</group>

<item android:title="@string/settings">

<menu>

<item
android:id="@+id/navigation_params"
android:icon="@drawable/ic_menu_parameters_grey600_24dp"
android:title="@string/screen_parameters" />

<item
android:id="@+id/navigation_checklist"
android:icon="@drawable/ic_menu_checklist_grey600_24dp"
android:title="@string/screen_checklist" />

<item
android:id="@+id/navigation_calibration"
android:icon="@drawable/ic_menu_calibration_grey600_24dp"
android:title="@string/screen_cal" />


<item
android:id="@+id/navigation_settings"
android:icon="@drawable/ic_menu_settings_grey600_24dp"
android:title="@string/settings" />

</menu>
</item>

</menu>
Loading

0 comments on commit 0ef8019

Please sign in to comment.