recyclerview

Could not resolve all dependencies for configuration ':app:_debugCompile'. in android studio

匿名 (未验证) 提交于 2019-12-03 09:06:55
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When I am run my application in android studio error. I am new in android developing. My Logtag is here: Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:assembleDebug] Error:A problem occurred configuring project ':app'. > Could not resolve all dependencies for configuration ':app:_debugCompile'. > Could not find com.android.support:recyclerview-v7:. Searched in the following locations: https://jcenter.bintray.com/com/android/support/recyclerview-v7//recyclerview-v7-.pom https://jcenter.bintray

Inner Recyclerview not receiving click event

匿名 (未验证) 提交于 2019-12-03 08:28:06
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a parent recyclerview with filled with cards and an inner recyclerview inside each card. The scrolling for the inner recyclerview inside the cards has been disabled but this has also affected the inner recyclerview's ability to receive click events. To disable the scrolling, I had followed a very similar approached to Lucas Crawford's answer here which suggested that you create a custom recyclerview class and override dispatchTouchEvent: Disable Scrolling in child Recyclerview android My class looks like this: public class

RecyclerView / MapView crashes when rotating device

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a Android.Support.V4.Fragment that contains both a MapView and a RecyclerView . These are separate views in the Fragment . The app crashes when the device is rotated: Android.OS.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.v7.widget.RecyclerView$SavedState I am passing the lifecycle methods to the MapView as required by the docs: private MapView mapView; private RecyclerView myRecyclerView; private RecyclerView.LayoutManager myLayoutManager; public override View OnCreateView(LayoutInflater

recyclerview onscrolllistener not working when setNestedScrollingEnabled to false

匿名 (未验证) 提交于 2019-12-03 03:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: i want to implement pagination with recyclerView , for this i add addOnScrollListener to the recyclerView but i am having trouble with RecyclerView.OnScrollListener not working, when i set rvGridExplore.setNestedScrollingEnabled(false); but when i remove rvGridExplore.setNestedScrollingEnabled(false); then its working fine, i don't know how to handle this here is code: rvGridExplore = (RecyclerView) view.findViewById(R.id.rvGridExplore); final GridLayoutManager glm = new GridLayoutManager(context,2); // rvGridExplore

Android recyclerView findViewHolderForAdapterPosition returns null

匿名 (未验证) 提交于 2019-12-03 03:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to click an item in recyclerView programmatically, I found a way do that: recyclerView.findViewHolderForAdapterPosition(0).itemView.performClick(); but it doesn't work for me, the findViewHolderForAdapterPosition just returns null. Did I miss something in my code? HistoryListAdapter: public class HistoryListAdapter extends RecyclerView.Adapter { private static ArrayList recordItems; private static FragmentActivity activity; private static RecordList recordList; public HistoryListAdapter(ArrayList recordItems, FragmentActivity FA,

PopupMenu click causing RecyclerView to scroll

匿名 (未验证) 提交于 2019-12-03 03:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have an overflow button inside a CardView in Recyclerview . Whenever I am clicking the button,I show a popup menu but also RecyclerView is scrolling down one item. Can anyone please help me stop this unwanted scrolling? Basically I am trying to replicate the same overflow button behavior as in Playstore. Layout: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="5dp"> <android.support.v7.widget.CardView android:id="@+id

RecyclerView: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position

匿名 (未验证) 提交于 2019-12-03 02:59:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've started getting this crash reported on Crashlytics. I have no idea how to reproduce it but it all appears to be code internal to the RecyclerView . I think this comes from a RecyclerView I have which never really changes. The user can refresh it but then all items are replaced and notifyDataSetChanged is called. java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 5(offset:5).state:7 at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4041) at android.support.v7.widget

RecyclerView corrupts view using notifyItemMoved()

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm having a problem with using the notifyItemMoved() method. It seems to be incorrectly displaying unmoved views. My list has 4 element in it. What I want to do is animate a swap between item 1 and item 3. Items 1 and 3 swap correctly, but item 2 displays what was at item 3! So the list starts off looking something like this: Item 0 Item 1 Item 2 Item 3 And ends like this: Item 0 Item 3 Item 3 <!-- What the heck has this changed for? Item 1 My adapter is backed by a List mProductList . I call the following code: public void

Recyclerview not call onCreateViewHolder

匿名 (未验证) 提交于 2019-12-03 02:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My RecyclerView does not call onCreateViewHolder , onBindViewHolder even MenuViewHolder constructor, therefore nothing appears in RecyclerView . I put logs for debugging, and no log is shown. What might be the problem? My adapter: public class MenuAdapter extends RecyclerView.Adapter { private LayoutInflater inflater; List data = Collections.emptyList(); public MenuAdapter(Context context, List data) { Log.i("DEBUG", "Constructor"); inflater = LayoutInflater.from(context); Log.i("DEBUG MENU - CONSTRUCTOR", inflater.toString()); this.data =

Android Recyclerview MediaPlayer previous Item sound stop, release after new one is clicked

匿名 (未验证) 提交于 2019-12-03 02:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: In my app i have recyclerview items, and each item play sound when i click it. Problem is that when i click few items, they all play sounds in the same time until they finish. Lets say i click 10 items, all 10 play sounds in the same time and after some time app get crashed and i get this error: E/MediaPlayer: error (1, -19) . I avoid app crashing by implementing automatic release with this code: mediaPlayer . setOnCompletionListener ( new MediaPlayer . OnCompletionListener () { @Override public void onCompletion ( MediaPlayer mp )