Top "Android-view" questions

Questions regarding Views in Android.

Creating RadioGroup programmatically

I'm getting an Error while working with the following code Error: The specified child already has a parent you must …

android android-view android-radiobutton android-radiogroup
Android onClick method doesn't work on a custom view

I've started working on an app. I build the menu yesterday but the onClick method doesn't work! I created a …

android android-view android-custom-view
What is the difference between the states selected, checked and activated in Android?

I'd like to know what differs those states. I didn't find any webpage clarifying this.

android android-view selected checked
Why isn't there a getContentView() method for Activity?

The Activity class has a setContentView() method. The PopupWindow Class has a getContentView() method but nothing else does. Is there …

android android-layout android-view
What is the benefit of using Fragments in Android, rather than Views?

When developing for Android, you can set your target (or minimum) sdk to 4 (API 1.6) and add the android compatibility package (…

android android-fragments android-view android-lifecycle software-design
How can you tell if a View is visible on screen in Android?

I want to check if a View within a ScrollView is currently visible in Android. I am not checking if …

android android-view android-scrollview visible
how to set width which is equal to another widget on android

I need to draw a horizontal line below a text field such that the width of the line equals the …

android android-layout android-widget android-view
Custom view ... overrides onTouchEvent but not performClick

I get this warning (from the question title) in a custom Android view I am developing. Why do I get …

java android android-view android-custom-view
Same-named attributes in attrs.xml for custom view

I'm writing a few custom views which share some same-named attributes. In their respective <declare-styleable> section in attrs.…

android android-view android-custom-view android-custom-attributes
Refreshing a view inside a fragment

I have searched the numerous questions that look like this one, but haven't found my answer in any of them. …

java android android-fragments android-view android-loadermanager