Merge branch 'master' into reliable_uploads_actions_uploads_view

This commit is contained in:
masensio 2015-12-29 12:46:45 +01:00
commit 540d123ad5
48 changed files with 247 additions and 425 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 543 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 828 B

View file

@ -65,6 +65,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:theme="@style/Button"
android:text="@string/auth_check_server"
android:visibility="gone"
android:contentDescription="@string/auth_check_server"/>

View file

@ -1,59 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
ownCloud Android client application
Copyright (C) 2015 ownCloud Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2,
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/list_item"
android:layout_width="match_parent"
android:layout_height="48dp"
android:paddingStart="16dip"
android:paddingEnd="16dip"
android:paddingRight="16dip"
android:paddingLeft="16dip"
android:minWidth="196dip"
android:background="?android:attr/activatedBackgroundIndicator"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:duplicateParentState="true" >
<ImageView
android:id="@+id/icon"
android:layout_width="40dip"
android:layout_height="40dip"
android:layout_gravity="center_vertical"
android:layout_marginEnd="8dip"
android:layout_marginRight="8dip"
android:duplicateParentState="true" />
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceLargePopupMenu"
android:duplicateParentState="true"
android:singleLine="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal" />
</LinearLayout>
</LinearLayout>

View file

@ -1,69 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
ownCloud Android client application
Copyright (C) 2015 ownCloud Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2,
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ImageView android:id="@+id/icon"
android:layout_width="@android:dimen/notification_large_icon_width"
android:layout_height="@android:dimen/notification_large_icon_height"
android:scaleType="center"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:minHeight="64dp"
android:orientation="vertical"
android:paddingRight="12dp"
android:paddingLeft="12dp"
>
<TextView android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
style="@style/Theme.ownCloud.NotificationText.Title"
/>
<TextView android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-2dp"
android:layout_marginBottom="-2dp"
android:singleLine="true"
android:fadingEdge="horizontal"
android:ellipsize="marquee"
style="@style/Theme.ownCloud.NotificationText.Content"
/>
<FrameLayout android:id="@+id/progressHolder"
android:layout_width="match_parent"
android:layout_height="12dp"
>
<!-- the FrameLayout is needed to change visibility of the
progress bar in Android 2.2, even though
https://code.google.com/p/android/issues/detail?id=11040 -->
<ProgressBar
android:id="@+id/progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
style="?android:attr/progressBarStyleHorizontal"
/>
</FrameLayout>
</LinearLayout>
</LinearLayout>

View file

@ -1,68 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
ownCloud Android client application
Copyright (C) 2015 ownCloud Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2,
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background_color"
android:id="@+id/explanation"
android:orientation="vertical">
<TextView
android:id="@+id/message"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:padding="10dip"
android:scrollbarAlwaysDrawVerticalTrack="true"
android:text="@string/placeholder_sentence"
/>
<ListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
android:padding="10dip"
/>
<LinearLayout
android:id="@+id/buttons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal" >
<!-- 'OK' / 'CANCEL' BUTTONS CHANGE THEIR ORDER FROM ANDROID 4.0 ; THANKS, GOOGLE -->
<Button
android:id="@+id/cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/common_cancel" />
<Button
android:id="@+id/ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/common_ok" />
</LinearLayout>
</LinearLayout>

View file

@ -51,6 +51,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:theme="@style/Button"
android:text="@string/auth_check_server"
android:visibility="gone"
android:contentDescription="@string/auth_check_server"/>
@ -96,7 +97,6 @@
android:padding="0dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_action_refresh_grey"
android:onClick="onRefreshClick"
android:visibility="gone"
android:background="@android:color/transparent"
android:contentDescription="@string/auth_refresh_button"

View file

@ -21,9 +21,12 @@
android:id="@+id/list_item"
android:layout_width="match_parent"
android:layout_height="48dp"
android:paddingStart="16dip"
android:paddingEnd="16dip"
android:paddingRight="16dip"
android:paddingLeft="16dip"
android:minWidth="196dip"
android:background="?android:attr/activatedBackgroundIndicator"
android:orientation="vertical" >
<LinearLayout
@ -36,6 +39,7 @@
android:layout_width="40dip"
android:layout_height="40dip"
android:layout_gravity="center_vertical"
android:layout_marginEnd="8dip"
android:layout_marginRight="8dip"
android:duplicateParentState="true" />
@ -44,7 +48,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textAppearance="?android:attr/textAppearanceLargePopupMenu"
android:duplicateParentState="true"
android:singleLine="true"
android:ellipsize="marquee"

View file

