Acho que me expressei errado, se eu implementar alguma coisa errado e voce clica no item da lista ele não faz nada, então deduzi que ele não esta dando o click no item, isso aconteceu uma vez quando fiz uma lista que tinha um botão, que tinha que setar o parâmetro (android:focusable="false") no botão se não o item não era clicável, eu acredito que seja alguma configuração do meu RecyclerView ou do CardView, por isso postei o codigo do layout, ele não faz nem o efeito quando é clicado!!
Em sexta-feira, 6 de março de 2015 22:09:47 UTC-3, Rudson Lima escreveu:
-- Em sexta-feira, 6 de março de 2015 22:09:47 UTC-3, Rudson Lima escreveu:
Post o logcat do erro.2015-03-06 22:02 GMT-03:00 Everton Machado <evert...@gmail.com>:Boa Noite Rudson, eu estou bem e você como esta???
Eu já tentei desta forma, mas vi que o problema esta antes, tipo o recyclerview parece que esta somente leitura rs, tipo nem da um click e fecha a aplicação se eu implementar algo errado!!!
Em sex, 6 de mar de 2015 8:08 PM, Rudson Lima <rudso...@gmail.com> escreveu:You received this message because you are subscribed to a topic in the Google Groups "Android Brasil - Dev" group.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 <evert...@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.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"> <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.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-...@googlegroups.com .--
For more options, visit https://groups.google.com/d/optout .
To unsubscribe from this topic, visit https://groups.google.com/d/topic/androidbrasil-dev/ .dc1WBz2CYg0/unsubscribe
To unsubscribe from this group and all its topics, send an email to androidbrasil-...@googlegroups.com .
For more options, visit https://groups.google.com/d/optout .
--
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-...@googlegroups.com .
For more options, visit https://groups.google.com/d/optout .
--Rudson Lima ( live-O ) Desenvolvedor AndroidContato +55 85 87050560 - Fortaleza-ceGoogle Play CepLive-O e Navigation Drawer - Live-OSocial facebook | google+ | linkedin
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