Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6226943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:07:32+00:00 2026-05-24T09:07:32+00:00

I have a complex button which is made up of some layouts and Imagebuttons

  • 0

I have a complex button which is made up of some layouts and Imagebuttons and then wrapped inside a Relativelayout for ease of use. The individual components work fine- I focus or click on one of the contained imagebuttons and it lights up as expected (drawable state list defines focus & click states).

Now I want this complex layout to behave as a unified button. I set

android:clickable="true" and android:focusable="true"

in the top-level layout. In all the sub-components I set

android:duplicateParentState="true" android:clickable="false" android:focusable="false". 

With this I get the expected behavior for touch cases- I touch the layout anywhere and all the contained components light up. However, focus does not work. Rolling the trackball now completely ignores the complex button.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:07:33+00:00Added an answer on May 24, 2026 at 9:07 am

    It seems that you’ve done everything right with android:clicable and android:focusable flags. This logic should work. Try to explicitly declare the order of focus selection with android:nextFocus options.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a complex WPF UserControl made of other ContentControl templates which contain sets
I will have a web-application which will use a few complex forms. One form
I am using WCF and REST, and I have complex types, which are working
I have some complex stored procedures that may return many thousands of rows, and
I have a 'complex item' that is in XML, Then a 'workitem' (in xml)
I have a somewhat complex custom user control, created in C# .NET, which is
I have a windows application which has a complex GUI that I would like
I have a page with user controls getting dynamically added. Inside some of these
I have a fairly complex problem. I have read some similar posts to my
I have a program complete with a number of classes which create complex objects,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.