@ -62,22 +62,22 @@
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="@color/background_color"
android:divider="#eee"
android:divider="@color/list_divider_background"
android:dividerHeight="1dp"
android:paddingTop="100dp" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="100dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:background="@color/owncloud_blue_accent">
android:paddingTop="@dimen/standard_padding"
android:paddingBottom="@dimen/standard_padding"
android:background="@color/drawer_header_color">
<ImageView
android:id="@+id/itemIcon"
android:layout_width="24sp"
android:layout_height="24sp"
android:layout_marginLeft="16sp"
android:layout_width="24dp"
android:layout_height="24dp"
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"

View file

@ -24,15 +24,15 @@
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"

View 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" />

View 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" />
@ -110,14 +110,13 @@
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" />
@ -159,15 +158,16 @@
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"

View 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" />

View 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"

View file

@ -48,22 +48,22 @@
android:gravity="center"
android:orientation="horizontal" >
<android.support.v7.widget.AppCompatButton
android:id="@+id/ok"
style="@style/ownCloud.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/common_ok" />
<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"
android:text="@string/common_cancel" />
<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"
android:text="@string/common_ok" />
</LinearLayout>
</LinearLayout>

View file

@ -10,7 +10,8 @@
<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"

View file

@ -35,6 +35,8 @@
android:id="@+id/list_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@color/list_divider_background"
android:dividerHeight="1px"
android:visibility="visible" />
</android.support.v4.widget.SwipeRefreshLayout>

View file

@ -22,7 +22,7 @@
android:layout_width="match_parent"
android:background="@drawable/list_selector"
android:orientation="vertical"
android:layout_height="56dp">
android:layout_height="72dp">
<LinearLayout
android:layout_width="match_parent"
@ -30,8 +30,12 @@
android:orientation="horizontal">
<FrameLayout
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_width="60dp"
android:layout_height="72dp"
android:paddingLeft="12dp"
android:paddingBottom="@dimen/standard_padding"
android:paddingTop="@dimen/standard_padding"
android:paddingRight="4dp"
android:focusable="false"
android:focusableInTouchMode="false">
@ -39,16 +43,15 @@
android:id="@+id/localFileIndicator"
android:layout_width="@dimen/file_icon_size"
android:layout_height="@dimen/file_icon_size"
android:layout_gravity="center_vertical"
android:layout_marginLeft="22dp"
android:layout_gravity="top|right"
android:layout_marginRight="4dp"
android:src="@drawable/local_file_indicator" />
<ImageView
android:id="@+id/thumbnail"
android:layout_width="@dimen/file_icon_size"
android:layout_height="@dimen/file_icon_size"
android:layout_gravity="center_vertical"
android:layout_marginLeft="12dp"
android:layout_gravity="left|center_vertical"
android:src="@drawable/ic_menu_archive" />
<ImageView
@ -56,8 +59,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:layout_marginBottom="10dp"
android:layout_marginRight="2dp"
android:layout_marginRight="4dp"
android:src="@drawable/ic_favorite" />
</FrameLayout>
@ -65,7 +67,8 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:gravity="top"
android:paddingTop="@dimen/standard_padding"
android:orientation="vertical" >
<TextView
@ -73,39 +76,46 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="4dp"
android:layout_marginLeft="0dp"
android:layout_marginRight="4dp"
android:ellipsize="middle"
android:singleLine="true"
android:text="TextView"
android:textColor="@color/textColor"
android:textSize="16dip" />
android:textSize="@dimen/two_line_primary_text_size" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginLeft="0dp"
android:layout_marginRight="4dp"
android:weightSum="1">
<TextView
android:id="@+id/last_mod"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:layout_weight=".5"
android:textColor="@color/list_item_lastmod_and_filesize_text"
android:textSize="12dip"/>
android:orientation="horizontal">
<TextView
android:id="@+id/file_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text="TextView"
android:text="Size MB"
android:textColor="@color/list_item_lastmod_and_filesize_text"
android:layout_weight=".5"
android:textSize="12dip"/>
android:textSize="@dimen/two_line_secondary_text_size"/>
<TextView
android:id="@+id/file_separator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text=", "
android:textColor="@color/list_item_lastmod_and_filesize_text"
android:textSize="@dimen/two_line_secondary_text_size"/>
<TextView
android:id="@+id/last_mod"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text="Mod Date"
android:textColor="@color/list_item_lastmod_and_filesize_text"
android:textSize="@dimen/two_line_secondary_text_size"/>
</LinearLayout>
@ -128,9 +138,9 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_marginRight="@dimen/standard_margin"
android:gravity=""
android:src="@android:drawable/checkbox_off_background" />
android:src="@drawable/ic_checkbox_blank_outline" />
</LinearLayout>
<View

View 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>

View 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"

View file

