I have a LinearLayout with a custom view on top of it. The veiw is 1px smaler than the layout.
I want the layout to change it’s background color when view is pressed or gains focuse.
I have implemented the selector with the drawables for the layout and it’s all wroking when i click on the layout. But because there is only 1 px clickable space I want my custom view that is on top of it to change the relevant properties for the layout uderneath.
Is there any way I can do that? Can the custom view dispatch evnets to the parrent Layout if the layout is not customised ?.
I can easly change the background color programatically for the Layout that the view is on when clicked by just accessing it’s parent, but I want the backgroud color to chagnge for shor time and go back to it’s default color. Like with the ListView items.
Thanks
Create the handler in the ui thread, as a global at the top.
Handler handler = new Handler();
Then use to change your layout colors back: