Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added material Navigation Drawer and Spanish Translations #1643

Merged
merged 8 commits into from
Oct 14, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jandrop let's leave it at targetSdkVersion 22, otherwise the app would need to be tested and add support for the new Android M runtime permissions. A task which is scheduled for the 3.3.x release.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I get it

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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jandrop this should be removed. Each children in the content_layout container decides, based on its style, whether to set the property or not.

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