@ -20,24 +20,24 @@
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>

View 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>

View file

@ -20,28 +20,28 @@
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_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>
@ -49,11 +49,14 @@
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
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"

View file

@ -18,45 +18,42 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="5dp"
android:paddingLeft="5dp"
>
<ImageView android:id="@+id/icon"
android:layout_width="@android:dimen/notification_large_icon_width"
android:layout_height="@android:dimen/notification_large_icon_height"
android:scaleType="center"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="3dp"
android:layout_gravity="center"
android:minHeight="64dp"
android:orientation="vertical"
android:paddingRight="12dp"
android:paddingLeft="12dp"
>
<ImageView android:id="@+id/icon"
android:layout_width="25dp"
android:layout_height="25dp"
android:scaleType="centerInside"
/>
<TextView android:id="@+id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:singleLine="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:paddingLeft="4dp"
style="@style/Theme.ownCloud.NotificationText.Title"
/>
</LinearLayout>
<TextView android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
style="@style/Theme.ownCloud.NotificationText.Title"
/>
<TextView android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-2dp"
android:layout_marginBottom="-2dp"
android:singleLine="true"
android:fadingEdge="horizontal"
android:ellipsize="marquee"
style="@style/Theme.ownCloud.NotificationText.Content"
/>
<FrameLayout android:id="@+id/progressHolder"
android:layout_width="match_parent"
android:layout_height="10dp"
android:paddingTop="2dp"
android:paddingBottom="2dp"
android:layout_height="12dp"
>
<!-- the FrameLayout is needed to change visibility of the
progress bar in Android 2.2, even though
@ -69,3 +66,4 @@
/>
</FrameLayout>
</LinearLayout>
</LinearLayout>

View file

@ -18,12 +18,11 @@
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" />

View file

@ -115,6 +115,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:theme="@style/Button.Primary"
android:text="@string/share_add_user_or_group"
android:contentDescription="shareAddUserButton"/>
@ -233,6 +234,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:theme="@style/Button.Primary"
android:text="@string/share_get_public_link_button"
android:contentDescription="shareGetLinkButton"/>

View 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"
@ -431,7 +431,7 @@
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"
>

View file

@ -22,14 +22,14 @@
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"
/>
@ -399,7 +399,7 @@
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"
>

View file

@ -86,7 +86,7 @@
<android.support.v7.widget.AppCompatButton
android:id="@+id/upload_files_btn_cancel"
style="@style/ownCloud.Button"
android:theme="@style/Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
@ -94,7 +94,7 @@
<android.support.v7.widget.AppCompatButton
android:id="@+id/upload_files_btn_upload"
style="@style/ownCloud.Button"
android:theme="@style/Button.Primary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"

View file

@ -39,7 +39,7 @@
<ListView android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:divider="@drawable/uploader_list_separator"
android:divider="@color/list_divider_background"
android:dividerHeight="1dip">
</ListView>
@ -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"

View file

@ -22,15 +22,16 @@
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"

View file

@ -1,11 +1,6 @@
<?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"
parent="@android:style/TextAppearance.StatusBar.EventContent.Title" >

View file

@ -28,12 +28,11 @@
<color name="white">#FFFFFF</color>
<color name="textColor">#303030</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>
<color name="login_text_hint_color">#757575</color>
<color name="primary_button_color">@color/owncloud_blue_accent</color>
<color name="secondary_button_color">#D6D7D7</color>
<color name="transparent">#00000000</color>

View file

@ -30,9 +30,14 @@
<!-- Colors -->
<color name="login_background_color">#FFFFFF</color>
<color name="login_logo_background_color">#FFFFFF</color>
<color name="background_color">#F7F7F7</color>
<color name="background_color">#FFFFFF</color>
<color name="actionbar_start_color">#1D2D44</color>
<color name="actionbar_end_color">#1D2D44</color>
<color name="primary_button_background_color">@color/owncloud_blue_accent</color>
<color name="primary_button_text_color">@color/white</color>
<color name="secondary_button_background_color">#D6D7D7</color>
<color name="secondary_button_text_color">@color/color_accent</color>
<color name="drawer_header_color">@color/owncloud_blue_accent</color>
<!-- Button -->
<color name="button_text_color">#000000</color>

View file

@ -24,20 +24,15 @@
<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">
@ -74,13 +66,13 @@
</style>
<style name="Button" parent="Base.Widget.AppCompat.Button">
<item name="colorButtonNormal">@color/secondary_button_color</item>
<item name="android:textColor">@color/color_accent</item>
<item name="colorButtonNormal">@color/secondary_button_background_color</item>
<item name="android:textColor">@color/secondary_button_text_color</item>
</style>
<style name="Button.Primary" parent="Button">
<item name="colorButtonNormal">@color/primary_button_color</item>
<item name="android:textColor">@color/white</item>
<item name="colorButtonNormal">@color/primary_button_background_color</item>
<item name="android:textColor">@color/primary_button_text_color</item>
</style>
<style name="Button.Borderless" parent="Base.Widget.AppCompat.Button.Borderless">

