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

[韓日関係] 首相含む大幅な内閣改造の可能性…早ければ来月10日ごろ=韓国

div not scrolling properly with slimScroll plugin

I am using the slimScroll plugin for jQuery by Piotr Rochala Which is a great plugin for nice scrollbars on most browsers but I am stuck because I am using it for a chat box and whenever the user appends new text to the boxit does scroll using the .scrollTop() method however the plugin's scrollbar doesnt scroll with it and when the user wants to look though the chat history it will start scrolling from near the top. I have made a quick demo of my situation http://jsfiddle.net/DY9CT/2/ Does anyone know how to solve this problem?

Why does this javascript based printing cause Safari to refresh the page?

The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex