Skip to main content

Android (native java) - Sliding Drawer - Content (Imageview and Checkbox) click event not firing



In one of the project,we have a sliding panel from the bottom. In which user can choose the checkbox and click the image inside the panel. so i have added a sliding drawer component inside the relative layout. Top view will contain, listview and the bottom it will be a slidingdrawer.





We have the handle and content part for the sliding component. Inside the content i have added a checkbox and imageview. I want to listen for those events when user clicks any one of those. I can able to listen for teh sliding drawer events but not the other two click events.





DO i miss anything for listening of events inside content part in the sliding drawer. I tried by adding clickable property to true in layout xml. But still the same result.





I searched in google, but not able to find the solution.





Please let me know, if i am missing anything.







<SlidingDrawer android:id="@+id/slidingDrawer1" android:layout_width="match_parent"

android:layout_height="wrap_content" android:handle="@+id/handle" android:content="@+id/content"

android:animateOnClick="true" android:padding="15dp" android:topOffset="250dp" android:allowSingleTap="true"

>

<LinearLayout android:layout_width="match_parent"

android:layout_height="wrap_content" >



<LinearLayout android:layout_width="match_parent" android:layout_height="50dp"

android:id="@+id/handle" android:background="@drawable/popbg" android:paddingLeft="20dp"

android:paddingTop="20dp" android:paddingRight="20dp">

<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"

android:text="text1" android:textColor="#000000"

android:layout_weight="1"/>

<ImageView

android:id="@+id/elrattSlidingIcon"

android:layout_width="wrap_content" android:layout_height="wrap_content"

android:src="@drawable/non_expand" android:layout_gravity="right"/>

</LinearLayout>



<LinearLayout android:layout_width="match_parent"

android:layout_height="80dp"

android:gravity="center_horizontal" android:orientation="vertical"

android:id="@+id/content" android:paddingLeft="15dp" android:paddingRight="14dp"

android:clickable="true">

<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent"

android:gravity="top" android:padding="0dp"

android:clickable="true">

<LinearLayout android:layout_width="match_parent"

android:layout_height="match_parent" android:gravity="center_horizontal"

android:paddingTop="15dp" android:orientation="vertical"

android:background="@drawable/bg_elratt">

<ImageView android:id="@+id/elrattListBtmBtn"

android:layout_width="match_parent" android:layout_height="wrap_content"

android:src="@drawable/skickaintr_ov" android:clickable="true"/>

<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"

android:orientation="horizontal" android:paddingLeft="50dp" android:paddingRight="50dp"

android:paddingTop="10dp">

<CheckBox android:id="@+id/usrOption" android:layout_width="0dp" android:layout_height="wrap_content"

android:layout_weight="0.2" android:button="@drawable/checkbox_selector" android:tag="1"

android:clickable="true"/>

<TextView android:layout_width="0dp" android:layout_height="match_parent"

android:text="test2" android:singleLine="false"

android:layout_weight="0.8"/>

</LinearLayout>

</LinearLayout>

</LinearLayout>

</LinearLayout>



</LinearLayout>



</SlidingDrawer>







Thanks in Advance, Regards Srini


Comments

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?

CCNA 1 Final Exam 2011 latest (hot hot hot)

  Hi! I have been posted content of ccna1 final exam (latest and only question.) I will post the answer and insert image on sunday. If you care, please subscribe your email an become a first person have full test content. Subcribe now  Some question  have not content because this question have images content. So that can you wait for me? SUNDAY 1. A user sees the command prompt: Router(config-if)# . What task can be performed at this mode? Reload the device. Perform basic tests. Configure individual interfaces. Configure individual terminal lines. 2. Refer to the exhibit. Host A attempts to establish a TCP/IP session with host C. During this attempt, a frame was captured with the source MAC address 0050.7320.D632 and the destination MAC address 0030.8517.44C4. The packet inside the captured frame has an IP source address 192.168.7.5, and the destination IP address is 192.168.219.24. At which point in the network was this packet captured? leaving host A leaving ATL leaving...