mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
fix(upload): handle keyboard insets for bottom buttons at Depicts step
This commit is contained in:
parent
1879e86bd0
commit
f1bc39953b
3 changed files with 32 additions and 30 deletions
|
|
@ -27,6 +27,7 @@ import fr.free.nrw.commons.upload.UploadActivity
|
|||
import fr.free.nrw.commons.upload.UploadBaseFragment
|
||||
import fr.free.nrw.commons.upload.structure.depictions.DepictedItem
|
||||
import fr.free.nrw.commons.utils.DialogUtil.showAlertDialog
|
||||
import fr.free.nrw.commons.utils.handleKeyboardInsets
|
||||
import fr.free.nrw.commons.wikidata.WikidataConstants.SELECTED_NEARBY_PLACE
|
||||
import io.reactivex.Notification
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
|
|
@ -69,6 +70,7 @@ class DepictsFragment : UploadBaseFragment(), DepictsContract.View {
|
|||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
_binding = UploadDepictsFragmentBinding.inflate(inflater, container, false)
|
||||
_binding!!.navigationButtonsContainer.handleKeyboardInsets()
|
||||
return binding.root
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -124,38 +124,35 @@
|
|||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/button_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_above="@+id/depicts_next"
|
||||
android:background="@color/divider_grey" />
|
||||
android:id="@+id/button_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_above="@+id/navigation_buttons_container"
|
||||
android:background="@color/divider_grey" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/depicts_next"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:id="@+id/navigation_buttons_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:paddingHorizontal="@dimen/medium_padding"
|
||||
android:paddingVertical="@dimen/small_padding"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:contentDescription="@string/next"
|
||||
android:text="@string/next"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/depicts_previous"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginEnd="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:layout_toStartOf="@id/depicts_next"
|
||||
android:layout_toLeftOf="@id/depicts_next"
|
||||
android:contentDescription="@string/previous"
|
||||
android:text="@string/previous" />
|
||||
android:gravity="end">
|
||||
<Button
|
||||
android:id="@+id/depicts_previous"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/standard_gap"
|
||||
android:contentDescription="@string/previous"
|
||||
android:text="@string/previous" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/depicts_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/next"
|
||||
android:text="@string/next"
|
||||
android:textColor="@android:color/white" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,9 @@
|
|||
<dimen name="achievements_activity_margin_vertical">8dp</dimen>
|
||||
<dimen name="medium_height">12dp</dimen>
|
||||
<dimen name="medium_width">12dp</dimen>
|
||||
<dimen name="small_padding">8dp</dimen>
|
||||
<dimen name="medium_padding">16dp</dimen>
|
||||
<dimen name="large_padding">24dp</dimen>
|
||||
|
||||
<!-- Standard margins / padding -->
|
||||
<dimen name="login_padding">30dp</dimen>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue