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

  • SEARCH
  • Home
  • 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 9123069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:15:02+00:00 2026-06-17T06:15:02+00:00

I have 2 attributes (amongst many others) in a styleable in attrs.xml. Given these

  • 0

I have 2 attributes (amongst many others) in a styleable in attrs.xml.

Given these two:

 <attr name="enableScrolling" format="boolean"/>
 <attr name="showPadlock" format="boolean"/>

Is there any way to make them mutually exclusive? The design is for a generic scale to display alongside a graph. The specific use case for an instance of the generic scale is that if scrolling is enabled, the scale displays a padlock icon which toggles between locked and unlocked and disables/enables the scrolling at runtime.

Showing the padlock is not meaningful if enableScrolling is false. I deal with this in code but it would be much cleaner if I could somehow convey the semantics in XML.

I’m guessing that the answer is no since there is no UX paradigm in the IDE to deal with it but I welcome any thoughts.

Thanks.

  • 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-06-17T06:15:03+00:00Added an answer on June 17, 2026 at 6:15 am

    You have 3 ways:

    • just ignore showPadlock if it has no sense
    • check attributes in code. Show warning message or throw an exception if you notice invalid combination.
    • create enum attr. For instance:

      <attr name=”scrollType”>

      <enum name=”simpleScroll” value=”1″ />

      <enum name=”scrollWithPadlock” value=”2″ />

      <enum name=”none” value=”3″ />

      </attr>

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

Sidebar

Related Questions

My script is here : jsfiddle i have two attributes in my form that
I have a table that has two different many-to-many relations to two different tables.
I have attributes which denotes 5 px, 8px 6em and possible some others which
I have a abstract class called Customer which has some attributes shared amongst all
I want to Create an XML using JAXB. It should have attributes in it
In my project, I have, amongst many other things, to call a c++ method
Suppose we have a MBean that has the following attributes and operations. Attributes: name
I have 2 attributes that I use within the controllers of my MVC application.
I have quite a lot of music files but their title attributes have the
I have a component with a number of properties that have various attributes Normally

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.