Merge remote-tracking branch 'remotes/upstream/material_fab' into beta
authortobiasKaminsky <tobias@kaminsky.me>
Thu, 29 Oct 2015 17:09:14 +0000 (18:09 +0100)
committertobiasKaminsky <tobias@kaminsky.me>
Thu, 29 Oct 2015 17:09:14 +0000 (18:09 +0100)
88 files changed:
SETUP.md
THIRD_PARTY.txt
build.gradle
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/.classpath [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/AndroidManifest.xml [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/R.txt [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/aapt/AndroidManifest.xml [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/annotations.zip [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/build.xml [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/jars/classes.jar [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/libs/classes.jar [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/proguard.txt [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/project.properties [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-hdpi-v4/fab_bg_mini.png [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-hdpi-v4/fab_bg_normal.png [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-mdpi-v4/fab_bg_mini.png [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-mdpi-v4/fab_bg_normal.png [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xhdpi-v4/fab_bg_mini.png [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xhdpi-v4/fab_bg_normal.png [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xxhdpi-v4/fab_bg_mini.png [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xxhdpi-v4/fab_bg_normal.png [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xxxhdpi-v4/fab_bg_mini.png [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xxxhdpi-v4/fab_bg_normal.png [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/values/values.xml [new file with mode: 0644]
libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/src/.readme [new file with mode: 0644]
project.properties
res/drawable-hdpi-v9/ic_action_download.png [deleted file]
res/drawable-hdpi-v9/ic_action_refresh.png [deleted file]
res/drawable-hdpi-v9/ic_action_settings.png [deleted file]
res/drawable-hdpi/ic_checkbox_blank_outline.png [new file with mode: 0644]
res/drawable-hdpi/ic_checkbox_marked.png [new file with mode: 0644]
res/drawable-hdpi/ic_import.png [new file with mode: 0644]
res/drawable-mdpi-v9/ic_action_download.png [deleted file]
res/drawable-mdpi-v9/ic_action_refresh.png [deleted file]
res/drawable-mdpi-v9/ic_action_settings.png [deleted file]
res/drawable-mdpi/ic_checkbox_blank_outline.png [new file with mode: 0644]
res/drawable-mdpi/ic_checkbox_marked.png [new file with mode: 0644]
res/drawable-mdpi/ic_import.png [new file with mode: 0644]
res/drawable-xhdpi/ic_checkbox_blank_outline.png [new file with mode: 0644]
res/drawable-xhdpi/ic_checkbox_marked.png [new file with mode: 0644]
res/drawable-xhdpi/ic_import.png [new file with mode: 0644]
res/drawable-xxhdpi/ic_checkbox_blank_outline.png [new file with mode: 0644]
res/drawable-xxhdpi/ic_checkbox_marked.png [new file with mode: 0644]
res/drawable-xxhdpi/ic_import.png [new file with mode: 0644]
res/drawable-xxhdpi/ic_sort_variant.png [new file with mode: 0644]
res/drawable/fab_label_background.xml [new file with mode: 0644]
res/layout-v14/generic_explanation.xml
res/layout/account_setup.xml
res/layout/drawer.xml
res/layout/drawer_list_item.xml
res/layout/drawer_radiobutton.xml
res/layout/file_details_fragment.xml
res/layout/file_preview.xml
res/layout/files_folder_picker.xml
res/layout/generic_explanation.xml
res/layout/list_footer.xml
res/layout/list_fragment.xml
res/layout/list_item.xml
res/layout/listrow_details.xml
res/layout/listrow_group.xml
res/layout/loading_dialog.xml
res/layout/log_item.xml
res/layout/log_send_file.xml
res/layout/passcodelock.xml
res/layout/ssl_untrusted_cert_layout.xml
res/layout/ssl_validator_layout.xml
res/layout/upload_files_layout.xml
res/layout/uploader_layout.xml
res/layout/uploader_list_item_layout.xml
res/menu/main_menu.xml
res/values-v11/versioned_styles.xml
res/values/colors.xml
res/values/styles.xml
res/values/versioned_styles.xml
setup_env.bat
setup_env.sh
src/com/owncloud/android/authentication/AuthenticatorActivity.java
src/com/owncloud/android/ui/activity/FileActivity.java
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
src/com/owncloud/android/ui/activity/FolderPickerActivity.java
src/com/owncloud/android/ui/activity/PassCodeActivity.java
src/com/owncloud/android/ui/activity/Uploader.java
src/com/owncloud/android/ui/adapter/FileListListAdapter.java
src/com/owncloud/android/ui/adapter/LocalFileListAdapter.java
src/com/owncloud/android/ui/fragment/ExtendedListFragment.java
src/com/owncloud/android/ui/fragment/LocalFileListFragment.java
src/com/owncloud/android/ui/fragment/OCFileListFragment.java
src/com/owncloud/android/utils/DisplayUtils.java

index 0f1bc8e..64c04c9 100644 (file)
--- a/SETUP.md
+++ b/SETUP.md
@@ -90,6 +90,7 @@ The generated APK file is saved in android/build/outputs/apk as android-debug.ap
 * Choose the projects with the next names under the 'New Project Name' column:
 ** owncloud-android 
 ** android-support-appcompat-v7-exploded-aar
+** com-getbase-floatingactionbutton-1-10-0-exploded-aar
 ** owncloud-android-workaround-accounts        (optional)
 ** ownCloud Android Library
 ** ownCloud Sample Client (optional)
@@ -102,11 +103,12 @@ The generated APK file is saved in android/build/outputs/apk as android-debug.ap
 * If any error persists, clean and build manually the next projects in order:
 ** ownCloud Android Library
 ** android-support-appcompat-v7-exploded-aar
+** com-getbase-floatingactionbutton-1-10-0-exploded-aar
 ** owncloud-android
 * If any error on those projects persists, check the project properties. In the 'Android' section, API Level should be
 ** ownCloud Android Library    -> API level 19
 ** android-support-appcompat-v7-exploded-aa -> API level 22
-** owncloud-android    -> API level 22 ; in this project, two library projects should appear referred in the bottom of the dialog: libs\android-support-appcompat-v7-exploded-aar and owncloud-android-library. Add them if needed.
+** owncloud-android    -> API level 22 ; in this project, three library projects should appear referred in the bottom of the dialog: libs\android-support-appcompat-v7-exploded-aar, ** com-getbase-floatingactionbutton-1-10-0-exploded-aar and owncloud-android-library. Add them if needed.
 * After those actions you should be good to go. HAVE FUN!
 
 
index 6fd3e5b..034ecb3 100644 (file)
@@ -59,4 +59,8 @@ The third party software included and used by this project is:
    modifications com.ortiz.touch.ExtendedViewPager and com.ortiz.touch.TouchImageView classes. 
    See https://github.com/MikeOrtiz/TouchImageView
  
\ No newline at end of file
+ * floatingactionbutton 1.10.0.
+   Copyright (c) 2014 Jerzy Chalupski
+   Licensed under Apache License, Version 2.0.
+   placed at libs/com-getbase-floatingactionbutton-1-10-0-exploded-aar has been exploded by ownCloud Inc.
+   See https://github.com/futuresimple/android-floating-action-button 
\ No newline at end of file
index b9ea96e..be674c9 100644 (file)
@@ -24,6 +24,7 @@ dependencies {
     compile project(':owncloud-android-library')
     compile 'com.jakewharton:disklrucache:2.0.2'
     compile 'com.android.support:appcompat-v7:22.2.1'
+    compile 'com.getbase:floatingactionbutton:1.10.1'
 }
 
 android {
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/.classpath b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/.classpath
new file mode 100644 (file)
index 0000000..7bc01d9
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="src" path="gen"/>
+       <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+       <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+       <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
+       <classpathentry kind="output" path="bin/classes"/>
+</classpath>
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/AndroidManifest.xml b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/AndroidManifest.xml
new file mode 100644 (file)
index 0000000..f29e987
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest
+    package="com.getbase.floatingactionbutton"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:versionCode="15"
+    android:versionName="1.10.1" >
+
+    <uses-sdk
+        android:minSdkVersion="14"
+        android:targetSdkVersion="22" />
+
+    <application />
+
+</manifest>
\ No newline at end of file
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/R.txt b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/R.txt
new file mode 100644 (file)
index 0000000..c6d5664
--- /dev/null
@@ -0,0 +1,55 @@
+int attr fab_addButtonColorNormal 0x7f010009
+int attr fab_addButtonColorPressed 0x7f010008
+int attr fab_addButtonPlusIconColor 0x7f01000b
+int attr fab_addButtonSize 0x7f01000a
+int attr fab_addButtonStrokeVisible 0x7f01000c
+int attr fab_colorDisabled 0x7f010002
+int attr fab_colorNormal 0x7f010003
+int attr fab_colorPressed 0x7f010001
+int attr fab_expandDirection 0x7f01000f
+int attr fab_icon 0x7f010004
+int attr fab_labelStyle 0x7f01000d
+int attr fab_labelsPosition 0x7f01000e
+int attr fab_plusIconColor 0x7f010000
+int attr fab_size 0x7f010005
+int attr fab_stroke_visible 0x7f010007
+int attr fab_title 0x7f010006
+int dimen fab_actions_spacing 0x7f030000
+int dimen fab_icon_size 0x7f030001
+int dimen fab_labels_margin 0x7f030002
+int dimen fab_plus_icon_size 0x7f030003
+int dimen fab_plus_icon_stroke 0x7f030004
+int dimen fab_shadow_offset 0x7f030005
+int dimen fab_shadow_radius 0x7f030006
+int dimen fab_size_mini 0x7f030007
+int dimen fab_size_normal 0x7f030008
+int dimen fab_stroke_width 0x7f030009
+int drawable fab_bg_mini 0x7f020000
+int drawable fab_bg_normal 0x7f020001
+int id down 0x7f040006
+int id fab_expand_menu_button 0x7f040000
+int id fab_label 0x7f040001
+int id left 0x7f040004
+int id mini 0x7f040002
+int id normal 0x7f040003
+int id right 0x7f040005
+int id up 0x7f040007
+int[] styleable AddFloatingActionButton { 0x7f010000 }
+int styleable AddFloatingActionButton_fab_plusIconColor 0
+int[] styleable FloatingActionButton { 0x7f010001, 0x7f010002, 0x7f010003, 0x7f010004, 0x7f010005, 0x7f010006, 0x7f010007 }
+int styleable FloatingActionButton_fab_colorDisabled 1
+int styleable FloatingActionButton_fab_colorNormal 2
+int styleable FloatingActionButton_fab_colorPressed 0
+int styleable FloatingActionButton_fab_icon 3
+int styleable FloatingActionButton_fab_size 4
+int styleable FloatingActionButton_fab_stroke_visible 6
+int styleable FloatingActionButton_fab_title 5
+int[] styleable FloatingActionsMenu { 0x7f010008, 0x7f010009, 0x7f01000a, 0x7f01000b, 0x7f01000c, 0x7f01000d, 0x7f01000e, 0x7f01000f }
+int styleable FloatingActionsMenu_fab_addButtonColorNormal 1
+int styleable FloatingActionsMenu_fab_addButtonColorPressed 0
+int styleable FloatingActionsMenu_fab_addButtonPlusIconColor 3
+int styleable FloatingActionsMenu_fab_addButtonSize 2
+int styleable FloatingActionsMenu_fab_addButtonStrokeVisible 4
+int styleable FloatingActionsMenu_fab_expandDirection 7
+int styleable FloatingActionsMenu_fab_labelStyle 5
+int styleable FloatingActionsMenu_fab_labelsPosition 6
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/aapt/AndroidManifest.xml b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/aapt/AndroidManifest.xml
new file mode 100644 (file)
index 0000000..f29e987
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest
+    package="com.getbase.floatingactionbutton"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:versionCode="15"
+    android:versionName="1.10.1" >
+
+    <uses-sdk
+        android:minSdkVersion="14"
+        android:targetSdkVersion="22" />
+
+    <application />
+
+</manifest>
\ No newline at end of file
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/annotations.zip b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/annotations.zip
new file mode 100644 (file)
index 0000000..a46d2ce
Binary files /dev/null and b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/annotations.zip differ
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/build.xml b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/build.xml
new file mode 100644 (file)
index 0000000..4317fb0
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="com-getbase-floatingactionbutton-1-10-0-exploded-aar" default="help">
+
+    <!-- The local.properties file is created and updated by the 'android' tool.
+         It contains the path to the SDK. It should *NOT* be checked into
+         Version Control Systems. -->
+    <property file="local.properties" />
+
+    <!-- The ant.properties file can be created by you. It is only edited by the
+         'android' tool to add properties to it.
+         This is the place to change some Ant specific build properties.
+         Here are some properties you may want to change/update:
+
+         source.dir
+             The name of the source directory. Default is 'src'.
+         out.dir
+             The name of the output directory. Default is 'bin'.
+
+         For other overridable properties, look at the beginning of the rules
+         files in the SDK, at tools/ant/build.xml
+
+         Properties related to the SDK location or the project target should
+         be updated using the 'android' tool with the 'update' action.
+
+         This file is an integral part of the build system for your
+         application and should be checked into Version Control Systems.
+
+         -->
+    <property file="ant.properties" />
+
+    <!-- if sdk.dir was not set from one of the property file, then
+         get it from the ANDROID_HOME env var.
+         This must be done before we load project.properties since
+         the proguard config can use sdk.dir -->
+    <property environment="env" />
+    <condition property="sdk.dir" value="${env.ANDROID_HOME}">
+        <isset property="env.ANDROID_HOME" />
+    </condition>
+
+    <!-- The project.properties file is created and updated by the 'android'
+         tool, as well as ADT.
+
+         This contains project specific properties such as project target, and library
+         dependencies. Lower level build properties are stored in ant.properties
+         (or in .classpath for Eclipse projects).
+
+         This file is an integral part of the build system for your
+         application and should be checked into Version Control Systems. -->
+    <loadproperties srcFile="project.properties" />
+
+    <!-- quick check on sdk.dir -->
+    <fail
+            message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
+            unless="sdk.dir"
+    />
+
+    <!--
+        Import per project custom build rules if present at the root of the project.
+        This is the place to put custom intermediary targets such as:
+            -pre-build
+            -pre-compile
+            -post-compile (This is typically used for code obfuscation.
+                           Compiled code location: ${out.classes.absolute.dir}
+                           If this is not done in place, override ${out.dex.input.absolute.dir})
+            -post-package
+            -post-build
+            -pre-clean
+    -->
+    <import file="custom_rules.xml" optional="true" />
+
+    <!-- Import the actual build file.
+
+         To customize existing targets, there are two options:
+         - Customize only one target:
+             - copy/paste the target into this file, *before* the
+               <import> task.
+             - customize it to your needs.
+         - Customize the whole content of build.xml
+             - copy/paste the content of the rules files (minus the top node)
+               into this file, replacing the <import> task.
+             - customize to your needs.
+
+         ***********************
+         ****** IMPORTANT ******
+         ***********************
+         In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
+         in order to avoid having your file be overridden by tools such as "android update project"
+    -->
+    <!-- version-tag: 1 -->
+    <import file="${sdk.dir}/tools/ant/build.xml" />
+
+</project>
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/jars/classes.jar b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/jars/classes.jar
new file mode 100644 (file)
index 0000000..723d01e
Binary files /dev/null and b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/jars/classes.jar differ
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/libs/classes.jar b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/libs/classes.jar
new file mode 100644 (file)
index 0000000..723d01e
Binary files /dev/null and b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/libs/classes.jar differ
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/proguard.txt b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/proguard.txt
new file mode 100644 (file)
index 0000000..b542959
--- /dev/null
@@ -0,0 +1,5 @@
+# keep getters/setters in RotatingDrawable so that animations can still work.
+-keepclassmembers class com.getbase.floatingactionbutton.FloatingActionsMenu$RotatingDrawable {
+   void set*(***);
+   *** get*();
+}
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/project.properties b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/project.properties
new file mode 100644 (file)
index 0000000..362a0a3
--- /dev/null
@@ -0,0 +1,15 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system edit
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+
+# Project target.
+target=android-22
+android.library=true
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-hdpi-v4/fab_bg_mini.png b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-hdpi-v4/fab_bg_mini.png
new file mode 100644 (file)
index 0000000..4b48351
Binary files /dev/null and b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-hdpi-v4/fab_bg_mini.png differ
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-hdpi-v4/fab_bg_normal.png b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-hdpi-v4/fab_bg_normal.png
new file mode 100644 (file)
index 0000000..4daec66
Binary files /dev/null and b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-hdpi-v4/fab_bg_normal.png differ
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-mdpi-v4/fab_bg_mini.png b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-mdpi-v4/fab_bg_mini.png
new file mode 100644 (file)
index 0000000..218cf04
Binary files /dev/null and b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-mdpi-v4/fab_bg_mini.png differ
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-mdpi-v4/fab_bg_normal.png b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-mdpi-v4/fab_bg_normal.png
new file mode 100644 (file)
index 0000000..c157df3
Binary files /dev/null and b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-mdpi-v4/fab_bg_normal.png differ
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xhdpi-v4/fab_bg_mini.png b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xhdpi-v4/fab_bg_mini.png
new file mode 100644 (file)
index 0000000..d56bfe8
Binary files /dev/null and b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xhdpi-v4/fab_bg_mini.png differ
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xhdpi-v4/fab_bg_normal.png b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xhdpi-v4/fab_bg_normal.png
new file mode 100644 (file)
index 0000000..41614b9
Binary files /dev/null and b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xhdpi-v4/fab_bg_normal.png differ
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xxhdpi-v4/fab_bg_mini.png b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xxhdpi-v4/fab_bg_mini.png
new file mode 100644 (file)
index 0000000..1cdd2b1
Binary files /dev/null and b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xxhdpi-v4/fab_bg_mini.png differ
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xxhdpi-v4/fab_bg_normal.png b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xxhdpi-v4/fab_bg_normal.png
new file mode 100644 (file)
index 0000000..14608ff
Binary files /dev/null and b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xxhdpi-v4/fab_bg_normal.png differ
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xxxhdpi-v4/fab_bg_mini.png b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xxxhdpi-v4/fab_bg_mini.png
new file mode 100644 (file)
index 0000000..6fea674
Binary files /dev/null and b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xxxhdpi-v4/fab_bg_mini.png differ
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xxxhdpi-v4/fab_bg_normal.png b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xxxhdpi-v4/fab_bg_normal.png
new file mode 100644 (file)
index 0000000..0e78ff6
Binary files /dev/null and b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/drawable-xxxhdpi-v4/fab_bg_normal.png differ
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/values/values.xml b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/res/values/values.xml
new file mode 100644 (file)
index 0000000..8139c61
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <declare-styleable name="AddFloatingActionButton"><attr format="color" name="fab_plusIconColor"/></declare-styleable>
+    <declare-styleable name="FloatingActionButton"><attr format="color" name="fab_colorPressed"/><attr format="color" name="fab_colorDisabled"/><attr format="color" name="fab_colorNormal"/><attr format="reference" name="fab_icon"/><attr format="enum" name="fab_size"><enum name="normal" value="0"/><enum name="mini" value="1"/></attr><attr format="string" name="fab_title"/><attr format="boolean" name="fab_stroke_visible"/></declare-styleable>
+    <declare-styleable name="FloatingActionsMenu"><attr format="color" name="fab_addButtonColorPressed"/><attr format="color" name="fab_addButtonColorNormal"/><attr format="enum" name="fab_addButtonSize"><enum name="normal" value="0"/><enum name="mini" value="1"/></attr><attr format="color" name="fab_addButtonPlusIconColor"/><attr format="boolean" name="fab_addButtonStrokeVisible"/><attr format="reference" name="fab_labelStyle"/><attr format="enum" name="fab_labelsPosition"><enum name="left" value="0"/><enum name="right" value="1"/></attr><attr format="enum" name="fab_expandDirection"><enum name="up" value="0"/><enum name="down" value="1"/><enum name="left" value="2"/><enum name="right" value="3"/></attr></declare-styleable>
+    <!-- From: file:/Users/chalup/src/android-floating-action-button/library/src/main/res/values/dimens.xml -->
+    <eat-comment/>
+    <dimen name="fab_actions_spacing">16dp</dimen>
+    <dimen name="fab_icon_size">24dp</dimen>
+    <dimen name="fab_labels_margin">8dp</dimen>
+    <dimen name="fab_plus_icon_size">14dp</dimen>
+    <dimen name="fab_plus_icon_stroke">2dp</dimen>
+    <dimen name="fab_shadow_offset">3dp</dimen>
+    <dimen name="fab_shadow_radius">9dp</dimen>
+    <dimen name="fab_size_mini">40dp</dimen>
+    <dimen name="fab_size_normal">56dp</dimen>
+    <dimen name="fab_stroke_width">1dp</dimen>
+    <!-- From: file:/Users/chalup/src/android-floating-action-button/library/src/main/res/values/ids.xml -->
+    <eat-comment/>
+    <item name="fab_expand_menu_button" type="id"/>
+    <item name="fab_label" type="id"/>
+</resources>
\ No newline at end of file
diff --git a/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/src/.readme b/libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar/src/.readme
new file mode 100644 (file)
index 0000000..4bcebad
--- /dev/null
@@ -0,0 +1,2 @@
+This hidden file is there to ensure there is an src folder.
+Once we support binary library this will go away.
\ No newline at end of file
index b7cabdd..3b4370c 100644 (file)
@@ -11,3 +11,4 @@
 target=android-22
 android.library.reference.1=owncloud-android-library
 android.library.reference.2=libs/android-support-appcompat-v7-exploded-aar
+android.library.reference.3=libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar
diff --git a/res/drawable-hdpi-v9/ic_action_download.png b/res/drawable-hdpi-v9/ic_action_download.png
deleted file mode 100644 (file)
index 25476cd..0000000
Binary files a/res/drawable-hdpi-v9/ic_action_download.png and /dev/null differ
diff --git a/res/drawable-hdpi-v9/ic_action_refresh.png b/res/drawable-hdpi-v9/ic_action_refresh.png
deleted file mode 100644 (file)
index a7fdc0d..0000000
Binary files a/res/drawable-hdpi-v9/ic_action_refresh.png and /dev/null differ
diff --git a/res/drawable-hdpi-v9/ic_action_settings.png b/res/drawable-hdpi-v9/ic_action_settings.png
deleted file mode 100644 (file)
index 86b54f4..0000000
Binary files a/res/drawable-hdpi-v9/ic_action_settings.png and /dev/null differ
diff --git a/res/drawable-hdpi/ic_checkbox_blank_outline.png b/res/drawable-hdpi/ic_checkbox_blank_outline.png
new file mode 100644 (file)
index 0000000..164dcb5
Binary files /dev/null and b/res/drawable-hdpi/ic_checkbox_blank_outline.png differ
diff --git a/res/drawable-hdpi/ic_checkbox_marked.png b/res/drawable-hdpi/ic_checkbox_marked.png
new file mode 100644 (file)
index 0000000..330d7b9
Binary files /dev/null and b/res/drawable-hdpi/ic_checkbox_marked.png differ
diff --git a/res/drawable-hdpi/ic_import.png b/res/drawable-hdpi/ic_import.png
new file mode 100644 (file)
index 0000000..ad72837
Binary files /dev/null and b/res/drawable-hdpi/ic_import.png differ
diff --git a/res/drawable-mdpi-v9/ic_action_download.png b/res/drawable-mdpi-v9/ic_action_download.png
deleted file mode 100644 (file)
index 2684c83..0000000
Binary files a/res/drawable-mdpi-v9/ic_action_download.png and /dev/null differ
diff --git a/res/drawable-mdpi-v9/ic_action_refresh.png b/res/drawable-mdpi-v9/ic_action_refresh.png
deleted file mode 100644 (file)
index bb9d855..0000000
Binary files a/res/drawable-mdpi-v9/ic_action_refresh.png and /dev/null differ
diff --git a/res/drawable-mdpi-v9/ic_action_settings.png b/res/drawable-mdpi-v9/ic_action_settings.png
deleted file mode 100644 (file)
index 47ef3f4..0000000
Binary files a/res/drawable-mdpi-v9/ic_action_settings.png and /dev/null differ
diff --git a/res/drawable-mdpi/ic_checkbox_blank_outline.png b/res/drawable-mdpi/ic_checkbox_blank_outline.png
new file mode 100644 (file)
index 0000000..d4ca47c
Binary files /dev/null and b/res/drawable-mdpi/ic_checkbox_blank_outline.png differ
diff --git a/res/drawable-mdpi/ic_checkbox_marked.png b/res/drawable-mdpi/ic_checkbox_marked.png
new file mode 100644 (file)
index 0000000..99df274
Binary files /dev/null and b/res/drawable-mdpi/ic_checkbox_marked.png differ
diff --git a/res/drawable-mdpi/ic_import.png b/res/drawable-mdpi/ic_import.png
new file mode 100644 (file)
index 0000000..3bc69d1
Binary files /dev/null and b/res/drawable-mdpi/ic_import.png differ
diff --git a/res/drawable-xhdpi/ic_checkbox_blank_outline.png b/res/drawable-xhdpi/ic_checkbox_blank_outline.png
new file mode 100644 (file)
index 0000000..05024eb
Binary files /dev/null and b/res/drawable-xhdpi/ic_checkbox_blank_outline.png differ
diff --git a/res/drawable-xhdpi/ic_checkbox_marked.png b/res/drawable-xhdpi/ic_checkbox_marked.png
new file mode 100644 (file)
index 0000000..3a2ca10
Binary files /dev/null and b/res/drawable-xhdpi/ic_checkbox_marked.png differ
diff --git a/res/drawable-xhdpi/ic_import.png b/res/drawable-xhdpi/ic_import.png
new file mode 100644 (file)
index 0000000..bf2f72e
Binary files /dev/null and b/res/drawable-xhdpi/ic_import.png differ
diff --git a/res/drawable-xxhdpi/ic_checkbox_blank_outline.png b/res/drawable-xxhdpi/ic_checkbox_blank_outline.png
new file mode 100644 (file)
index 0000000..ffb1ea8
Binary files /dev/null and b/res/drawable-xxhdpi/ic_checkbox_blank_outline.png differ
diff --git a/res/drawable-xxhdpi/ic_checkbox_marked.png b/res/drawable-xxhdpi/ic_checkbox_marked.png
new file mode 100644 (file)
index 0000000..fba7e0c
Binary files /dev/null and b/res/drawable-xxhdpi/ic_checkbox_marked.png differ
diff --git a/res/drawable-xxhdpi/ic_import.png b/res/drawable-xxhdpi/ic_import.png
new file mode 100644 (file)
index 0000000..a4412aa
Binary files /dev/null and b/res/drawable-xxhdpi/ic_import.png differ
diff --git a/res/drawable-xxhdpi/ic_sort_variant.png b/res/drawable-xxhdpi/ic_sort_variant.png
new file mode 100644 (file)
index 0000000..2918126
Binary files /dev/null and b/res/drawable-xxhdpi/ic_sort_variant.png differ
diff --git a/res/drawable/fab_label_background.xml b/res/drawable/fab_label_background.xml
new file mode 100644 (file)
index 0000000..4460dab
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="@color/black_semi_transparent"/>
+    <padding
+        android:left="@dimen/standard_padding"
+        android:top="4dp"
+        android:right="@dimen/standard_padding"
+        android:bottom="4dp"/>
+    <corners
+        android:radius="2dp"/>
+</shape>
\ No newline at end of file
index bd4b0b6..d90fb8a 100644 (file)
         android:orientation="horizontal" >
 
         <!-- 'OK' / 'CANCEL' BUTTONS CHANGE THEIR ORDER FROM ANDROID 4.0 ; THANKS, GOOGLE -->
-        <Button
+        <android.support.v7.widget.AppCompatButton
             android:id="@+id/cancel"
+            android:theme="@style/Button"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_weight="1"
             android:text="@string/common_cancel" />
 
-               <Button
+        <android.support.v7.widget.AppCompatButton
                    android:id="@+id/ok"
+            android:theme="@style/Button.Primary"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
index 3a8655f..a555e2f 100644 (file)
@@ -96,7 +96,6 @@
                            android:padding="0dp"\r
                            android:scaleType="fitCenter"\r
                            android:src="@drawable/ic_action_refresh_grey"\r
-               android:onClick="onRefreshClick"\r
                                android:visibility="gone"\r
                                android:background="@android:color/transparent"\r
                 android:contentDescription="@string/auth_refresh_button"\r
index aacb1c6..a525bf0 100644 (file)
         <LinearLayout
             android:layout_width="fill_parent"
             android:layout_height="100dp"
-            android:paddingTop="16dp"
-            android:paddingBottom="16dp"
+            android:paddingTop="@dimen/standard_padding"
+            android:paddingBottom="@dimen/standard_padding"
             android:background="@color/owncloud_blue_accent">
 
             <ImageView
                 android:id="@+id/itemIcon"
                 android:layout_width="24sp"
                 android:layout_height="24sp"
-                android:layout_marginLeft="16sp"
+                android:layout_marginLeft="@dimen/standard_padding"
                 android:layout_marginBottom="3dp"
                 android:layout_gravity="bottom"
                 android:src="@drawable/ic_account_circle"
@@ -93,7 +93,7 @@
                 android:text="@string/app_name"
                 android:textColor="#FFF"
                 android:paddingLeft="22dp"
-                android:paddingRight="16dp"
+                android:paddingRight="@dimen/standard_padding"
                 android:textSize="24sp"
                 android:ellipsize="end"
                 android:singleLine="true"
index 8c10610..25415ac 100644 (file)
     android:layout_alignParentLeft="true"
     android:orientation="horizontal"
     android:background="@color/background_color"
-    android:layout_marginTop="16dp"
-    android:layout_marginBottom="16dp"
+    android:layout_marginTop="@dimen/standard_margin"
+    android:layout_marginBottom="@dimen/standard_margin"
     android:minHeight="?android:attr/listPreferredItemHeight">
 
     <ImageView
         android:id="@+id/itemIcon"
         android:layout_width="24sp"
         android:layout_height="24sp"
-        android:layout_marginLeft="16sp"
+        android:layout_marginLeft="@dimen/standard_margin"
         android:layout_gravity="center_vertical"
         />
 
@@ -41,7 +41,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:paddingLeft="22dp"
-        android:paddingRight="16dp"
+        android:paddingRight="@dimen/standard_margin"
         android:textColor="@color/drawerMenuTextColor"
         android:text="@string/app_name"
         android:textStyle="normal"
index 726d057..3c4bbdb 100644 (file)
@@ -21,7 +21,7 @@
     android:layout_width="fill_parent"
     android:layout_height="56dp"
     android:gravity="center_vertical"
-    android:paddingLeft="16dp"
-    android:paddingRight="16dp"
-    android:textColor="#000"
+    android:paddingLeft="@dimen/standard_padding"
+    android:paddingRight="@dimen/standard_padding"
+    android:textColor="@color/black"
     android:textSize="18dp" />
\ No newline at end of file
index 0ad98e3..7a241b3 100644 (file)
@@ -32,9 +32,9 @@
                        android:id="@+id/fdFileHeaderContainer"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
-                       android:layout_marginLeft="16dp"
-                       android:layout_marginRight="16dp"
-                       android:layout_marginTop="4dp" >
+                       android:layout_marginLeft="@dimen/standard_margin"
+                       android:layout_marginRight="@dimen/standard_margin"
+                       android:layout_marginTop="@dimen/standard_margin">
        
                        <ImageView
                                android:id="@+id/fdIcon"
@@ -57,8 +57,9 @@
                        android:id="@+id/fdDetailsContainer"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
-                       android:layout_marginLeft="16dp"
-                       android:layout_marginRight="16dp"
+                       android:layout_marginLeft="@dimen/standard_margin"
+                       android:layout_marginRight="@dimen/standard_margin"
+                       android:layout_marginTop="@dimen/standard_margin"
                        android:layout_below="@id/fdFileHeaderContainer" >
                
                        <RelativeLayout
@@ -72,7 +73,6 @@
                                        android:id="@+id/fdTypeLabel"
                                        android:layout_width="wrap_content"
                                        android:layout_height="wrap_content"
-                                       android:layout_marginTop="24dp"
                                        android:text="@string/filedetails_type"
                                        android:textAppearance="?android:attr/textAppearanceMedium" />
                                        
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_alignParentTop="true"
-                               android:layout_marginLeft="12dp"
+                               android:layout_marginLeft="@dimen/standard_margin"
                                android:layout_toRightOf="@+id/fdLabelContainer" >
                                
                                <TextView
                                        android:id="@+id/fdType"
                                        android:layout_width="wrap_content"
                                        android:layout_height="wrap_content"
-                                       android:layout_marginTop="24dp"
                                        android:text="@string/placeholder_filetype"
                                        android:textAppearance="?android:attr/textAppearanceMedium" />
                                        
                        android:layout_height="wrap_content"
                        android:layout_below="@+id/fdDetailsContainer"
                        android:gravity="center_horizontal" 
-                       android:layout_margin="16dp"
+                       android:layout_margin="@dimen/standard_margin"
                        >
                        
-                       <CheckBox
+                       <android.support.v7.widget.AppCompatCheckBox
                                android:id="@+id/fdFavorite"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_centerHorizontal="true"
-                               android:text="@string/favorite" />
+                               android:text="@string/favorite"
+                               android:checked="false" />
 
                        <LinearLayout
                                android:layout_width="match_parent"
index f7a697a..685f2b5 100644 (file)
@@ -39,7 +39,7 @@
                android:id="@+id/image_preview"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
-               android:layout_margin="16dp"
+               android:layout_margin="@dimen/standard_margin"
                android:layout_gravity="center"
                android:contentDescription="@string/preview_image_description"
                android:src="@drawable/logo" />
index 4fbec4a..0e334fd 100644 (file)
@@ -48,7 +48,7 @@
 
         <android.support.v7.widget.AppCompatButton
             android:id="@+id/folder_picker_btn_cancel"
-            style="@style/ownCloud.Button"
+            android:theme="@style/Button"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_weight="1"
@@ -56,7 +56,7 @@
 
         <android.support.v7.widget.AppCompatButton
                    android:id="@+id/folder_picker_btn_choose"
-            style="@style/ownCloud.Button"
+            android:theme="@style/Button.Primary"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
index f20c5f3..64c9ed0 100644 (file)
@@ -50,7 +50,7 @@
 
         <android.support.v7.widget.AppCompatButton
                    android:id="@+id/ok"
-            style="@style/ownCloud.Button"
+            android:theme="@style/Button.Primary"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
@@ -58,7 +58,7 @@
 
         <android.support.v7.widget.AppCompatButton
             android:id="@+id/cancel"
-            style="@style/ownCloud.Button"
+            android:theme="@style/Button"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_weight="1"
index a8e8cc3..964b845 100644 (file)
     <TextView
         android:id="@+id/footerText"
         android:layout_width="match_parent"
-        android:layout_height="56dp"
+        android:layout_height="wrap_content"
+        android:padding="@dimen/standard_padding"
         android:layout_gravity="center"
         android:gravity="center"
-        android:textColor="@color/setup_text_hint"
+        android:textColor="@color/secondaryTextColor"
         />
 
 </LinearLayout> 
\ No newline at end of file
index 81b5210..ac28fcf 100644 (file)
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -->
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:fab="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
+    xmlns:fab="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:layout_weight="1" >
+    android:layout_height="match_parent">
 
     <android.support.v4.widget.SwipeRefreshLayout
         android:id="@+id/swipe_containing_list"
         android:layout_width="match_parent"
-        android:layout_height="match_parent" 
-        android:layout_weight="1"
+        android:layout_height="match_parent"
         android:footerDividersEnabled="false"
         android:visibility="visible" >
         
             </ScrollView>
     </android.support.v4.widget.SwipeRefreshLayout>
 
-</FrameLayout>
\ No newline at end of file
+</FrameLayout>
+    <com.getbase.floatingactionbutton.FloatingActionsMenu
+        android:id="@+id/fab_main"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:layout_alignParentRight="true"
+        android:layout_alignParentEnd="true"
+        fab:fab_addButtonColorNormal="@color/owncloud_blue_accent"
+        fab:fab_addButtonColorPressed="@color/owncloud_blue"
+        fab:fab_addButtonPlusIconColor="@color/white"
+        fab:fab_labelStyle="@style/menu_labels_style"
+        android:layout_marginBottom="@dimen/standard_margin"
+        android:layout_marginRight="@dimen/standard_margin"
+        android:layout_marginEnd="@dimen/standard_margin"
+        android:visibility="gone">
+
+        <com.getbase.floatingactionbutton.FloatingActionButton
+            android:id="@+id/fab_upload"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            fab:fab_size="mini"
+            fab:fab_icon="@drawable/ic_action_upload"
+            fab:fab_colorNormal="@color/owncloud_blue_accent"
+            fab:fab_colorPressed="@color/owncloud_blue"
+            fab:fab_title=""/>
+
+        <com.getbase.floatingactionbutton.FloatingActionButton
+            android:id="@+id/fab_mkdir"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            fab:fab_size="mini"
+            fab:fab_icon="@drawable/ic_action_create_dir"
+            fab:fab_colorNormal="@color/owncloud_blue_accent"
+            fab:fab_colorPressed="@color/owncloud_blue"
+            fab:fab_title=""/>
+
+        <com.getbase.floatingactionbutton.FloatingActionButton
+            android:id="@+id/fab_upload_from_app"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            fab:fab_size="mini"
+            fab:fab_icon="@drawable/ic_import"
+            fab:fab_colorNormal="@color/owncloud_blue_accent"
+            fab:fab_colorPressed="@color/owncloud_blue"
+            fab:fab_title=""/>
+
+    </com.getbase.floatingactionbutton.FloatingActionsMenu>
+</RelativeLayout>
\ No newline at end of file
index be0b94e..754fd9e 100644 (file)
@@ -22,7 +22,7 @@
     android:layout_width="match_parent"\r
     android:background="@drawable/list_selector"\r
     android:orientation="vertical"\r
-    android:layout_height="56dp">\r
+    android:layout_height="72dp">\r
 \r
     <LinearLayout\r
         android:layout_width="match_parent"\r
         android:orientation="horizontal">\r
 \r
         <FrameLayout\r
-            android:layout_width="56dp"\r
-            android:layout_height="56dp"\r
+            android:layout_width="60dp"\r
+            android:layout_height="72dp"\r
+            android:paddingLeft="12dp"\r
+            android:paddingBottom="@dimen/standard_padding"\r
+            android:paddingTop="@dimen/standard_padding"\r
+            android:paddingRight="4dp"\r
             android:focusable="false"\r
             android:focusableInTouchMode="false">\r
 \r
                 android:id="@+id/localFileIndicator"\r
                 android:layout_width="@dimen/file_icon_size"\r
                 android:layout_height="@dimen/file_icon_size"\r
-                android:layout_gravity="center_vertical"\r
-                android:layout_marginLeft="22dp"\r
+                android:layout_gravity="top|right"\r
+                android:layout_marginRight="4dp"\r
                 android:src="@drawable/local_file_indicator" />\r
 \r
             <ImageView\r
                 android:id="@+id/thumbnail"\r
                 android:layout_width="@dimen/file_icon_size"\r
                 android:layout_height="@dimen/file_icon_size"\r
-                android:layout_gravity="center_vertical"\r
-                android:layout_marginLeft="12dp"\r
+                android:layout_gravity="left|center_vertical"\r
                 android:src="@drawable/ic_menu_archive" />\r
 \r
             <ImageView\r
@@ -56,8 +59,7 @@
                 android:layout_width="wrap_content"\r
                 android:layout_height="wrap_content"\r
                 android:layout_gravity="bottom|right"\r
-                android:layout_marginBottom="10dp"\r
-                android:layout_marginRight="2dp"\r
+                android:layout_marginRight="4dp"\r
                 android:src="@drawable/ic_favorite" />\r
         </FrameLayout>\r
 \r
@@ -65,7 +67,8 @@
             android:layout_width="0dp"\r
             android:layout_height="match_parent"\r
             android:layout_weight="1"\r
-            android:gravity="center_vertical"\r
+            android:gravity="top"\r
+            android:paddingTop="@dimen/standard_padding"\r
             android:orientation="vertical" >\r
 \r
             <TextView\r
                 android:layout_width="wrap_content"\r
                 android:layout_height="wrap_content"\r
                 android:layout_gravity="center_vertical"\r
-                android:layout_marginLeft="4dp"\r
+                android:layout_marginLeft="0dp"\r
                 android:layout_marginRight="4dp"\r
                 android:ellipsize="middle"\r
                 android:singleLine="true"\r
                 android:text="TextView"\r
-                android:textColor="#303030"\r
-                android:textSize="16dip" />\r
+                android:textColor="@color/textColor"\r
+                android:textSize="@dimen/two_line_primary_text_size" />\r
 \r
             <LinearLayout\r
                 android:layout_width="match_parent"\r
                 android:layout_height="wrap_content"\r
-                android:layout_marginLeft="4dp"\r
+                android:layout_marginLeft="0dp"\r
                 android:layout_marginRight="4dp"\r
-                android:weightSum="1">\r
+                android:orientation="horizontal">\r
 \r
                 <TextView\r
                     android:id="@+id/last_mod"\r
                     android:layout_width="wrap_content"\r
                     android:layout_height="wrap_content"\r
                     android:text="TextView"\r
-                    android:layout_weight=".5"\r
                     android:textColor="@color/list_item_lastmod_and_filesize_text"\r
-                    android:textSize="12dip"/>\r
+                    android:textSize="@dimen/two_line_secondary_text_size"/>\r
+\r
+                <TextView\r
+                    android:id="@+id/file_separator"\r
+                    android:layout_width="wrap_content"\r
+                    android:layout_height="wrap_content"\r
+                    android:gravity="right"\r
+                    android:text=", "\r
+                    android:textColor="@color/list_item_lastmod_and_filesize_text"\r
+                    android:textSize="@dimen/two_line_secondary_text_size"/>\r
 \r
                 <TextView\r
                     android:id="@+id/file_size"\r
                     android:gravity="right"\r
                     android:text="TextView"\r
                     android:textColor="@color/list_item_lastmod_and_filesize_text"\r
-                    android:layout_weight=".5"\r
-                    android:textSize="12dip"/>\r
+                    android:textSize="@dimen/two_line_secondary_text_size"/>\r
 \r
             </LinearLayout>\r
 \r
             android:layout_height="wrap_content"\r
             android:layout_gravity="center_vertical"\r
             android:layout_marginLeft="4dp"\r
-            android:layout_marginRight="4dp"\r
+            android:layout_marginRight="@dimen/standard_margin"\r
             android:gravity=""\r
-            android:src="@android:drawable/checkbox_off_background" />\r
+            android:src="@drawable/ic_checkbox_blank_outline" />\r
     </LinearLayout>\r
 \r
     <View\r
index 7d7a377..2bc5d66 100644 (file)
@@ -23,7 +23,7 @@
     android:clickable="true"
     android:orientation="vertical"
     android:background="#fff"
-    android:paddingLeft="16dp"
+    android:paddingLeft="@dimen/standard_padding"
     tools:context=".MainActivity" >
 
     <TextView
@@ -32,7 +32,7 @@
         android:layout_height="wrap_content"
         android:drawablePadding="5dp"
         android:gravity="center_vertical"
-        android:paddingLeft="16dp"
+        android:paddingLeft="@dimen/standard_padding"
         android:textSize="16dp" >
 
     </TextView>
index 753d738..ac71114 100644 (file)
@@ -24,7 +24,7 @@
     android:layout_height="56dp"
     android:layout_marginLeft="8dp"
     android:gravity="left"
-    android:paddingLeft="16dp"
+    android:paddingLeft="@dimen/standard_padding"
     android:paddingTop="8dp"
     android:textSize="16dp"
     android:groupIndicator="@android:color/transparent"
index 0dbb9ef..aeea08b 100644 (file)
     android:id="@+id/loadingLayout"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="horizontal" >
+    android:orientation="horizontal"
+    android:padding="@dimen/standard_padding">
 
     <ProgressBar
         android:id="@+id/loadingBar"
+        style="?android:attr/progressBarStyle"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_gravity="center_vertical"
-        android:layout_marginBottom="10dp"
-        android:layout_marginLeft="10dp"
-        android:layout_marginRight="5dp"
-        android:layout_marginTop="10dp" />
+        android:indeterminate="true"
+        android:indeterminateOnly="false"/>
 
     <TextView
         android:id="@+id/loadingText"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_gravity="center_vertical"
-        android:layout_marginRight="20dp"
+        android:layout_marginLeft="@dimen/standard_margin"
         android:text="TextView" />
 
 </LinearLayout>
index 2353b19..70169e5 100644 (file)
@@ -30,7 +30,6 @@
         android:textStyle="bold"
         android:textSize="22dp"
         android:textColor="#000000"
-        android:layout_marginTop="5dp"
-        android:layout_marginBottom="5dp" />
+        android:layout_marginBottom="@dimen/standard_margin" />
 
 </LinearLayout>
\ No newline at end of file
index 4f90772..921528e 100644 (file)
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical"
-    android:padding="10dp"
-    android:paddingLeft="8dp"
-    android:paddingRight="8dp"
     android:weightSum="1" >
 
     <ScrollView
         android:id="@+id/scrollView1"
         android:layout_width="match_parent"
         android:layout_height="0dp"
-        android:layout_marginBottom="15dp"
-        android:layout_weight="1" >
+        android:layout_marginBottom="@dimen/standard_margin"
+        android:layout_weight="1">
 
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:orientation="vertical" >
+            android:orientation="vertical"
+            android:paddingLeft="@dimen/standard_padding"
+            android:paddingRight="@dimen/standard_padding">
 
             <TextView
                 android:id="@+id/logTV"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:text="@string/empty" />
+                android:text="@string/empty"
+                android:typeface="monospace"/>
         </LinearLayout>
     </ScrollView>
 
         android:id="@+id/historyButtonBar"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
-        android:orientation="horizontal" >
+        android:orientation="horizontal"
+        android:layout_marginBottom="@dimen/standard_margin"
+        android:layout_marginLeft="@dimen/standard_margin"
+        android:layout_marginRight="@dimen/standard_margin">
 
-    <android.support.v7.widget.AppCompatButton
+    <Button
         android:id="@+id/deleteLogHistoryButton"
-        style="@style/ownCloud.Button"
+        android:theme="@style/Button"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:layout_gravity="bottom"
@@ -62,7 +65,7 @@
 
     <android.support.v7.widget.AppCompatButton
         android:id="@+id/sendLogHistoryButton"
-        style="@style/ownCloud.Button"
+        android:theme="@style/Button.Primary"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:layout_gravity="bottom"
index f3a0d01..14c3cf6 100644 (file)
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:oc="http://schemas.android.com/apk/res/com.owncloud.android"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     android:gravity="center_horizontal"
     android:orientation="vertical"
-    android:padding="20dp" >
+    android:padding="@dimen/standard_padding" >
 
 
     <TextView
@@ -33,6 +32,7 @@
         android:text="@string/pass_code_enter_pass_code"
         android:textColor="@android:color/black"
         android:gravity="center_horizontal"
+        android:textSize="16sp"
          />
 
     <TextView
@@ -42,6 +42,7 @@
         android:text="@string/pass_code_configure_your_pass_code_explanation"
         android:textAppearance="@android:style/TextAppearance.Small"
         android:gravity="center_horizontal"
+        android:textSize="14sp"
          />
     
     <LinearLayout
@@ -81,7 +82,7 @@
 
     <android.support.v7.widget.AppCompatButton
         android:id="@+id/cancel"
-        style="@style/ownCloud.Button"
+        android:theme="@style/Button.Primary"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:text="@string/common_cancel" />
index 8ef7b13..9e195b5 100644 (file)
@@ -21,7 +21,7 @@
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:gravity="center"
-       android:padding="16dp"
+       android:padding="@dimen/standard_padding"
     android:orientation="vertical" >
 
        <TextView
@@ -29,7 +29,7 @@
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="0"
-               android:paddingBottom="16dp"
+               android:paddingBottom="@dimen/standard_padding"
                android:text="@string/ssl_validator_header"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:textColor="@android:color/black"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
                android:layout_weight="0"
-               android:paddingTop="16dp"
+               android:paddingTop="@dimen/standard_padding"
         android:text="@string/ssl_validator_question"
         android:textAppearance="?android:attr/textAppearanceMedium"
         >
index 4cbd46a..df14a35 100644 (file)
     android:layout_height="wrap_content"
     android:gravity="center"
     android:orientation="vertical"
-       android:padding="16dp">
+       android:padding="@dimen/standard_padding">
 
        <TextView
                android:id="@+id/header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/ssl_validator_header"
-               android:paddingBottom="16dp"
+               android:paddingBottom="@dimen/standard_padding"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:textColor="@color/black"
                 />
         android:id="@+id/question"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-               android:paddingTop="16dp"
+               android:paddingTop="@dimen/standard_padding"
         android:text="@string/ssl_validator_question"
         android:textAppearance="?android:attr/textAppearanceMedium"
         >
index 95a3fb2..121fd64 100644 (file)
@@ -38,7 +38,7 @@
 \r
         <android.support.v7.widget.AppCompatButton\r
             android:id="@+id/upload_files_btn_cancel"\r
-            style="@style/ownCloud.Button"\r
+            android:theme="@style/Button"\r
             android:layout_width="wrap_content"\r
             android:layout_height="wrap_content"\r
             android:layout_weight="1"\r
@@ -46,7 +46,7 @@
 \r
         <android.support.v7.widget.AppCompatButton\r
                    android:id="@+id/upload_files_btn_upload"\r
-            style="@style/ownCloud.Button"\r
+            android:theme="@style/Button.Primary"\r
                    android:layout_width="wrap_content"\r
                    android:layout_height="wrap_content"\r
                    android:layout_weight="1"\r
index 79b077d..9d95ee4 100644 (file)
@@ -53,6 +53,7 @@
            android:orientation="horizontal" >
 
                <android.support.v7.widget.AppCompatButton
+                       android:theme="@style/Button"
                    android:id="@+id/uploader_cancel"
                        style="@style/ownCloud.Button"
                    android:layout_width="fill_parent"
@@ -63,7 +64,7 @@
 
                <android.support.v7.widget.AppCompatButton
                    android:id="@+id/uploader_choose_folder"
-                       style="@style/ownCloud.Button"
+                       android:theme="@style/Button.Primary"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="bottom"
index f83608e..b66df44 100644 (file)
        android:layout_width="fill_parent"
        android:background="#fefefe"
        android:orientation="horizontal"
-       android:layout_height="56dp"  >
+       android:layout_height="72dp"
+    android:padding="@dimen/standard_padding">
   
     <ImageView 
-        android:layout_width="20dp"
-        android:layout_height="20dp"
+        android:layout_width="@dimen/file_icon_size"
+        android:layout_height="@dimen/file_icon_size"
         android:layout_gravity="center_vertical|center"
-        android:layout_margin="4dp"
         android:src="@drawable/ic_menu_archive" 
-        android:id="@+id/thumbnail" />
+        android:id="@+id/thumbnail"
+        android:layout_marginRight="@dimen/standard_padding"/>
     
     <TextView 
         android:text="TextView" 
index e03960f..2551a83 100644 (file)
     xmlns:app="http://schemas.android.com/apk/res-auto">
 
     <item
-        android:id="@+id/action_upload"
-        android:icon="@drawable/ic_action_upload"
-        android:orderInCategory="2"
-        app:showAsAction="always"
-        android:title="@string/actionbar_upload"
-        android:contentDescription="@string/actionbar_upload"/>
-    <item
         android:id="@+id/action_create_dir"
         android:icon="@drawable/ic_action_create_dir"
-        android:orderInCategory="2"
+        android:orderInCategory="1"
         app:showAsAction="always"
         android:title="@string/actionbar_mkdir"
         android:contentDescription="@string/actionbar_mkdir"/>
     <item
         android:id="@+id/action_sync_account"
         android:icon="@drawable/ic_action_refresh"
-        android:orderInCategory="2"
-        app:showAsAction="never"
+        android:orderInCategory="1"
+        app:showAsAction="always"
         android:title="@string/actionbar_sync"
         android:contentDescription="@string/actionbar_sync"/>
        <item
         android:id="@+id/action_sort"
-        android:icon="@android:drawable/ic_menu_sort_by_size"
-        android:orderInCategory="2"
-        app:showAsAction="never"
+        android:icon="@drawable/ic_sort_variant"
+        android:orderInCategory="1"
+        app:showAsAction="ifRoom"
         android:title="@string/actionbar_sort"
         android:contentDescription="@string/actionbar_sort"/>
 
index 00fe7ca..4fdc212 100644 (file)
@@ -1,10 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources xmlns:android="http://schemas.android.com/apk/res/android">
-       
-       <style name="Theme.ownCloud.ButtonStyle" parent="@android:style/Widget.Holo.Light.Button">
-               <item name="android:background">@android:drawable/btn_default</item>
-               <item name="android:textColor">@color/button_text_color</item>
-       </style>
 
        <!-- Notifications -->
        <style  name="Theme.ownCloud.NotificationText.Title" 
index dab9b3f..694e231 100644 (file)
     <color name="owncloud_blue_accent">#35537A</color>
     <color name="owncloud_blue_bright">#00ddff</color>
 
-    <color name="list_item_lastmod_and_filesize_text">#989898</color>
+    <color name="list_item_lastmod_and_filesize_text">@color/secondaryTextColor</color>
     <color name="black">#000000</color>
     <color name="white">#FFFFFF</color>
-    <color name="textColor">#303030</color>
+    <color name="fab_white">#fafafa</color>
+    <color name="white_pressed">#f1f1f1</color>
+    <color name="half_black">#808080</color>
+    <color name="black_semi_transparent">#B2000000</color>
+    <color name="textColor">@color/black</color>
     <color name="drawerMenuTextColor">#000000</color>
-    <color name="list_divider_background">#fff0f0f0</color>
+    <color name="list_divider_background">#eee</color>
     <color name="filelist_icon_backgorund">#DDDDDD</color>
     <color name="dark_background_text_color">#EEEEEE</color>
     <color name="login_text_color">#757575</color>
@@ -36,6 +40,9 @@
     <color name="primary_button_color">@color/owncloud_blue_accent</color>
     <color name="secondary_button_color">#D6D7D7</color>
     <color name="transparent">#00000000</color>
+    <color name="secondaryTextColor">#a0a0a0</color>
+    <color name="listItemHighlighted">#f8f8f8</color>
+    <color name="highlightTextColor">#55739a</color>
 
     <!-- Colors -->
     <color name="color_accent">@color/owncloud_blue_accent</color>
index 54e5225..15b989e 100644 (file)
        <style name="Theme.ownCloud" parent="Theme.AppCompat.Light.DarkActionBar">
        <item name="android:actionBarStyle">@style/Theme.ownCloud.Widget.ActionBar</item>
        <item name="actionBarStyle">@style/Theme.ownCloud.Widget.ActionBar</item>
-       <item name="android:buttonStyle">@style/Theme.ownCloud.ButtonStyle</item>
                <item name="colorPrimary">@color/primary</item>
                <item name="colorPrimaryDark">@color/primary_dark</item>
                <item name="colorAccent">@color/color_accent</item>
                <item name="android:alertDialogTheme">@style/Theme.ownCloud.Dialog</item>
                <item name="alertDialogTheme">@style/ownCloud.AlertDialog</item>
-               <item name="colorButtonNormal">@color/background_color</item>
-               <item name="colorControlActivated">@color/primary_dark</item>
-               <item name="colorControlHighlight">@color/color_accent</item>
        </style>
 
        <!-- seperate action bar style for activities without an action bar -->
        <style name="Theme.ownCloud.noActionBar" parent="Theme.AppCompat.Light.DarkActionBar">
-               <item name="android:buttonStyle">@style/Theme.ownCloud.ButtonStyle</item>
                <item name="windowNoTitle">true</item>
                <item name="windowActionBar">false</item>
                <item name="colorPrimary">@color/primary</item>
@@ -45,9 +40,6 @@
                <item name="colorAccent">@color/color_accent</item>
                <item name="android:alertDialogTheme">@style/Theme.ownCloud.Dialog</item>
                <item name="alertDialogTheme">@style/ownCloud.AlertDialog</item>
-               <item name="colorButtonNormal">@color/background_color</item>
-               <item name="colorControlActivated">@color/primary_dark</item>
-               <item name="colorControlHighlight">@color/color_accent</item>
     </style>
 
        <style name="Theme.ownCloud.noActionBar.Login" parent="Theme.ownCloud.noActionBar">
@@ -59,7 +51,9 @@
                <item name="android:textColorPrimary">@color/primary</item>
        </style>
 
-       <style name="ownCloud.Dialog" parent="Theme.AppCompat.Light.Dialog" />
+       <style name="ownCloud.Dialog" parent="Theme.AppCompat.Light.Dialog">
+               <item name="colorAccent">@color/color_accent</item>
+       </style>
 
        <style name="ProgressDialogTheme" parent="ownCloud.Dialog">
                <item name="colorAccent">@color/color_accent</item>
 
        <style name="Theme.ownCloud.Fullscreen" parent="style/Theme.AppCompat">
         <item name="android:windowFullscreen">true</item>
+               <item name="colorAccent">@color/color_accent</item>
     </style>
        
        
                <item name="buttonBarStyle">@style/Theme.ownCloud.Dialog.ButtonBar</item>
        </style>
 
+       <style name="menu_labels_style">
+               <item name="android:background">@drawable/fab_label_background</item>
+               <item name="android:textColor">@color/fab_white</item>
+       </style>
+
        <!-- Button Bar hack due to Lollipop bug:
                https://code.google.com/p/android/issues/detail?id=78302
        fix see:
index fc5c292..660e0fd 100644 (file)
@@ -1,12 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources xmlns:android="http://schemas.android.com/apk/res/android">
-       
-    <!-- Buttons -->
-       <style name="Theme.ownCloud.ButtonStyle" parent="@android:style/Widget.Button">
-               <item name="android:background">@android:drawable/btn_default</item>
-               <item name="android:textColor">@color/button_text_color</item>
-       </style>
-       
+
        <!-- DropDown -->
        <style name="Theme.ownCloud.DropDownStyle"
                parent="style/Widget.AppCompat.Spinner.DropDown.ActionBar">
index 8ccfeee..b0fef5e 100644 (file)
@@ -23,6 +23,7 @@ call git submodule init
 call git submodule update
 
 call android.bat update project -p libs/android-support-appcompat-v7-exploded-aar --target android-22
+call android.bat update project -p libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar --target android-22
 call android.bat update lib-project -p owncloud-android-library
 call android.bat update project -p .
 call android.bat update project -p oc_jb_workaround
index 76ba2a3..6ca3a85 100755 (executable)
@@ -18,6 +18,7 @@ function initForAnt {
 
        #Prepare project android-support-appcompat-v7 ; JAR file is not enough, includes resources
        android update lib-project -p libs/android-support-appcompat-v7-exploded-aar --target android-22
+       android update lib-project -p libs/com-getbase-floatingactionbutton-1-10-1-exploded-aar --target android-22
        
        #As default it updates the ant scripts
        android update lib-project -p owncloud-android-library
index 02ab3c7..4173ca4 100644 (file)
@@ -176,7 +176,6 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
     private EditText mUsernameInput;\r
     private EditText mPasswordInput;\r
     private View mOkButton;\r
-    private View mCenteredRefreshButton;\r
     private TextView mAuthStatusView;\r
 \r
     private int mAuthStatusText = 0, mAuthStatusIcon = 0;\r
@@ -261,16 +260,22 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
             }\r
         });\r
 \r
-        mCenteredRefreshButton = findViewById(R.id.centeredRefreshButton);\r
-        mCenteredRefreshButton.setOnClickListener(new View.OnClickListener() {\r
+        findViewById(R.id.centeredRefreshButton).setOnClickListener(new View.OnClickListener() {\r
 \r
             @Override\r
             public void onClick(View v) {\r
                 checkOcServer();\r
             }\r
         });\r
-        \r
-        mOkButton = findViewById(R.id.buttonOK);\r
+\r
+        findViewById(R.id.embeddedRefreshButton).setOnClickListener(new View.OnClickListener() {\r
+\r
+            @Override\r
+            public void onClick(View v) {\r
+                checkOcServer();\r
+            }\r
+        });\r
+\r
 \r
         /// initialize block to be moved to single Fragment to check server and get info about it \r
         initServerPreFragment(savedInstanceState);\r
@@ -702,7 +707,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
         \r
         mHostUrlInput.removeTextChangedListener(mHostUrlInputWatcher);\r
         mHostUrlInput.setOnFocusChangeListener(null);\r
-        \r
+\r
         super.onPause();\r
     }\r
     \r
@@ -811,8 +816,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
             Intent getServerInfoIntent = new Intent();\r
             getServerInfoIntent.setAction(OperationsService.ACTION_GET_SERVER_INFO);\r
             getServerInfoIntent.putExtra(\r
-                OperationsService.EXTRA_SERVER_URL,\r
-                normalizeUrlSuffix(uri)\r
+                    OperationsService.EXTRA_SERVER_URL,\r
+                    normalizeUrlSuffix(uri)\r
             );\r
             if (mOperationsServiceBinder != null) {\r
                 mWaitingForOpId = mOperationsServiceBinder.queueNewOperation(getServerInfoIntent);\r
@@ -1625,18 +1630,6 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
     }\r
 \r
     /**\r
-     * Called when the refresh button in the input field for ownCloud host is clicked.\r
-     * \r
-     * Performs a new check on the URL in the input field.\r
-     * \r
-     * @param view      Refresh 'button'\r
-     */\r
-    public void onRefreshClick(View view) {\r
-        checkOcServer();\r
-    }\r
-\r
-\r
-    /**\r
      * Called when the eye icon in the password field is clicked.\r
      * \r
      * Toggles the visibility of the password in the field. \r
index 1c21cab..3edd40c 100644 (file)
@@ -363,12 +363,7 @@ public class FileActivity extends AppCompatActivity
 //        }
 
         // Display username in drawer
-        Account account = AccountUtils.getCurrentOwnCloudAccount(getApplicationContext());
-        if (account != null) {
-            TextView username = (TextView) navigationDrawerLayout.findViewById(R.id.drawer_username);
-            int lastAtPos = account.name.lastIndexOf("@");
-            username.setText(account.name.substring(0, lastAtPos));
-        }
+        setUsernameInDrawer(navigationDrawerLayout, AccountUtils.getCurrentOwnCloudAccount(getApplicationContext()));
 
         // load slide menu items
         mDrawerTitles = getResources().getStringArray(R.array.drawer_items);
@@ -435,6 +430,21 @@ public class FileActivity extends AppCompatActivity
     }
 
     /**
+     * sets the given account name in the drawer in case the drawer is available. The account name
+     * is shortened beginning from the @-sign in the username.
+     *
+     * @param navigationDrawerLayout the drawer layout to be used
+     * @param account                the account to be set in the drawer
+     */
+    protected void setUsernameInDrawer(RelativeLayout navigationDrawerLayout, Account account) {
+        if (navigationDrawerLayout != null && getAccount() != null) {
+            TextView username = (TextView) navigationDrawerLayout.findViewById(R.id.drawer_username);
+            int lastAtPos = account.name.lastIndexOf("@");
+            username.setText(account.name.substring(0, lastAtPos));
+        }
+    }
+
+    /**
      * Updates title bar and home buttons (state and icon).
      *
      * Assumes that navigation drawer is NOT visible.
index 37bd66f..7b97a9c 100644 (file)
@@ -149,7 +149,7 @@ public class FileDisplayActivity extends HookActivity
     private boolean mSyncInProgress = false;
 
     private static String DIALOG_UNTRUSTED_CERT = "DIALOG_UNTRUSTED_CERT";
-    private static String DIALOG_CREATE_FOLDER = "DIALOG_CREATE_FOLDER";
+    public static String DIALOG_CREATE_FOLDER = "DIALOG_CREATE_FOLDER";
     private static String DIALOG_UPLOAD_SOURCE = "DIALOG_UPLOAD_SOURCE";
     private static String DIALOG_CERT_NOT_SAVED = "DIALOG_CERT_NOT_SAVED";
 
@@ -266,12 +266,7 @@ public class FileDisplayActivity extends HookActivity
             setFile(file);
 
             if (mAccountWasSet) {
-                RelativeLayout navigationDrawerLayout = (RelativeLayout) findViewById(R.id.left_drawer);
-                if (navigationDrawerLayout != null && getAccount() != null) {
-                    TextView username = (TextView) navigationDrawerLayout.findViewById(R.id.drawer_username);
-                    int lastAtPos = getAccount().name.lastIndexOf("@");
-                    username.setText(getAccount().name.substring(0, lastAtPos));
-                }
+                setUsernameInDrawer((RelativeLayout) findViewById(R.id.left_drawer), getAccount());
             }
 
             if (!stateWasRecovered) {
@@ -492,8 +487,6 @@ public class FileDisplayActivity extends HookActivity
     @Override
     public boolean onPrepareOptionsMenu(Menu menu) {
         boolean drawerOpen = mDrawerLayout.isDrawerOpen(GravityCompat.START);
-        menu.findItem(R.id.action_upload).setVisible(!drawerOpen);
-        menu.findItem(R.id.action_create_dir).setVisible(!drawerOpen);
         menu.findItem(R.id.action_sort).setVisible(!drawerOpen);
         menu.findItem(R.id.action_sync_account).setVisible(!drawerOpen);
         menu.findItem(R.id.action_switch_view).setVisible(!drawerOpen);
@@ -505,6 +498,7 @@ public class FileDisplayActivity extends HookActivity
     public boolean onCreateOptionsMenu(Menu menu) {
         MenuInflater inflater = getMenuInflater();
         inflater.inflate(R.menu.main_menu, menu);
+        menu.findItem(R.id.action_create_dir).setVisible(false);
         mOptionsMenu = menu;
 
         MenuItem menuItem = mOptionsMenu.findItem(R.id.action_switch_view);
@@ -519,23 +513,10 @@ public class FileDisplayActivity extends HookActivity
     public boolean onOptionsItemSelected(MenuItem item) {
         boolean retval = true;
         switch (item.getItemId()) {
-            case R.id.action_create_dir: {
-                CreateFolderDialogFragment dialog =
-                        CreateFolderDialogFragment.newInstance(getCurrentDir());
-                dialog.show(getSupportFragmentManager(), DIALOG_CREATE_FOLDER);
-                break;
-            }
-
             case R.id.action_sync_account: {
                 startSynchronization();
                 break;
             }
-            case R.id.action_upload: {
-                UploadSourceDialogFragment dialog =
-                        UploadSourceDialogFragment.newInstance(getAccount());
-                dialog.show(getSupportFragmentManager(), DIALOG_UPLOAD_SOURCE);
-                break;
-            }
             case android.R.id.home: {
                 FileFragment second = getSecondFragment();
                 OCFile currentDir = getCurrentDir();
@@ -601,6 +582,34 @@ public class FileDisplayActivity extends HookActivity
         return retval;
     }
 
+    public void createFolder() {
+        CreateFolderDialogFragment dialog =
+                CreateFolderDialogFragment.newInstance(getCurrentDir());
+        dialog.show(getSupportFragmentManager(), DIALOG_CREATE_FOLDER);
+    }
+
+    public void uploadLocalFilesSelected() {
+        Intent action = new Intent(this, UploadFilesActivity.class);
+        action.putExtra(
+                UploadFilesActivity.EXTRA_ACCOUNT,
+                getAccount()
+        );
+        startActivityForResult(action, ACTION_SELECT_MULTIPLE_FILES);
+    }
+
+    public void uploadFromOtherAppsSelected() {
+        Intent action = new Intent(Intent.ACTION_GET_CONTENT);
+        action = action.setType("*/*").addCategory(Intent.CATEGORY_OPENABLE);
+        //Intent.EXTRA_ALLOW_MULTIPLE is only supported on api level 18+, Jelly Bean
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
+            action.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
+        }
+        startActivityForResult(
+                Intent.createChooser(action, getString(R.string.upload_chooser_title)),
+                ACTION_SELECT_CONTENT_FROM_APPS
+        );
+    }
+
     private void startSynchronization() {
         Log_OC.d(TAG, "Got to start sync");
         if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.KITKAT) {
@@ -813,7 +822,26 @@ public class FileDisplayActivity extends HookActivity
 
     @Override
     public void onBackPressed() {
-        if (!isDrawerOpen()){
+        boolean isFabOpen = isFabOpen();
+        boolean isDrawerOpen = isDrawerOpen();
+
+        /*
+         * BackPressed priority/hierarchy:
+         *    1. close drawer if opened
+         *    2. close FAB if open (only if drawer isn't open)
+         *    3. navigate up (only if drawer and FAB aren't open)
+         */
+        if(isDrawerOpen && isFabOpen) {
+            // close drawer first
+            super.onBackPressed();
+        } else if(isDrawerOpen && !isFabOpen) {
+            // close drawer
+            super.onBackPressed();
+        } else if (!isDrawerOpen && isFabOpen) {
+            // close fab
+            getListOfFilesFragment().getFabMain().collapse();
+        } else {
+            // all closed
             OCFileListFragment listOfFiles = getListOfFilesFragment();
             if (mDualPane || getSecondFragment() == null) {
                 OCFile currentDir = getCurrentDir();
@@ -829,10 +857,7 @@ public class FileDisplayActivity extends HookActivity
                 setFile(listOfFiles.getCurrentFile());
             }
             cleanSecondFragment();
-
             changeGridIcon();
-        } else {
-            super.onBackPressed();
         }
     }
 
@@ -924,6 +949,14 @@ public class FileDisplayActivity extends HookActivity
         Log_OC.v(TAG, "onPause() end");
     }
 
+    public boolean isFabOpen() {
+        if(getListOfFilesFragment() != null && getListOfFilesFragment().getFabMain() != null && getListOfFilesFragment().getFabMain().isExpanded()) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
 
     private class SyncBroadcastReceiver extends BroadcastReceiver {
 
index 4b558f0..c3b96da 100644 (file)
@@ -155,6 +155,7 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
         Bundle args = new Bundle();
         args.putBoolean(OCFileListFragment.ARG_JUST_FOLDERS, true);
         args.putBoolean(OCFileListFragment.ARG_ALLOW_CONTEXTUAL_ACTIONS, false);
+        args.putBoolean(OCFileListFragment.ARG_HIDE_FAB, true);
         listOfFiles.setArguments(args);
         FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
         transaction.add(R.id.fragment_container, listOfFiles, TAG_LIST_OF_FOLDERS);
@@ -263,7 +264,6 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
     public boolean onCreateOptionsMenu(Menu menu) {
         MenuInflater inflater = getMenuInflater();
         inflater.inflate(R.menu.main_menu, menu);
-        menu.findItem(R.id.action_upload).setVisible(false);
         menu.findItem(R.id.action_sort).setVisible(false);
         return true;
     }
index d221bc9..83b029f 100644 (file)
@@ -658,7 +658,6 @@ public class Uploader extends FileActivity
     public boolean onCreateOptionsMenu(Menu menu) {
         MenuInflater inflater = getMenuInflater();
         inflater.inflate(R.menu.main_menu, menu);
-        menu.findItem(R.id.action_upload).setVisible(false);
         menu.findItem(R.id.action_sort).setVisible(false);
         menu.findItem(R.id.action_sync_account).setVisible(false);
         return true;
index 5d6b819..410eeed 100644 (file)
@@ -194,6 +194,7 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
             switch (viewType){\r
                 case LIST_ITEM:\r
                     TextView fileSizeV = (TextView) view.findViewById(R.id.file_size);\r
+                    TextView fileSizeSeparatorV = (TextView) view.findViewById(R.id.file_separator);\r
                     TextView lastModV = (TextView) view.findViewById(R.id.last_mod);\r
                     ImageView checkBoxV = (ImageView) view.findViewById(R.id.custom_checkbox);\r
 \r
@@ -202,6 +203,7 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
 \r
                     checkBoxV.setVisibility(View.GONE);\r
 \r
+                    fileSizeSeparatorV.setVisibility(View.VISIBLE);\r
                     fileSizeV.setVisibility(View.VISIBLE);\r
                     fileSizeV.setText(DisplayUtils.bytesToHumanReadable(file.getFileLength()));\r
 \r
@@ -213,16 +215,17 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
                             } else {\r
                                 if (parentList.isItemChecked(position)) {\r
                                     checkBoxV.setImageResource(\r
-                                            android.R.drawable.checkbox_on_background);\r
+                                            R.drawable.ic_checkbox_marked);\r
                                 } else {\r
                                     checkBoxV.setImageResource(\r
-                                            android.R.drawable.checkbox_off_background);\r
+                                            R.drawable.ic_checkbox_blank_outline);\r
                                 }\r
                                 checkBoxV.setVisibility(View.VISIBLE);\r
                             }\r
                         }\r
 \r
                     } else { //Folder\r
+                        fileSizeSeparatorV.setVisibility(View.INVISIBLE);\r
                         fileSizeV.setVisibility(View.INVISIBLE);\r
                     }\r
 \r
index 60675f4..a6839e5 100644 (file)
@@ -121,9 +121,11 @@ public class LocalFileListAdapter extends BaseAdapter implements ListAdapter {
             fileIcon.setTag(file.hashCode());
 
             TextView fileSizeV = (TextView) view.findViewById(R.id.file_size);
+            TextView fileSizeSeparatorV = (TextView) view.findViewById(R.id.file_separator);
             TextView lastModV = (TextView) view.findViewById(R.id.last_mod);
             ImageView checkBoxV = (ImageView) view.findViewById(R.id.custom_checkbox);
             if (!file.isDirectory()) {
+                fileSizeSeparatorV.setVisibility(View.VISIBLE);
                 fileSizeV.setVisibility(View.VISIBLE);
                 fileSizeV.setText(DisplayUtils.bytesToHumanReadable(file.length()));
 
@@ -134,9 +136,9 @@ public class LocalFileListAdapter extends BaseAdapter implements ListAdapter {
                     checkBoxV.setVisibility(View.GONE);
                 } else {
                     if (parentList.isItemChecked(position)) {
-                        checkBoxV.setImageResource(android.R.drawable.checkbox_on_background);
+                        checkBoxV.setImageResource(R.drawable.ic_checkbox_marked);
                     } else {
-                        checkBoxV.setImageResource(android.R.drawable.checkbox_off_background);
+                        checkBoxV.setImageResource(R.drawable.ic_checkbox_blank_outline);
                     }
                     checkBoxV.setVisibility(View.VISIBLE);
                 }
@@ -175,6 +177,7 @@ public class LocalFileListAdapter extends BaseAdapter implements ListAdapter {
                 }  
 
             } else {
+                fileSizeSeparatorV.setVisibility(View.GONE);
                 fileSizeV.setVisibility(View.GONE);
                 lastModV.setVisibility(View.GONE);
                 checkBoxV.setVisibility(View.GONE);
index 1a19e65..6d93ab3 100644 (file)
@@ -22,6 +22,7 @@ package com.owncloud.android.ui.fragment;
 
 import java.util.ArrayList;
 
+import android.app.Activity;
 import android.os.Build;
 import android.os.Bundle;
 import android.support.v4.app.Fragment;
@@ -36,12 +37,16 @@ import android.widget.GridView;
 import android.widget.ListAdapter;
 import android.widget.ListView;
 import android.widget.TextView;
+import android.widget.Toast;
 
+import com.getbase.floatingactionbutton.FloatingActionButton;
+import com.getbase.floatingactionbutton.FloatingActionsMenu;
 import com.owncloud.android.R;
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.ui.ExtendedListView;
 import com.owncloud.android.ui.activity.OnEnforceableRefreshListener;
 import com.owncloud.android.ui.adapter.FileListListAdapter;
+import com.owncloud.android.ui.dialog.CreateFolderDialogFragment;
 
 import third_parties.in.srain.cube.GridViewWithHeaderAndFooter;
 
@@ -64,6 +69,11 @@ public class ExtendedListFragment extends Fragment
     private SwipeRefreshLayout mRefreshGridLayout;
     private SwipeRefreshLayout mRefreshEmptyLayout;
     private TextView mEmptyListMessage;
+
+    private FloatingActionsMenu fabMain;
+    private FloatingActionButton fabUpload;
+    private FloatingActionButton fabMkdir;
+    private FloatingActionButton fabUploadFromApp;
     
     // Save the state of the scroll in browsing
     private ArrayList<Integer> mIndexes;
@@ -96,6 +106,21 @@ public class ExtendedListFragment extends Fragment
         return mCurrentListView;
     }
 
+    public FloatingActionButton getFabUpload() {
+        return fabUpload;
+    }
+
+    public FloatingActionButton getFabUploadFromApp() {
+        return fabUploadFromApp;
+    }
+
+    public FloatingActionButton getFabMkdir() {
+        return fabMkdir;
+    }
+
+    public FloatingActionsMenu getFabMain() {
+        return fabMain;
+    }
 
     public void switchToGridView() {
         if ((mCurrentListView == mListView)) {
@@ -178,6 +203,11 @@ public class ExtendedListFragment extends Fragment
 
         mCurrentListView = mListView;   // list as default
 
+        fabMain = (FloatingActionsMenu) v.findViewById(R.id.fab_main);
+        fabUpload = (FloatingActionButton) v.findViewById(R.id.fab_upload);
+        fabMkdir = (FloatingActionButton) v.findViewById(R.id.fab_mkdir);
+        fabUploadFromApp = (FloatingActionButton) v.findViewById(R.id.fab_upload_from_app);
+
         return v;
     }
 
@@ -327,6 +357,23 @@ public class ExtendedListFragment extends Fragment
     }
 
     /**
+     * Disables FAB.
+     *
+     * Sets the 'visibility' state of the FAB contained in the fragment.
+     *
+     * When 'false' is set, FAB visibility is set to View.GONE programatically,
+     *
+     * @param   enabled     Desired visibility for the FAB.
+     */
+    public void setFabEnabled(boolean enabled) {
+        if(enabled) {
+            fabMain.setVisibility(View.VISIBLE);
+        } else {
+            fabMain.setVisibility(View.GONE);
+        }
+    }
+
+    /**
      * Set message for empty list view
      */
     public void setMessageForEmptyList(String message) {
index 8a268b7..5441aea 100644 (file)
@@ -54,7 +54,6 @@ public class LocalFileListFragment extends ExtendedListFragment {
     /** Adapter to connect the data from the directory with the View object */
     private LocalFileListAdapter mAdapter = null;
 
-    
     /**
      * {@inheritDoc}
      */
@@ -79,6 +78,7 @@ public class LocalFileListFragment extends ExtendedListFragment {
         View v = super.onCreateView(inflater, container, savedInstanceState);
         setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
         setSwipeEnabled(false); // Disable pull-to-refresh
+        setFabEnabled(false); // Disable FAB
         setMessageForEmptyList(getString(R.string.local_file_list_empty));
         Log_OC.i(TAG, "onCreateView() end");
         return v;
@@ -120,9 +120,9 @@ public class LocalFileListFragment extends ExtendedListFragment {
                 ImageView checkBoxV = (ImageView) v.findViewById(R.id.custom_checkbox);
                 if (checkBoxV != null) {
                     if (((ListView)getListView()).isItemChecked(position)) {
-                        checkBoxV.setImageResource(android.R.drawable.checkbox_on_background);
+                        checkBoxV.setImageResource(R.drawable.ic_checkbox_marked);
                     } else {
-                        checkBoxV.setImageResource(android.R.drawable.checkbox_off_background);
+                        checkBoxV.setImageResource(R.drawable.ic_checkbox_blank_outline);
                     }
                 }
                 // notify the change to the container Activity
index bfe6ec2..5a40b29 100644 (file)
@@ -24,7 +24,10 @@ package com.owncloud.android.ui.fragment;
 
 import android.app.Activity;
 import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.Build;
 import android.os.Bundle;
+import android.preference.PreferenceManager;
 import android.support.v4.widget.SwipeRefreshLayout;
 import android.view.ContextMenu;
 import android.view.Menu;
@@ -34,6 +37,8 @@ import android.view.View;
 import android.widget.AdapterView;
 import android.widget.AdapterView.AdapterContextMenuInfo;
 import android.widget.PopupMenu;
+import android.widget.TextView;
+import android.widget.Toast;
 
 import com.owncloud.android.R;
 import com.owncloud.android.authentication.AccountUtils;
@@ -46,11 +51,14 @@ import com.owncloud.android.ui.activity.FileActivity;
 import com.owncloud.android.ui.activity.FileDisplayActivity;
 import com.owncloud.android.ui.activity.FolderPickerActivity;
 import com.owncloud.android.ui.activity.OnEnforceableRefreshListener;
+import com.owncloud.android.ui.activity.UploadFilesActivity;
 import com.owncloud.android.ui.adapter.FileListListAdapter;
 import com.owncloud.android.ui.dialog.ConfirmationDialogFragment;
+import com.owncloud.android.ui.dialog.CreateFolderDialogFragment;
 import com.owncloud.android.ui.dialog.FileActionsDialogFragment;
 import com.owncloud.android.ui.dialog.RemoveFileDialogFragment;
 import com.owncloud.android.ui.dialog.RenameFileDialogFragment;
+import com.owncloud.android.ui.dialog.UploadSourceDialogFragment;
 import com.owncloud.android.ui.preview.PreviewImageFragment;
 import com.owncloud.android.ui.preview.PreviewMediaFragment;
 import com.owncloud.android.utils.DisplayUtils;
@@ -73,8 +81,12 @@ public class OCFileListFragment extends ExtendedListFragment implements FileActi
 
     public final static String ARG_JUST_FOLDERS = MY_PACKAGE + ".JUST_FOLDERS";
     public final static String ARG_ALLOW_CONTEXTUAL_ACTIONS = MY_PACKAGE + ".ALLOW_CONTEXTUAL";
+    public final static String ARG_HIDE_FAB = MY_PACKAGE + ".HIDE_FAB";
 
     private static final String KEY_FILE = MY_PACKAGE + ".extra.FILE";
+    private static final String KEY_FAB_EVER_CLICKED = "FAB_EVER_CLICKED";
+
+    private static String DIALOG_CREATE_FOLDER = "DIALOG_CREATE_FOLDER";
 
     private FileFragment.ContainerActivity mContainerActivity;
 
@@ -83,8 +95,8 @@ public class OCFileListFragment extends ExtendedListFragment implements FileActi
     private boolean mJustFolders;
     
     private OCFile mTargetFile;
-    
-   
+
+    private boolean miniFabClicked = false;
     
     /**
      * {@inheritDoc}
@@ -145,8 +157,164 @@ public class OCFileListFragment extends ExtendedListFragment implements FileActi
         setListAdapter(mAdapter);
 
         registerLongClickListener();
+
+        boolean hideFab = (args != null) && args.getBoolean(ARG_HIDE_FAB, false);
+        if (hideFab) {
+            setFabEnabled(false);
+        } else {
+            setFabEnabled(true);
+            registerFabListeners();
+
+            // detect if a mini FAB has ever been clicked
+            final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
+            if(prefs.getLong(KEY_FAB_EVER_CLICKED, 0) > 0) {
+                miniFabClicked = true;
+            }
+
+            // add labels to the min FABs when none of them has ever been clicked on
+            if(!miniFabClicked) {
+                setFabLabels();
+            } else {
+                removeFabLabels();
+            }
+        }
   }
 
+    /**
+     * adds labels to all mini FABs.
+     */
+    private void setFabLabels() {
+        getFabUpload().setTitle(getResources().getString(R.string.actionbar_upload));
+        getFabMkdir().setTitle(getResources().getString(R.string.actionbar_mkdir));
+        getFabUploadFromApp().setTitle(getResources().getString(R.string.actionbar_upload_from_apps));
+    }
+
+    /**
+     * registers all listeners on all mini FABs.
+     */
+    private void registerFabListeners() {
+        registerFabUploadListeners();
+        registerFabMkDirListeners();
+        registerFabUploadFromAppListeners();
+    }
+
+    /**
+     * registers {@link android.view.View.OnClickListener} and {@link android.view.View.OnLongClickListener}
+     * on the Upload mini FAB for the linked action and {@link Toast} showing the underlying action.
+     */
+    private void registerFabUploadListeners() {
+        getFabUpload().setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                Intent action = new Intent(getActivity(), UploadFilesActivity.class);
+                action.putExtra(
+                        UploadFilesActivity.EXTRA_ACCOUNT,
+                        ((FileActivity) getActivity()).getAccount()
+                );
+                getActivity().startActivityForResult(action, UploadSourceDialogFragment.ACTION_SELECT_MULTIPLE_FILES);
+                getFabMain().collapse();
+                recordMiniFabClick();
+            }
+        });
+
+        getFabUpload().setOnLongClickListener(new View.OnLongClickListener() {
+            @Override
+            public boolean onLongClick(View v) {
+                Toast.makeText(getActivity(), R.string.actionbar_upload, Toast.LENGTH_SHORT).show();
+                return true;
+            }
+        });
+    }
+
+    /**
+     * registers {@link android.view.View.OnClickListener} and {@link android.view.View.OnLongClickListener}
+     * on the 'Create Dir' mini FAB for the linked action and {@link Toast} showing the underlying action.
+     */
+    private void registerFabMkDirListeners() {
+        getFabMkdir().setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                CreateFolderDialogFragment dialog =
+                        CreateFolderDialogFragment.newInstance(mFile);
+                dialog.show(getActivity().getSupportFragmentManager(), FileDisplayActivity.DIALOG_CREATE_FOLDER);
+                getFabMain().collapse();
+                recordMiniFabClick();
+            }
+        });
+
+        getFabMkdir().setOnLongClickListener(new View.OnLongClickListener() {
+            @Override
+            public boolean onLongClick(View v) {
+                Toast.makeText(getActivity(), R.string.actionbar_mkdir, Toast.LENGTH_SHORT).show();
+                return true;
+            }
+        });
+    }
+
+    /**
+     * registers {@link android.view.View.OnClickListener} and {@link android.view.View.OnLongClickListener}
+     * on the Upload from App mini FAB for the linked action and {@link Toast} showing the underlying action.
+     */
+    private void registerFabUploadFromAppListeners() {
+        getFabUploadFromApp().setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                Intent action = new Intent(Intent.ACTION_GET_CONTENT);
+                action = action.setType("*/*").addCategory(Intent.CATEGORY_OPENABLE);
+
+                //Intent.EXTRA_ALLOW_MULTIPLE is only supported on api level 18+, Jelly Bean
+                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
+                    action.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
+                }
+
+                getActivity().startActivityForResult(
+                        Intent.createChooser(action, getString(R.string.upload_chooser_title)),
+                        UploadSourceDialogFragment.ACTION_SELECT_CONTENT_FROM_APPS
+                );
+                getFabMain().collapse();
+                recordMiniFabClick();
+            }
+        });
+
+        getFabUploadFromApp().setOnLongClickListener(new View.OnLongClickListener() {
+            @Override
+            public boolean onLongClick(View v) {
+                Toast.makeText(getActivity(),
+                        R.string.actionbar_upload_from_apps,
+                        Toast.LENGTH_SHORT).show();
+                return true;
+            }
+        });
+    }
+
+    /**
+     * records a click on a mini FAB and thus:
+     * <ol>
+     *     <li>persists the click fact</li>
+     *     <li>removes the mini FAB labels</li>
+     * </ol>
+     */
+    private void recordMiniFabClick() {
+        // only record if it hasn't been done already at some other time
+        if(!miniFabClicked) {
+            final SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getActivity());
+            sp.edit().putLong(KEY_FAB_EVER_CLICKED, 1).commit();
+            miniFabClicked = true;
+        }
+    }
+
+    /**
+     * removes the labels on all known min FABs.
+     */
+    private void removeFabLabels() {
+        getFabUpload().setTitle(null);
+        getFabMkdir().setTitle(null);
+        getFabUploadFromApp().setTitle(null);
+        ((TextView) getFabUpload().getTag(com.getbase.floatingactionbutton.R.id.fab_label)).setVisibility(View.GONE);
+        ((TextView) getFabMkdir().getTag(com.getbase.floatingactionbutton.R.id.fab_label)).setVisibility(View.GONE);
+        ((TextView) getFabUploadFromApp().getTag(com.getbase.floatingactionbutton.R.id.fab_label)).setVisibility(View.GONE);
+    }
+
     private void registerLongClickListener() {
         getListView().setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
             public boolean onItemLongClick(AdapterView<?> arg0, View v,
@@ -157,7 +325,6 @@ public class OCFileListFragment extends ExtendedListFragment implements FileActi
         });
     }
 
-
     private void showFileAction(int fileIndex) {
         Bundle args = getArguments();
         PopupMenu pm = new PopupMenu(getActivity(),null);
@@ -211,11 +378,11 @@ public class OCFileListFragment extends ExtendedListFragment implements FileActi
 
     /**
      * Call this, when the user presses the up button.
-     *
-     * Tries to move up the current folder one level. If the parent folder was removed from the
-     * database, it continues browsing up until finding an existing folders.
-     * <p/>
-     * return       Count of folder levels browsed up.
+     * <p>
+     *     Tries to move up the current folder one level. If the parent folder was removed from the
+     *     database, it continues browsing up until finding an existing folders.
+     * </p>
+     * @return Count of folder levels browsed up.
      */
     public int onBrowseUp() {
         OCFile parentDir = null;
index 374a713..f63d7ec 100644 (file)
@@ -50,6 +50,7 @@ import com.owncloud.android.R;
 import com.owncloud.android.datamodel.FileDataStorageManager;\r
 import com.owncloud.android.datamodel.OCFile;\r
 \r
+import java.math.BigDecimal;\r
 import java.net.IDN;\r
 import java.text.DateFormat;\r
 import java.util.Calendar;\r
@@ -65,6 +66,7 @@ public class DisplayUtils {
     private static final String OWNCLOUD_APP_NAME = "ownCloud";\r
     \r
     private static final String[] sizeSuffixes = { "B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };\r
+    private static final int[] sizeScales = { 0, 0, 0, 1, 1, 2, 2, 2, 2 };\r
 \r
     private static Map<String, String> mimeType2HumanReadable;\r
 \r
@@ -85,19 +87,24 @@ public class DisplayUtils {
 \r
     /**\r
      * Converts the file size in bytes to human readable output.\r
-     * \r
+     * <ul>\r
+     *     <li>appends a size suffix, e.g. B, KB, MB etc.</li>\r
+     *     <li>rounds the size based on the suffix to 0,1 or 2 decimals</li>\r
+     * </ul>\r
+     *\r
      * @param bytes Input file size\r
      * @return Like something readable like "12 MB"\r
      */\r
     public static String bytesToHumanReadable(long bytes) {\r
         double result = bytes;\r
-        int attachedsuff = 0;\r
-        while (result > 1024 && attachedsuff < sizeSuffixes.length) {\r
+        int attachedSuff = 0;\r
+        while (result > 1024 && attachedSuff < sizeSuffixes.length) {\r
             result /= 1024.;\r
-            attachedsuff++;\r
+            attachedSuff++;\r
         }\r
-        result = ((int) (result * 100)) / 100.;\r
-        return result + " " + sizeSuffixes[attachedsuff];\r
+\r
+        return new BigDecimal(result).setScale(\r
+                sizeScales[attachedSuff], BigDecimal.ROUND_HALF_UP) + " " + sizeSuffixes[attachedSuff];\r
     }\r
 \r
     /**\r
@@ -220,8 +227,17 @@ public class DisplayUtils {
                 dateString = DateUtils.getRelativeDateTimeString(c, time, minResolution, transitionResolution, flags);\r
             }\r
         }\r
-        \r
-        return dateString.toString().split(",")[0];\r
+\r
+        String[] parts = dateString.toString().split(",");\r
+        if (parts.length == 2) {\r
+            if (parts[1].contains(":") && !parts[0].contains(":")) {\r
+                return parts[0];\r
+            } else if (parts[0].contains(":") && !parts[1].contains(":")) {\r
+                return parts[1];\r
+            }\r
+        }\r
+        //dateString contains unexpected format. use localized, absolute date.\r
+        return DisplayUtils.unixTimeToHumanReadable(time);\r
     }\r
 \r
     /**\r