android-recyclerview

recyclerView takes lots of space from top after use SpannedgridLayoutManager

帅比萌擦擦* 提交于 2019-12-20 07:19:06
问题 i want to show list data in SpannedGridLayoutManager in recycleview, but after add helper class SpannedGridLayoutmanager, in my recycleview take a lot of space in top iam has to try change SpannedGridLayoutManager class with other SpannedGridlayout manager, but the space on top is not solved val manager = SpannedGridLayoutManager(object : SpannedGridLayoutManager.GridSpanLookup{ override fun getSpanInfo(position: Int): SpannedGridLayoutManager.SpanInfo { // Conditions for 2x2 items return if

android recyclerview: how do I programmatically select TextView background color?

三世轮回 提交于 2019-12-20 07:07:26
问题 I have a RecyclerView list of CardViews. On each CardView, the user previosuly selected the "type" from a dropdown dialog. The type choices are "Work" and "Home". The type choice is stored in an SQLite database as a String. When I run the app, no view is shown for the TextView "cardtype1" which is supposed to show the type choice from the database. How can I set a different background color for TextView type that is shown on the CardView, depending on what the user selects and is stored in

Views not loading after updating device to Android Pie 9.0

99封情书 提交于 2019-12-20 06:39:54
问题 I recently updated my phone to Android 9.0. The app which I was developing was working fine in earlier Android version. But after the update some views which require internet are not loading. Blank spaces are being displayed in their places. It has a ViewPager as banner and 2 RecyclerView below categories and deals respectively. They all require internet to load data. I don't know know if any extra permissions or dependencies are required in Android Pie. The logs show NetworkDispatcher.run:

Would recyclerview work on an android device with Jellybean?

ぐ巨炮叔叔 提交于 2019-12-20 06:38:53
问题 TO display a list of items I am using the latest RecyclerView in my app. I want to know would it only work on devices having android 5.0 or would it on work on lower versions as well ? 回答1: Yes, it's backwards-compatible, assuming you include the support library for RecyclerView v7 in your application's build.gradle file: Make sure you have downloaded the Android Support Repository using the SDK Manager. Open the build.gradle file for your application. Add the support library feature project

RecyclerView parameters stick around after re-drawing the list

风格不统一 提交于 2019-12-20 06:26:45
问题 So, I've got a RecyclerView with some textviews on the cards. One of these can turn red&bold, based on some parameters, using holder.DeviceTV.setTextColor(Color.RED); & holder.DeviceTV.setTypeface(null, Typeface.BOLD); This works perfectly fine, as you can see in the image below, above the black bar. Later, I remove all the cards with the red&bold textview, and notify the adapter. This results in what you see below the black bar in the image, which should NOT be the case. I'm guessing this is

RecyclerView with ImageView and differents Activities

妖精的绣舞 提交于 2019-12-20 05:59:49
问题 What I have: A RecyclerView with pictures of places like bars, cofee stores, etc. What I want: That when you click on one of these images I show you the info of the selected place My question: How can i set the OnCLickListener for the third picture for example? Many people have told me to do it on my " onBindViewHolder() " method, but it doesn't allow me to implement the " startActivity " so i can pass to the " Intent " Please, if you can explain with code it would be great, I am not good

How to Highlighted single Text and background color when using recycle view

ぃ、小莉子 提交于 2019-12-20 05:58:15
问题 I'll use RecyclerView And I've more than 10 items in the list And I Have to change a text color and background layout on a single click of the item and else all the item color not change. Please suggest me the right way to solve this issue. I'll try to change the color in BindViewHolder, ViewHolder and Adapter click item but I'm Successful to change the color but unsuccessful to change the color back. public class LoadVehicleTypeAdapter extends RecyclerView.Adapter<LoadVehicleTypeAdapter

how i highlighted item in first launch of app in recycle

家住魔仙堡 提交于 2019-12-20 05:47:18
问题 I have integrated item is highlighted in the first launch of the app in my project. I'll use to save the selected item on the click of the adapter in the SQL database and set the value in the first launch of the app, but it does not change the background and text color. please help me in solving the issue and suggest me the right way public class LoadVehicleTypeAdapter extends RecyclerView.Adapter<LoadVehicleTypeAdapter.CarTypesHolder> { private List<TaxiTypeResponse.Message>

Autosearching option using filter method in recyclerview

╄→尐↘猪︶ㄣ 提交于 2019-12-20 04:30:48
问题 In my app I have implemented a recyclerview with cardview to show the list of the employee inside a company. Now I want to implement a serch option by which user can search with the name of the employee. I have read related document in website about it. I wrote a code to implement a serch option. But unfortunately I can see the search option and I can write it but it cannot detect the name from the list. I do not know what is the problem inside my code. Here is my adapter class where I

The transparent image is transparent somewhere in the application and is not transparent somewhere else

假如想象 提交于 2019-12-20 04:19:03
问题 In an Android application, I have a transparent png image which is truly transparent under the following conditions: final ImageView btnsB = new ImageView(this); ; RelativeLayout.LayoutParams paramsB = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); paramsB.addRule(RelativeLayout.CENTER_IN_PARENT); paramsB.addRule(RelativeLayout.ABOVE, R.id.layout1); btnsB.setLayoutParams(paramsB); Picasso.with(this).load(R.drawable.a11)