android-cardview

Android CardView with weird border when transparent

佐手、 提交于 2020-01-12 12:54:31
问题 I'm having some trouble with CardView transparency and card_elevation. Trying to use a CardView transparent the result is: Without transparency: What I'm trying to get is something like this: Here is my xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@mipmap/eifell"

Android CardView with weird border when transparent

十年热恋 提交于 2020-01-12 12:53:25
问题 I'm having some trouble with CardView transparency and card_elevation. Trying to use a CardView transparent the result is: Without transparency: What I'm trying to get is something like this: Here is my xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@mipmap/eifell"

Android CardView with weird border when transparent

ぐ巨炮叔叔 提交于 2020-01-12 12:53:25
问题 I'm having some trouble with CardView transparency and card_elevation. Trying to use a CardView transparent the result is: Without transparency: What I'm trying to get is something like this: Here is my xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@mipmap/eifell"

Round only top corner of cardview

倾然丶 夕夏残阳落幕 提交于 2020-01-12 04:10:39
问题 I want to corner only the top of a cardview. I used below property and it is rounding all the corner. I want to show an overlap of all cards card_view:cardCornerRadius="4dp" here is my layout <?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/card_view" android:layout_width="match_parent" android:layout_height="match_parent" card_view

Error when adding CardView to layout

我只是一个虾纸丫 提交于 2020-01-10 02:35:27
问题 I wanted to try out the new toys that google gave us and I've run into some trouble. Here is my build.gradle: apply plugin: 'com.android.application' android { compileSdkVersion 'android-L' buildToolsVersion "20.0.0" defaultConfig { applicationId "com.tod.android.lpreviewtest" minSdkVersion 'L' targetSdkVersion 'L' versionCode 1 versionName "1.0" } buildTypes { release { runProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies {

In ANDROID how delete data from LISTVIEW by Button click?

十年热恋 提交于 2020-01-07 05:39:05
问题 in my application Listview is populated with data from Sqlite database. i use button to delete the items. And also modify the table in Sqlite Db . SQL DB Class protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_table); tv = (TextView) findViewById(R.id.txt_rates); // checkout = (Button) findViewById(R.id.submit_btn); ListCart = (ListView) findViewById(R.id.list_item); pDialog = new ProgressDialog(this); ctx = this;

Android: how do I setEnabled(true) on a CardView in onResume?

廉价感情. 提交于 2020-01-07 02:48:14
问题 I have a RecyclerView list with CardViews. I added the following code below to launch an activity (ActActivity) that allows the user to edit the CardView. The setEnabled(false) code is used to keep multiple instances of the activity from opening if the user clicks multiple times in rapid succession on the CardView. I only want one instance of the activity to be open at one time so that the user is only editing the single CardView that they clicked on. My problem is that when I add the

Multiple columns cardview to fill landsacpe screen size

懵懂的女人 提交于 2020-01-06 19:38:13
问题 I have this challenge: in my portrait mode I used a cardview to contain image and texts in an array, and they took two columns which is fine by me. But, the same arrangement happens in a landscaped android phone, this creates space between and after the image. How do I make the columns in landscape three(3)? Here is the code for portrait layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas

How to set initial layout_width of cards in Recycler View to Match_Parent?

百般思念 提交于 2020-01-06 06:53:13
问题 I am facing issue with rendering items in recycler view. The problem happens with the items that are initially loaded as you can see in the pic below that layout width doesn't become screen wide(match_parent). Now when I scroll, new items do span screen wide. And when I scroll up, previous items also become screen wide. So it seems that there is some issue with initial loaded cards. Here is the code... Adapter: class SearchAdapter(searchInp : ArrayList<BusNumbers>) : RecyclerView.Adapter

How to set initial layout_width of cards in Recycler View to Match_Parent?

邮差的信 提交于 2020-01-06 06:53:05
问题 I am facing issue with rendering items in recycler view. The problem happens with the items that are initially loaded as you can see in the pic below that layout width doesn't become screen wide(match_parent). Now when I scroll, new items do span screen wide. And when I scroll up, previous items also become screen wide. So it seems that there is some issue with initial loaded cards. Here is the code... Adapter: class SearchAdapter(searchInp : ArrayList<BusNumbers>) : RecyclerView.Adapter