View 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">

View file

@ -176,7 +176,6 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
private EditText mUsernameInput;
private EditText mPasswordInput;
private View mOkButton;
private View mCenteredRefreshButton;
private TextView mAuthStatusView;
private int mAuthStatusText = 0, mAuthStatusIcon = 0;
@ -261,8 +260,15 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
}
});
mCenteredRefreshButton = findViewById(R.id.centeredRefreshButton);
mCenteredRefreshButton.setOnClickListener(new View.OnClickListener() {
findViewById(R.id.centeredRefreshButton).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
checkOcServer();
}
});
findViewById(R.id.embeddedRefreshButton).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -270,7 +276,6 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
}
});
mOkButton = findViewById(R.id.buttonOK);
/// initialize block to be moved to single Fragment to check server and get info about it
initServerPreFragment(savedInstanceState);
@ -1637,18 +1642,6 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
}
}
/**
* Called when the refresh button in the input field for ownCloud host is clicked.
*
* Performs a new check on the URL in the input field.
*
* @param view Refresh 'button'
*/
public void onRefreshClick(View view) {
checkOcServer();
}
/**
* Called when the eye icon in the password field is clicked.
*

View file

@ -373,12 +373,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);
@ -449,6 +444,21 @@ public class FileActivity extends AppCompatActivity
mDrawerToggle.setDrawerIndicatorEnabled(false);
}
/**
* 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 && account != 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).
*

View file

@ -277,12 +277,7 @@ public class FileDisplayActivity extends HookActivity implements
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) {

View file

@ -534,5 +534,4 @@ public class PassCodeActivity extends AppCompatActivity {
}
}

View file

@ -195,6 +195,7 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
switch (viewType){
case LIST_ITEM:
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);
@ -203,6 +204,7 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
checkBoxV.setVisibility(View.GONE);
fileSizeSeparatorV.setVisibility(View.VISIBLE);
fileSizeV.setVisibility(View.VISIBLE);
fileSizeV.setText(DisplayUtils.bytesToHumanReadable(file.getFileLength()));
@ -214,17 +216,18 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
} else {
if (parentList.isItemChecked(position)) {
checkBoxV.setImageResource(
android.R.drawable.checkbox_on_background);
R.drawable.ic_checkbox_marked);
} else {
checkBoxV.setImageResource(
android.R.drawable.checkbox_off_background);
R.drawable.ic_checkbox_blank_outline);
}
checkBoxV.setVisibility(View.VISIBLE);
}
}
} else { //Folder
fileSizeV.setVisibility(View.INVISIBLE);
fileSizeSeparatorV.setVisibility(View.GONE);
fileSizeV.setVisibility(View.GONE);
}
case GRID_ITEM:

View 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);

View file

@ -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

View file

@ -37,6 +37,7 @@ import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
import java.math.BigDecimal;
import java.net.IDN;
import java.text.DateFormat;
import java.util.Calendar;
@ -52,6 +53,7 @@ public class DisplayUtils {
private static final String OWNCLOUD_APP_NAME = "ownCloud";
private static final String[] sizeSuffixes = { "B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };
private static final int[] sizeScales = { 0, 0, 1, 1, 1, 2, 2, 2, 2 };
private static Map<String, String> mimeType2HumanReadable;
@ -72,19 +74,24 @@ public class DisplayUtils {
/**
* Converts the file size in bytes to human readable output.
* <ul>
* <li>appends a size suffix, e.g. B, KB, MB etc.</li>
* <li>rounds the size based on the suffix to 0,1 or 2 decimals</li>
* </ul>
*
* @param bytes Input file size
* @return Like something readable like "12 MB"
*/
public static String bytesToHumanReadable(long bytes) {
double result = bytes;
int attachedsuff = 0;
while (result > 1024 && attachedsuff < sizeSuffixes.length) {
int attachedSuff = 0;
while (result > 1024 && attachedSuff < sizeSuffixes.length) {
result /= 1024.;
attachedsuff++;
attachedSuff++;
}
result = ((int) (result * 100)) / 100.;
return result + " " + sizeSuffixes[attachedsuff];
return new BigDecimal(result).setScale(
sizeScales[attachedSuff], BigDecimal.ROUND_HALF_UP) + " " + sizeSuffixes[attachedSuff];
}
/**