mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
d4601d2644
11 changed files with 91 additions and 54 deletions
|
|
@ -1,5 +1,13 @@
|
|||
# Wikimedia Commons for Android
|
||||
|
||||
## v6.0.2
|
||||
|
||||
### What's changed
|
||||
* Addressed a bug that prevented the keyboard from appearing in various text fields, such as on the upload wizard
|
||||
* Links in the "File usages" list are now clickable and will take you to the correct page.
|
||||
* Titles for file usages are now clearer and easier to understand
|
||||
* Bug fixes and stability improvements
|
||||
|
||||
## v6.0.1
|
||||
|
||||
### What's changed
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ android {
|
|||
applicationId = "fr.free.nrw.commons"
|
||||
minSdk = 21
|
||||
targetSdk = 35
|
||||
versionCode = 1057
|
||||
versionName = "6.0.1"
|
||||
versionCode = 1058
|
||||
versionName = "6.0.2"
|
||||
|
||||
setProperty("archivesBaseName", "app-commons-v$versionName-" + getBranchName())
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@
|
|||
android:name=".upload.UploadActivity"
|
||||
android:configChanges="orientation|screenSize|keyboard"
|
||||
android:exported="true"
|
||||
android:hardwareAccelerated="false"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter android:label="@string/intent_share_upload_label">
|
||||
|
|
|
|||
|
|
@ -109,10 +109,8 @@ class ReviewActivity : BaseActivity() {
|
|||
setUpMediaDetailFragment()
|
||||
}
|
||||
|
||||
binding.skipImage.setOnTouchListener { _, event ->
|
||||
if (event.action == MotionEvent.ACTION_UP &&
|
||||
event.rawX >= (binding.skipImage.right - binding.skipImage.compoundDrawables[2].bounds.width())
|
||||
) {
|
||||
binding.skipImageInfo?.setOnTouchListener { _, event ->
|
||||
if (event.action == MotionEvent.ACTION_UP) {
|
||||
showSkipImageInfo()
|
||||
true
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import android.os.Build.VERSION_CODES
|
|||
import android.os.Bundle
|
||||
import android.provider.Settings
|
||||
import android.view.View
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.CheckBox
|
||||
import androidx.activity.OnBackPressedCallback
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
|
|
@ -805,6 +806,19 @@ class UploadActivity : BaseActivity(), UploadContract.View, UploadBaseFragment.C
|
|||
|
||||
override fun onNextButtonClicked(index: Int) {
|
||||
if (index < fragments!!.size - 1) {
|
||||
// Hide the keyboard before navigating to Media License screen
|
||||
val isUploadCategoriesFragment = fragments!!.getOrNull(index)?.let {
|
||||
it is UploadCategoriesFragment
|
||||
} ?: false
|
||||
if (isUploadCategoriesFragment) {
|
||||
val inputMethodManager = getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
currentFocus?.let { focusedView ->
|
||||
inputMethodManager.hideSoftInputFromWindow(
|
||||
focusedView.windowToken,
|
||||
InputMethodManager.HIDE_NOT_ALWAYS
|
||||
)
|
||||
}
|
||||
}
|
||||
binding.vpUpload.setCurrentItem(index + 1, false)
|
||||
fragments!![index + 1].onBecameVisible()
|
||||
(binding.rvThumbnails.layoutManager as LinearLayoutManager)
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import fr.free.nrw.commons.media.MediaDetailFragment
|
|||
import fr.free.nrw.commons.upload.UploadActivity
|
||||
import fr.free.nrw.commons.upload.UploadBaseFragment
|
||||
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_CATEGORY
|
||||
import io.reactivex.Notification
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
|
|
@ -69,6 +70,7 @@ class UploadCategoriesFragment : UploadBaseFragment(), CategoriesContract.View {
|
|||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
binding = UploadCategoriesFragmentBinding.inflate(inflater, container, false)
|
||||
binding!!.llContainerButtons.handleKeyboardInsets()
|
||||
return binding!!.root
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,22 +24,35 @@
|
|||
android:id="@+id/toolbarBinding"
|
||||
layout="@layout/toolbar" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/skip_image"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:id="@+id/skip_image_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:drawableEnd="@drawable/ic_info_outline_24dp"
|
||||
android:drawablePadding="@dimen/medium_height"
|
||||
android:drawableTint="@color/button_blue_dark"
|
||||
android:paddingLeft="@dimen/medium_height"
|
||||
android:paddingRight="@dimen/medium_height"
|
||||
android:text="@string/skip_image"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/button_blue_dark"
|
||||
android:textStyle="bold" />
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/skip_image"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:paddingHorizontal="@dimen/tiny_padding"
|
||||
android:text="@string/skip_image"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/button_blue_dark"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/skip_image_info"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:tint="@color/button_blue_dark"
|
||||
android:layout_width="@dimen/half_standard_height"
|
||||
android:layout_height="@dimen/half_standard_height"
|
||||
android:layout_marginStart="@dimen/small_gap"
|
||||
android:src="@drawable/ic_info_outline_24dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@
|
|||
android:id="@+id/rl_container_categories"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="@dimen/standard_gap"
|
||||
android:background="?attr/mainBackground"
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/button_divider"
|
||||
android:padding="@dimen/medium_padding"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -110,7 +110,8 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:padding="@dimen/standard_gap"
|
||||
android:paddingVertical="@dimen/small_padding"
|
||||
android:paddingHorizontal="@dimen/large_padding"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
|
||||
|
|
|
|||
|
|
@ -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