Drawer, Toolbar and minor UI optimizations (#145)
* initial add of toolbar and hamburger menu to main activity * toolbar added to preferences and accounts screens * fixed original string (name) * Layout fix for content * initial add of toolbar and hamburger menu to main activity * remove unnecessary padding bottom * fix styling and paint login activity in blue * toolbar added to preferences and accounts screens * Layout fix for content * remove unnecessary padding bottom * fix styling and paint login activity in blue * fixes after rebase * consolidate style since minVersion=16, make drawer to be behind the systembar * optimize drawer header * add back navigation to login activity, fix spinner background * add back navigation * more launcher icon to mipmap folders * fix identation * fix license header * revert code style deletion, change identation * proper notification icon * proper resolution for login logo * fix large notification icon * removed unused Eclair switch since support is v16+ * only use small notification icon * spaces->tabs * fix toolbar style for Android 4.x
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 586 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 446 B |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 701 B |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
@@ -61,7 +61,9 @@
|
||||
android:id="@+id/ocsms_logo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/login_logo"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingBottom="36dp"
|
||||
android:src="@drawable/logo"
|
||||
android:contentDescription="@string/login_logo" />
|
||||
|
||||
<LinearLayout
|
||||
@@ -73,8 +75,9 @@
|
||||
android:id="@+id/oc_protocol"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:entries="@array/protocol_array">
|
||||
</Spinner>
|
||||
android:layout_gravity="center_vertical"
|
||||
android:popupBackground="@color/oc_primary"
|
||||
android:entries="@array/protocol_array" />
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -84,6 +87,7 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/prompt_serverURI"
|
||||
android:textColor="@color/oc_white"
|
||||
android:inputType="textUri" >
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
@@ -99,9 +103,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/prompt_login"
|
||||
android:textColor="@color/oc_white"
|
||||
android:inputType="textEmailAddress"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true" />
|
||||
android:maxLines="1" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
@@ -117,7 +121,7 @@
|
||||
android:imeOptions="actionUnspecified"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true" />
|
||||
android:textColor="@color/oc_white" />
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<com.dd.processbutton.iml.ActionProcessButton
|
||||
|
||||
@@ -34,9 +34,14 @@
|
||||
android:fitsSystemWindows="true"
|
||||
tools:openDrawer="start"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<RelativeLayout
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
layout="@layout/toolbar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/main_title_welcome"
|
||||
@@ -44,7 +49,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/ma_title_welcome"
|
||||
android:gravity="top"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<TextView
|
||||
@@ -53,26 +57,9 @@
|
||||
android:paddingRight="16dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="top"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_below="@+id/main_title_welcome"
|
||||
android:text="@string/ma_content_welcome"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/main_tv_swipe"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="top"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_below="@+id/main_tv_welcome"
|
||||
android:text="@string/ma_content_swipeaction"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.design.widget.NavigationView
|
||||
android:id="@+id/nav_view"
|
||||
@@ -81,5 +68,5 @@
|
||||
android:layout_gravity="start"
|
||||
app:headerLayout="@layout/nav_header_main"
|
||||
app:menu="@menu/activity_main_drawer"
|
||||
android:fitsSystemWindows="false"/>
|
||||
android:fitsSystemWindows="true"/>
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
@@ -3,24 +3,21 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/nav_header_height"
|
||||
android:background="@drawable/side_nav_bar"
|
||||
android:gravity="top"
|
||||
android:gravity="bottom"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:padding="@dimen/activity_horizontal_margin"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/nav_header_vertical_spacing"
|
||||
android:src="@drawable/ic_launcher"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/nav_header_vertical_spacing"
|
||||
android:paddingTop="@dimen/standard_half_padding"
|
||||
android:text="@string/app_name"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
|
||||
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
android:id="@+id/recovery_phone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="20dp"
|
||||
android:textSize="18sp" />
|
||||
android:padding="@dimen/activity_vertical_margin"
|
||||
android:textSize="18sp"/>
|
||||
</RelativeLayout>
|
||||
@@ -1,5 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) 2017, Andy Scherzinger
|
||||
* Copyright (c) 2014-2015, Loic Blot <loic.blot@unix-experience.fr>
|
||||
* All rights reserved.
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -24,11 +26,28 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
-->
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
|
||||
<resources>
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:layout_scrollFlags="scroll|enterAlways|snap"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
|
||||
|
||||
<style name="OcSmsTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="colorPrimary">@color/oc_primary</item>
|
||||
<item name="colorPrimaryDark">@color/oc_primary_dark</item>
|
||||
</style>
|
||||
</resources>
|
||||
<ProgressBar
|
||||
android:id="@+id/login_progress"
|
||||
style="?android:attr/progressBarStyleLarge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
@@ -97,7 +97,7 @@
|
||||
<string name="ma_title_rate_us">Rate us !</string>
|
||||
<string name="ma_title_add_account">Add an account</string>
|
||||
<string name="ma_title_welcome">Welcome</string>
|
||||
<string name="ma_content_welcome">Welcome to ownCloud SMS application. This application let you synchronize your SMS to your ownCloud instance using SMS app.</string>
|
||||
<string name="ma_content_welcome">Welcome to Nextcloud SMS application. This application let you synchronize your SMS to your Nextcloud instance using SMS app.</string>
|
||||
|
||||
<!-- Notifications -->
|
||||
<string name="sync_title">Sync process</string>
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="android:navigationBarColor">@color/oc_primary</item>
|
||||
<item name="colorPrimaryDark">@color/oc_primary_dark</item>
|
||||
<item name="colorPrimary">@color/oc_primary</item>
|
||||
</style>
|
||||
|
||||
<style name="OcSmsTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="colorPrimary">@color/oc_primary</item>
|
||||
<item name="colorPrimaryDark">@color/oc_primary_dark</item>
|
||||
<item name="colorAccent">@color/oc_accent</item>
|
||||
<item name="android:navigationBarColor">@color/oc_primary</item>
|
||||
</style>
|
||||
>
|
||||
|
||||
<style name="OcSmsTheme.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<style name="OcSmsTheme.Drawer" parent="OcSmsTheme.NoActionBar">
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="OcSmsTheme.NoActionBar">
|
||||
<item name="colorPrimaryDark">@color/oc_primary_dark</item>
|
||||
<item name="colorPrimary">@color/oc_primary</item>
|
||||
<item name="colorAccent">@color/oc_accent</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -6,5 +6,5 @@
|
||||
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
|
||||
-->
|
||||
<dimen name="activity_horizontal_margin">64dp</dimen>
|
||||
|
||||
<dimen name="nav_drawer_header_height">164dp</dimen>
|
||||
</resources>
|
||||
|
||||
@@ -2,4 +2,7 @@
|
||||
<resources>
|
||||
<color name="oc_primary">#0082C9</color>
|
||||
<color name="oc_primary_dark">#006AA3</color>
|
||||
<color name="oc_accent">#007CC2</color>
|
||||
<color name="oc_login_hint">#7fC0E3</color>
|
||||
<color name="oc_white">#ffffff</color>
|
||||
</resources>
|
||||
@@ -6,7 +6,8 @@
|
||||
<dimen name="arrow_max_height">22dp</dimen>
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="nav_header_vertical_spacing">16dp</dimen>
|
||||
<dimen name="nav_header_height">120dp</dimen>
|
||||
<dimen name="standard_half_padding">8dp</dimen>
|
||||
<dimen name="nav_header_height">140dp</dimen>
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -27,15 +27,39 @@
|
||||
|
||||
<resources>
|
||||
|
||||
<style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="colorPrimaryDark">@color/oc_primary_dark</item>
|
||||
<style name="OcSmsTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="colorPrimary">@color/oc_primary</item>
|
||||
</style>
|
||||
<!-- Application theme. -->
|
||||
<style name="AppTheme" parent="AppBaseTheme">
|
||||
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
|
||||
<item name="colorPrimaryDark">@color/oc_primary_dark</item>
|
||||
<item name="colorAccent">@color/oc_accent</item>
|
||||
</style>
|
||||
|
||||
<!-- separate style for Drawer activities needed for v21+ theming -->
|
||||
<style name="OcSmsTheme.Drawer" parent="OcSmsTheme.NoActionBar">
|
||||
<item name="colorPrimaryDark">@color/oc_primary_dark</item>
|
||||
<item name="colorPrimary">@color/oc_primary</item>
|
||||
<item name="colorAccent">@color/oc_accent</item>
|
||||
</style>
|
||||
|
||||
<style name="OcSmsTheme.NoActionbar" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="colorPrimaryDark">@color/oc_primary_dark</item>
|
||||
<item name="colorPrimary">@color/oc_primary</item>
|
||||
<item name="colorAccent">@color/oc_accent</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
</style>
|
||||
|
||||
<style name="OcSmsTheme.Login" parent="OcSmsTheme">
|
||||
<item name="android:windowBackground">@color/oc_primary</item>
|
||||
<item name="colorControlNormal">@color/oc_login_hint</item>
|
||||
<item name="colorControlActivated">@color/oc_white</item>
|
||||
<item name="colorControlHighlight">@color/oc_login_hint</item>
|
||||
<item name="colorAccent">@color/oc_login_hint</item>
|
||||
<item name="android:textColorHint">@color/oc_login_hint</item>
|
||||
<item name="android:textColor">@color/oc_white</item>
|
||||
</style>
|
||||
|
||||
<!-- Application theme. -->
|
||||
<style name="StandardButton">
|
||||
<item name="android:background">@color/oc_primary</item>
|
||||
<item name="android:layout_marginTop">15dp</item>
|
||||
@@ -52,7 +76,7 @@
|
||||
<item name="android:textAppearance">?android:attr/textAppearanceLarge</item>
|
||||
</style>
|
||||
|
||||
<style name="OcSmsTheme.NoActionBar">
|
||||
<style name="OcSmsTheme.NoActionBar" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||