Skip to content

Commit 8cf7acf

Browse files
committed
refactor: remove redundant layouts from section headers
1 parent 695cbda commit 8cf7acf

1 file changed

Lines changed: 36 additions & 61 deletions

File tree

owncloudApp/src/main/res/layout/add_public_link_fragment.xml

Lines changed: 36 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -37,27 +37,19 @@
3737
android:orientation="vertical"
3838
android:paddingBottom="@dimen/standard_padding">
3939

40-
<androidx.constraintlayout.widget.ConstraintLayout
40+
<TextView
41+
android:id="@+id/public_link_name_title"
4142
android:layout_width="match_parent"
42-
android:layout_height="wrap_content"
43-
android:focusable="true"
44-
android:background="@color/actionbar_start_color">
45-
46-
<TextView
47-
android:id="@+id/public_link_name_title"
48-
android:layout_width="wrap_content"
49-
android:layout_height="50dp"
50-
android:layout_marginStart="@dimen/standard_half_margin"
51-
android:gravity="center_vertical"
52-
android:text="@string/global_name"
53-
android:textAllCaps="true"
54-
android:textColor="@color/white"
55-
android:textStyle="bold"
56-
android:accessibilityHeading="true"
57-
app:layout_constraintStart_toStartOf="parent"
58-
app:layout_constraintTop_toTopOf="parent"/>
59-
60-
</androidx.constraintlayout.widget.ConstraintLayout>
43+
android:layout_height="50dp"
44+
android:gravity="center_vertical"
45+
android:paddingStart="@dimen/standard_half_padding"
46+
android:paddingEnd="@dimen/standard_half_padding"
47+
android:background="@color/actionbar_start_color"
48+
android:text="@string/global_name"
49+
android:textAllCaps="true"
50+
android:textColor="@color/white"
51+
android:textStyle="bold"
52+
android:accessibilityHeading="true"/>
6153

6254
<EditText
6355
android:id="@+id/public_link_name_edit_text"
@@ -69,27 +61,19 @@
6961
android:maxLines="1"
7062
android:maxLength="255"/>
7163

72-
<androidx.constraintlayout.widget.ConstraintLayout
64+
<TextView
65+
android:id="@+id/permissions_title"
7366
android:layout_width="match_parent"
74-
android:layout_height="wrap_content"
75-
android:focusable="true"
76-
android:background="@color/actionbar_start_color">
77-
78-
<TextView
79-
android:id="@+id/permissions_title"
80-
android:layout_width="wrap_content"
81-
android:layout_height="50dp"
82-
android:layout_marginStart="@dimen/standard_half_margin"
83-
android:gravity="center_vertical"
84-
android:text="@string/members_permissions"
85-
android:textAllCaps="true"
86-
android:textColor="@color/white"
87-
android:textStyle="bold"
88-
android:accessibilityHeading="true"
89-
app:layout_constraintStart_toStartOf="parent"
90-
app:layout_constraintTop_toTopOf="parent"/>
91-
92-
</androidx.constraintlayout.widget.ConstraintLayout>
67+
android:layout_height="50dp"
68+
android:gravity="center_vertical"
69+
android:paddingStart="@dimen/standard_half_padding"
70+
android:paddingEnd="@dimen/standard_half_padding"
71+
android:background="@color/actionbar_start_color"
72+
android:text="@string/members_permissions"
73+
android:textAllCaps="true"
74+
android:textColor="@color/white"
75+
android:textStyle="bold"
76+
android:accessibilityHeading="true"/>
9377

9478
<include
9579
android:id="@+id/public_link_permissions"
@@ -103,28 +87,19 @@
10387
android:visibility="gone"
10488
tools:visibility="visible">
10589

106-
<androidx.constraintlayout.widget.ConstraintLayout
90+
<TextView
91+
android:id="@+id/options_title"
10792
android:layout_width="match_parent"
108-
android:layout_height="wrap_content"
109-
android:focusable="true"
110-
android:background="@color/actionbar_start_color">
111-
112-
<TextView
113-
android:id="@+id/options_title"
114-
android:layout_width="wrap_content"
115-
android:layout_height="50dp"
116-
android:layout_centerVertical="true"
117-
android:layout_marginStart="@dimen/standard_half_margin"
118-
android:gravity="center"
119-
android:text="@string/members_options"
120-
android:textAllCaps="true"
121-
android:textColor="@color/white"
122-
android:textStyle="bold"
123-
android:accessibilityHeading="true"
124-
app:layout_constraintStart_toStartOf="parent"
125-
app:layout_constraintTop_toTopOf="parent"/>
126-
127-
</androidx.constraintlayout.widget.ConstraintLayout>
93+
android:layout_height="50dp"
94+
android:gravity="center_vertical"
95+
android:paddingStart="@dimen/standard_half_padding"
96+
android:paddingEnd="@dimen/standard_half_padding"
97+
android:background="@color/actionbar_start_color"
98+
android:text="@string/members_options"
99+
android:textAllCaps="true"
100+
android:textColor="@color/white"
101+
android:textStyle="bold"
102+
android:accessibilityHeading="true"/>
128103

129104
<include
130105
android:id="@+id/password_layout"

0 commit comments

Comments
 (0)