Boa Noite, criei uma lista com Recyclerview e cardview, a lista cria normalmente mas não esta clicavel, alguem sabe a configuração para habilitar?? no ViewHolder só coloquei um Toast no onClick, segue o codigo dos layout
-- <?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/card_view"
android:layout_margin="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
card_view:cardCornerRadius="4dp">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="8dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="0dp"
android:layout_weight="0.9"
android:layout_height="wrap_content"
android:layout_marginLeft="3dp">
<TextView
android:id="@+id/cliente_lista_item_nome"
android:textSize="20sp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:maxLength="30"
android:text="Nome"/>
<TextView
android:id="@+id/cliente_lista_item_contato"
android:textSize="15sp"
android:textStyle="italic"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Telefone"/>
</LinearLayout>
<CheckBox
android:layout_width="0dp"
android:layout_weight="0.1"
android:layout_height="wrap_content"
android:id="@+id/checkBox"
android:button="@drawable/favoritefile"
android:layout_gravity="center"
android:layout_marginLeft="5dp"
android:focusable="false"
android:focusableInTouchMode="false"/>
</LinearLayout>
</android.support.v7.widget.CardView>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/cliente_lista_recycler"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</RelativeLayout>
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.






0 comentários:
Postar um comentário