mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Requested changes done
This commit is contained in:
parent
ab7edc4cd2
commit
9d06f154a7
6 changed files with 66 additions and 64 deletions
|
|
@ -103,6 +103,15 @@ class CustomSelectorActivity: BaseActivity(), FolderClickListener, ImageSelectLi
|
|||
.commit()
|
||||
fetchData()
|
||||
setUpToolbar()
|
||||
setUpBottomLayout()
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up bottom layout
|
||||
*/
|
||||
private fun setUpBottomLayout() {
|
||||
val done : Button = findViewById(R.id.upload)
|
||||
done.setOnClickListener { onDone() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -128,9 +137,6 @@ class CustomSelectorActivity: BaseActivity(), FolderClickListener, ImageSelectLi
|
|||
private fun setUpToolbar() {
|
||||
val back : ImageButton = findViewById(R.id.back)
|
||||
back.setOnClickListener { onBackPressed() }
|
||||
|
||||
val done : Button = findViewById(R.id.upload)
|
||||
done.setOnClickListener { onDone() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -13,53 +13,12 @@
|
|||
android:id="@+id/fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottom_layout"
|
||||
app:layout_constraintTop_toBottomOf="@+id/toolbar_layout"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/bottom_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<Button
|
||||
android:id="@+id/not_for_upload"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Mark as not for upload"
|
||||
android:textColor="@color/white"
|
||||
android:visibility="visible"
|
||||
android:layout_margin="5dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/bottom_layout"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline3"
|
||||
app:layout_constraintStart_toStartOf="@id/bottom_layout"
|
||||
app:layout_constraintTop_toTopOf="@id/bottom_layout" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/upload"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:text="Upload"
|
||||
android:textColor="@color/white"
|
||||
android:visibility="visible"
|
||||
android:layout_margin="5dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/bottom_layout"
|
||||
app:layout_constraintEnd_toEndOf="@id/bottom_layout"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline3"
|
||||
app:layout_constraintTop_toTopOf="@id/bottom_layout" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<include
|
||||
layout="@layout/custom_selector_bottom_layout"
|
||||
android:id="@+id/bottom_sheet"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
49
app/src/main/res/layout/custom_selector_bottom_layout.xml
Normal file
49
app/src/main/res/layout/custom_selector_bottom_layout.xml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/bottom_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<Button
|
||||
android:id="@+id/not_for_upload"
|
||||
android:layout_width="@dimen/dimen_0"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/mark_as_not_for_upload"
|
||||
android:textColor="@color/white"
|
||||
android:visibility="visible"
|
||||
android:layout_margin="@dimen/dimen_5"
|
||||
app:layout_constraintBottom_toBottomOf="@id/bottom_layout"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline3"
|
||||
app:layout_constraintStart_toStartOf="@id/bottom_layout"
|
||||
app:layout_constraintTop_toTopOf="@id/bottom_layout" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/upload"
|
||||
android:layout_width="@dimen/dimen_0"
|
||||
android:layout_height="@dimen/dimen_0"
|
||||
android:text="@string/upload"
|
||||
android:textColor="@color/white"
|
||||
android:visibility="visible"
|
||||
android:layout_margin="@dimen/dimen_5"
|
||||
app:layout_constraintBottom_toBottomOf="@id/bottom_layout"
|
||||
app:layout_constraintEnd_toEndOf="@id/bottom_layout"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline3"
|
||||
app:layout_constraintTop_toTopOf="@id/bottom_layout" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</merge>
|
||||
|
|
@ -28,8 +28,9 @@
|
|||
android:textAlignment="center"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dimen_20"
|
||||
app:layout_constraintStart_toEndOf="@id/back"
|
||||
app:layout_constraintEnd_toStartOf="@id/done"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:singleLine="true"
|
||||
|
|
@ -37,20 +38,5 @@
|
|||
android:text="@string/custom_selector_title"
|
||||
style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/done"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerVertical="true"
|
||||
android:clickable="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:focusable="true"
|
||||
android:padding="@dimen/standard_gap"
|
||||
app:srcCompat="?attr/custom_selector_done"
|
||||
android:visibility="invisible"
|
||||
android:contentDescription="@string/done" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</merge>
|
||||
|
|
@ -59,6 +59,7 @@
|
|||
<!-- Commonly used dimensions -->
|
||||
<dimen name="dimen_0">0dp</dimen>
|
||||
<dimen name="dimen_2">2dp</dimen>
|
||||
<dimen name="dimen_5">5dp</dimen>
|
||||
<dimen name="dimen_6">6dp</dimen>
|
||||
<dimen name="dimen_10">10dp</dimen>
|
||||
<dimen name="dimen_20">20dp</dimen>
|
||||
|
|
|
|||
|
|
@ -734,4 +734,5 @@ Upload your first media by tapping on the add button.</string>
|
|||
<string name="error_feedback">Error while sending feedback</string>
|
||||
<string name="enter_description">What is your feedback?</string>
|
||||
<string name="your_feedback">Your feedback</string>
|
||||
<string name="mark_as_not_for_upload">Mark as not for upload</string>
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue