Skip to content

Commit 88b8bda

Browse files
committed
Buttons created
1 parent cabddc9 commit 88b8bda

3 files changed

Lines changed: 62 additions & 1 deletion

File tree

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

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,55 @@
154154
app:layout_constraintEnd_toEndOf="parent"
155155
app:layout_constraintTop_toBottomOf="@id/fdProgressText" />
156156

157+
<View
158+
android:id="@+id/view_file_detail_separator"
159+
android:layout_width="0dp"
160+
android:layout_height="1dp"
161+
android:layout_marginTop="@dimen/standard_padding"
162+
android:alpha="0.8"
163+
android:background="@color/owncloud_blue"
164+
app:layout_constraintLeft_toLeftOf="parent"
165+
app:layout_constraintRight_toRightOf="parent"
166+
app:layout_constraintTop_toBottomOf="@id/fdProgressBar" />
167+
168+
<Button
169+
android:id="@+id/button_file_detail_download"
170+
style="@style/Button.FileDetail"
171+
android:layout_width="0dp"
172+
android:layout_height="wrap_content"
173+
android:drawableStart="@drawable/ic_cloud_download"
174+
android:text="@string/filedetails_download"
175+
app:layout_constraintLeft_toLeftOf="parent"
176+
app:layout_constraintTop_toBottomOf="@id/view_file_detail_separator" />
177+
178+
<Button
179+
android:id="@+id/button_file_detail_open_with"
180+
style="@style/Button.FileDetail"
181+
android:layout_width="0dp"
182+
android:layout_height="wrap_content"
183+
android:drawableStart="@drawable/ic_share"
184+
android:text="@string/filedetails_open_with"
185+
app:layout_constraintLeft_toLeftOf="parent"
186+
app:layout_constraintTop_toBottomOf="@id/button_file_detail_download" />
187+
188+
<Button
189+
android:id="@+id/button_file_detail_open_send"
190+
style="@style/Button.FileDetail"
191+
android:layout_width="0dp"
192+
android:layout_height="wrap_content"
193+
android:drawableStart="@drawable/ic_send"
194+
android:text="@string/filedetails_send"
195+
app:layout_constraintLeft_toLeftOf="parent"
196+
app:layout_constraintTop_toBottomOf="@id/button_file_detail_open_with"
197+
app:layout_constraintRight_toLeftOf="@id/barrier"/>
198+
199+
<androidx.constraintlayout.widget.Barrier
200+
android:id="@+id/barrier"
201+
android:layout_width="wrap_content"
202+
android:layout_height="wrap_content"
203+
app:barrierDirection="end"
204+
app:constraint_referenced_ids="button_file_detail_download,button_file_detail_open_with" />
205+
157206
</androidx.constraintlayout.widget.ConstraintLayout>
158207

159208
</ScrollView>

owncloudApp/src/main/res/values/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@
168168
<string name="filedetails_created">Created:</string>
169169
<string name="filedetails_modified">Modified:</string>
170170
<string name="filedetails_download">Download</string>
171+
<string name="filedetails_open_with">Open with</string>
172+
<string name="filedetails_send">Send</string>
171173
<string name="filedetails_file_image_content_description">File Image</string>
172174
<string name="filedetails_cancel_btn_content_description">Cancel download button</string>
173175
<string name="filedetails_sync_file">Synchronize</string>

owncloudApp/src/main/res/values/styles.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
You should have received a copy of the GNU General Public License
1717
along with this program. If not, see <http://www.gnu.org/licenses/>.
1818
-->
19-
<resources xmlns:android="http://schemas.android.com/apk/res/android">
19+
<resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
2020

2121
<style name="Animations" />
2222

@@ -298,4 +298,14 @@
298298
<style name="Theme.ownCloud.SortBottomSheetFragment.Item">
299299
<item name="android:textAppearance">@style/TextAppearance.OwnCloud.SortBottomSheetFragment.Item</item>
300300
</style>
301+
302+
<style name="Button.FileDetail" parent="Widget.MaterialComponents.Button.TextButton">
303+
<item name="textAllCaps">true</item>
304+
<item name="android:textSize">12sp</item>
305+
<item name="android:textColor">@color/owncloud_blue</item>
306+
<item name="android:gravity">start|center_vertical</item>
307+
<item name="android:drawableTint" tools:targetApi="m">@color/owncloud_blue</item>
308+
<item name="android:layout_marginTop">@dimen/standard_half_margin</item>
309+
<item name="android:drawablePadding">@dimen/standard_margin</item>
310+
</style>
301311
</resources>

0 commit comments

Comments
 (0)