Olá Everton tudo bem?
Tenha cuidado em não ficar duplicando threads pois essa duvida é a mesma que a do post anterior.
Basicamente vc cria o onClick da sua View no seu adapter e ainda pode criar um Listener pra parada ficar mais interessante.
Espero que esse link lhe ajude.
Boa sorte.
2015-03-06 19:25 GMT-03:00 Everton Machado <evertonrm89@gmail.com>:
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.CardViewxmlns: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"><LinearLayoutandroid:orientation="horizontal"android:layout_width="match_parent"android:layout_height="match_parent"android:layout_margin="8dp"><LinearLayoutandroid:orientation="vertical"android:layout_width="0dp"android:layout_weight="0.9"android:layout_height="wrap_content"android:layout_marginLeft="3dp"><TextViewandroid: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"/><TextViewandroid: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><CheckBoxandroid: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"?><RelativeLayoutxmlns: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.RecyclerViewandroid: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.
Rudson Lima ( live-O ) Desenvolvedor Android
Contato +55 85 87050560 - Fortaleza-ceGoogle Play CepLive-O e Navigation Drawer - Live-O
Social facebook | google+ | linkedinYou 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