android-recyclerview

Recyclerview not updating the data list

五迷三道 提交于 2019-12-24 11:55:45
问题 I'm using recyclerview to display data from sqlite database using cursor , when I delete an item from database the item gets deleted but my recycler view doesn't refresh. I have to go back to my main activity and then the data gets refreshed. I have used notifyItemRemoved() and notifyDataSetChanged() Here is my code. Adapter public class BookmarkAdapter extends RecyclerView.Adapter<BookmarkAdapter.ViewHolder> { public Cursor cursor; DatabaseHelper mDBHelper; public BookmarkAdapter(){ } public

Displaying ParseFile Containing Images Using Their Urls In A RecyclerView

荒凉一梦 提交于 2019-12-24 11:53:06
问题 I have three images stored in a table on Parse.com and I would like to display those three images using their URLs. I have retrieved the URLs of the three images and they are displayed in the RecyclerView. You can see this in my screen shot image. So how do I display these three images using their URLs? MY MAIN ACTIVITY: public class RecyclerViewActivity extends Activity { private List<Person> persons; private RecyclerView rv; @Override protected void onCreate(Bundle savedInstanceState) {

Disable Touch of inner RecyclerView

泪湿孤枕 提交于 2019-12-24 11:47:50
问题 I'm new to RecyclerView and I want to implement OnItemClickListner like Listview. To do this I'm using following code. public static class ViewHolder extends RecyclerView.ViewHolder { public RecyclerView recyclerView; public ViewHolder(View itemView) { super(itemView); recyclerView = (RecyclerView) itemView.findViewById(R.id.recycleViewIngredient); itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //Item Click Listner } }); } } It is working fine

Shared Element Transition Android Doesn't Work

只谈情不闲聊 提交于 2019-12-24 10:26:33
问题 I'm trying to to this for a day but i don't know what is the problem! I have an activity with two fragments which in the first one i have a RecyclerView contains an imageview and on the other fragment i have another imageview. custom view layer imageview: <ImageView android:id="@+id/clst_img_cover" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:scaleType="centerCrop" app:srcCompat="@drawable/no_image" android:transitionName="@string

RecyclerView doesn't load data on first launch after Permission Check inside fragment

China☆狼群 提交于 2019-12-24 10:15:34
问题 RecyclerView adapter doesn't load data on first launch after Permission check. I have to re-tap the tab to get the data. I have already visited/tried these links - -- RecyclerView doesn't load data in first launch using FirebaseRecyclerAdapter -- RecyclerView doesn't load items on first start of activity -- recyclerview not loading adapter values in a fragment But nothing works yet. Tried to set global adapter, So I can call notifyDataSetChanged() from onResume() . Still It didn't worked.

RecyclerView item click using RxJava2 + RxBinding not working after Fragment replacements

房东的猫 提交于 2019-12-24 09:36:02
问题 I have a RecyclerView in Fragment, item clicks are handled using RxJava2 as explained in this SO answer, It's working fine in non fragments. private PublishSubject<Place> itemViewClickSubject = PublishSubject.create(); @Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.search_result_view, parent, false); ViewHolder viewHolder = new ViewHolder(view); // convert click events into reactive stream

Recycleview displaying a grey area

隐身守侯 提交于 2019-12-24 09:18:50
问题 the RecyclerView is not shown as in the picture below and i cannot find any solution. What i tried: Rebuild Clean project Invalidate Cache My build.gradle(Module:app) apply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "com.user.myapplication" minSdkVersion 15 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles

ListItem is missing a constructor with no arguments

隐身守侯 提交于 2019-12-24 09:18:46
问题 I got a problem. I am trying to learn a bit about Firebase etc. Today I made RecyclerView which should show Items of my Firebase Database. But if i run it i get this error: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.andrejulia.painting, PID: 16777 com.google.firebase.database.DatabaseException: Class com.example.andrejulia.painting.ListItem is missing a constructor with no arguments at com.google.android.gms.internal.zzbqi$zza.zze(Unknown Source) at com.google.android.gms

Item click is not working, while auto scroll in recyclerview

不羁岁月 提交于 2019-12-24 08:07:00
问题 I have used the following code to autoscroll the Horizontal recyclerview. private final Runnable SCROLLING_RUNNABLE = new Runnable() { @Override public void run() { recyclerViewDate.smoothScrollBy(pixelsToMove, 0); setDateValue(); mHandler.postDelayed(this, duration); } }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_center_item_finder); txtSelected=(TextView)findViewById(R.id.txtSelected);

Android: how do I maintain the View for CardViews in a RecyclerView list?

青春壹個敷衍的年華 提交于 2019-12-24 07:59:25
问题 I have a RecyclerView list that shows a vertical list of CardViews. The AppBar has an action_search MenuItem that handles a SearchView method when clicked on. The SearchView runs a filter method that allows the CardView data to be searched. I set up a filterList to hold filtered CardViews from the search results. The filter() method clears the filterList before conducting the search query. The problem is that the filterList.clear() destroys the View of the existing RecyclerView CardViews and