Note that there are some explanatory texts on larger screens.

plurals
  1. POListview adapter's button can not be clicked
    primarykey
    data
    text
    <p>I am using listview's adapter, my code,</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" &gt; &lt;LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="10dp" android:padding="10dp" android:background="@android:color/darker_gray" android:orientation="vertical" &gt; &lt;TextView android:id="@+id/tv_position" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@android:color/white" android:text="position1" android:textSize="20sp" /&gt; &lt;Button android:id="@+id/btn_like" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" /&gt; &lt;/LinearLayout&gt; &lt;RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="10dp" android:background="@drawable/selector_translate_blue" android:clickable="true" //Add this is to allow this to get focus, but the button can not be clicked. &gt; &lt;/RelativeLayout&gt; &lt;/FrameLayout&gt; </code></pre> <p>When i remove android:clickable="true", the button can be clicked, but the RelativeLayout can not focused. How to achieve a similar effect as Google Plus?</p> <p><strong>UPDATE</strong> Now only RelativeLayout can be clicked. I mean how to make the Button also can be clicked? NOT click them two at the same time.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload