|
7 | 7 | ~ SPDX-FileCopyrightText: 2015 María Asensio Valverde <masensio@solidgear.es> |
8 | 8 | ~ SPDX-License-Identifier: GPL-2.0-only AND (AGPL-3.0-or-later OR GPL-2.0-only) |
9 | 9 | --> |
10 | | -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 10 | +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 11 | + xmlns:app="http://schemas.android.com/apk/res-auto" |
11 | 12 | xmlns:tools="http://schemas.android.com/tools" |
12 | 13 | android:layout_width="match_parent" |
13 | 14 | android:layout_height="match_parent" |
14 | | - android:orientation="vertical" |
15 | | - android:paddingBottom="@dimen/standard_padding" |
| 15 | + android:padding="@dimen/standard_padding" |
16 | 16 | tools:context="com.owncloud.android.ui.activity.ShareActivity"> |
17 | 17 |
|
18 | | - <RelativeLayout |
19 | | - android:id="@+id/shareHeaderContainer" |
| 18 | + <LinearLayout |
| 19 | + android:id="@+id/actionbar" |
20 | 20 | android:layout_width="match_parent" |
21 | 21 | android:layout_height="wrap_content" |
22 | | - android:padding="@dimen/standard_padding"> |
23 | | - |
24 | | - <ImageButton |
25 | | - android:id="@+id/shareBackButton" |
26 | | - android:layout_width="wrap_content" |
27 | | - android:layout_height="wrap_content" |
28 | | - android:layout_alignParentStart="true" |
29 | | - android:layout_centerVertical="true" |
30 | | - android:background="?attr/selectableItemBackgroundBorderless" |
31 | | - android:contentDescription="@string/common_back" |
32 | | - android:src="@drawable/ic_arrow_back" /> |
| 22 | + android:orientation="horizontal" |
| 23 | + android:gravity="center_vertical" |
| 24 | + android:paddingHorizontal="@dimen/standard_padding" |
| 25 | + android:paddingVertical="@dimen/standard_half_padding" |
| 26 | + app:layout_constraintStart_toStartOf="parent" |
| 27 | + app:layout_constraintEnd_toEndOf="parent" |
| 28 | + app:layout_constraintTop_toTopOf="parent"> |
33 | 29 |
|
34 | 30 | <ImageView |
35 | 31 | android:id="@+id/shareFileIcon" |
36 | 32 | android:layout_width="@dimen/file_icon_size" |
37 | 33 | android:layout_height="@dimen/file_icon_size" |
38 | | - android:layout_centerVertical="true" |
39 | | - android:layout_marginStart="@dimen/standard_half_margin" |
40 | | - android:layout_marginEnd="@dimen/standard_half_margin" |
41 | | - android:layout_toEndOf="@+id/shareBackButton" |
42 | 34 | android:contentDescription="@null" |
| 35 | + android:scaleType="centerCrop" |
43 | 36 | android:src="@drawable/file" /> |
44 | 37 |
|
45 | | - <TextView |
46 | | - android:id="@+id/shareFileName" |
47 | | - android:layout_width="wrap_content" |
| 38 | + <LinearLayout |
| 39 | + android:layout_width="0dp" |
48 | 40 | android:layout_height="wrap_content" |
49 | | - android:layout_marginStart="@dimen/standard_quarter_margin" |
50 | | - android:layout_marginEnd="@dimen/standard_half_margin" |
51 | | - android:layout_toEndOf="@+id/shareFileIcon" |
52 | | - android:ellipsize="middle" |
53 | | - android:singleLine="true" |
54 | | - android:text="@string/placeholder_filename" |
55 | | - android:textColor="@color/text_color" |
56 | | - android:textSize="@dimen/two_line_primary_text_size" /> |
| 41 | + android:layout_weight="1" |
| 42 | + android:layout_marginHorizontal="@dimen/standard_half_margin" |
| 43 | + android:orientation="vertical"> |
57 | 44 |
|
58 | | - <TextView |
59 | | - android:id="@+id/shareFileSize" |
60 | | - android:layout_width="wrap_content" |
61 | | - android:layout_height="wrap_content" |
62 | | - android:layout_below="@+id/shareFileName" |
63 | | - android:layout_gravity="center_vertical" |
64 | | - android:layout_marginStart="@dimen/standard_quarter_margin" |
65 | | - android:layout_toEndOf="@+id/shareFileIcon" |
66 | | - android:text="@string/placeholder_fileSize" |
67 | | - android:textSize="@dimen/share_file_layout_text_size" /> |
| 45 | + <TextView |
| 46 | + android:id="@+id/shareFileName" |
| 47 | + android:layout_width="match_parent" |
| 48 | + android:layout_height="wrap_content" |
| 49 | + android:ellipsize="middle" |
| 50 | + android:singleLine="true" |
| 51 | + android:text="@string/placeholder_filename" |
| 52 | + android:textColor="@color/text_color" |
| 53 | + android:textSize="@dimen/two_line_primary_text_size" /> |
| 54 | + |
| 55 | + <TextView |
| 56 | + android:id="@+id/shareFileSize" |
| 57 | + android:layout_width="match_parent" |
| 58 | + android:layout_height="wrap_content" |
| 59 | + android:text="@string/placeholder_fileSize" |
| 60 | + android:textSize="@dimen/share_file_layout_text_size" /> |
| 61 | + </LinearLayout> |
68 | 62 |
|
69 | | - </RelativeLayout> |
| 63 | + <ImageButton |
| 64 | + android:id="@+id/shareCloseButton" |
| 65 | + android:layout_width="@dimen/notification_icon_width" |
| 66 | + android:layout_height="@dimen/notification_icon_width" |
| 67 | + android:background="?attr/selectableItemBackgroundBorderless" |
| 68 | + android:contentDescription="@string/common_back" |
| 69 | + android:src="@drawable/ic_close" /> |
| 70 | + </LinearLayout> |
| 71 | + |
| 72 | + <androidx.constraintlayout.widget.Barrier |
| 73 | + android:id="@+id/shareHeaderBarrier" |
| 74 | + android:layout_width="wrap_content" |
| 75 | + android:layout_height="wrap_content" |
| 76 | + app:barrierDirection="bottom" |
| 77 | + app:constraint_referenced_ids="actionbar" /> |
70 | 78 |
|
71 | 79 | <View |
72 | 80 | android:id="@+id/share_header_divider" |
73 | | - android:layout_width="match_parent" |
| 81 | + android:layout_width="0dp" |
74 | 82 | android:layout_height="@dimen/standard_eighth_margin" |
75 | | - android:background="@color/primary" /> |
| 83 | + android:background="@color/primary" |
| 84 | + app:layout_constraintEnd_toEndOf="parent" |
| 85 | + app:layout_constraintStart_toStartOf="parent" |
| 86 | + app:layout_constraintTop_toBottomOf="@id/shareHeaderBarrier" /> |
76 | 87 |
|
77 | 88 | <FrameLayout |
78 | 89 | android:id="@+id/share_fragment_container" |
79 | | - android:layout_width="match_parent" |
80 | | - android:layout_height="match_parent" /> |
| 90 | + android:layout_width="0dp" |
| 91 | + android:layout_height="0dp" |
| 92 | + tools:visibility="gone" |
| 93 | + app:layout_constraintBottom_toBottomOf="parent" |
| 94 | + app:layout_constraintEnd_toEndOf="parent" |
| 95 | + app:layout_constraintStart_toStartOf="parent" |
| 96 | + app:layout_constraintTop_toBottomOf="@id/share_header_divider" /> |
81 | 97 |
|
82 | | -</LinearLayout> |
| 98 | +</androidx.constraintlayout.widget.ConstraintLayout> |
0 commit comments