Fixes #4287 "Tapping multiple items in explore should not be allowed" (#4310)

* only one media detail at a time

* requested changes

* disabled multitap on screen

* requested changes
This commit is contained in:
Aditya-Srivastav 2021-04-01 19:54:48 +05:30 committed by GitHub
parent 4dfad52685
commit ff96f5047e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 8 deletions

View file

@ -2,7 +2,7 @@ package fr.free.nrw.commons.explore;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.os.Handler;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -10,20 +10,16 @@ import android.widget.FrameLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.google.android.material.tabs.TabLayout;
import fr.free.nrw.commons.Media;
import fr.free.nrw.commons.R;
import fr.free.nrw.commons.category.CategoryImagesCallback;
import fr.free.nrw.commons.contributions.ContributionsListFragment;
import fr.free.nrw.commons.contributions.MainActivity;
import fr.free.nrw.commons.di.CommonsDaggerSupportFragment;
import fr.free.nrw.commons.explore.categories.media.CategoriesMediaFragment;
import fr.free.nrw.commons.media.MediaDetailPagerFragment;
import fr.free.nrw.commons.navtab.NavTab;
import fr.free.nrw.commons.settings.SettingsFragment;
public class ExploreListRootFragment extends CommonsDaggerSupportFragment implements
MediaDetailPagerFragment.MediaDetailProvider, CategoryImagesCallback {
@ -113,7 +109,6 @@ public class ExploreListRootFragment extends CommonsDaggerSupportFragment implem
@Override
public void onMediaClicked(int position) {
Log.d("deneme8","on media clicked");
container.setVisibility(View.VISIBLE);
((ExploreFragment) getParentFragment()).tabLayout.setVisibility(View.GONE);
mediaDetails = new MediaDetailPagerFragment(false, true);

View file

@ -54,6 +54,8 @@
<item name="contributionsListTextSecondary">@color/white</item>
<item name="menu_item_tint">@color/white</item>
<item name="search_icon">@drawable/ic_search_white_24dp</item>
<item name="android:windowEnableSplitTouch">false</item>
<item name="android:splitMotionEvents">false</item>
</style>
<style name="LightAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
@ -109,6 +111,8 @@
<item name="contributionsListTextSecondary">@color/disabled_button_text_color_dark</item>
<item name="menu_item_tint">@color/primaryDarkColor</item>
<item name="search_icon">@drawable/ic_search_blue_24dp</item>
<item name="android:windowEnableSplitTouch">false</item>
<item name="android:splitMotionEvents">false</item>
</style>
<style name="LightMoreBottomSheetStyle" parent="LightAppTheme">