Questions tagged [android-viewgroup]

A ViewGroup is a special view that can contain other views, called children. The view group is the base class for layouts and views containers

223 questions
6
votes
2 answers

Invisible views detection on motion event

As i already tried views with motion drag reading Android docs. I have clearly not saying about basics of it but i want to hide orinvisible view which will be visible when other view which is being dragged or using motion can taken to the hidden…
6
votes
1 answer

Error inflating class android.view.ViewGroup

I am trying to write a custom view for checkboxPreferences. I have:
Malvinka
  • 1,185
  • 1
  • 15
  • 36
5
votes
3 answers

MODIFY the view hierarchy of another app with an Accessibility Service

It is common knowledge that we can observe or query the view hierarchy of any app with an AccessibilityService: Create your own accessibility service. It is also possible to perform actions on behalf of the user: Developing an Accessibility Service…
5
votes
1 answer

Custom ViewGroup with children inserted at specific spot

I have several Activities in my Android app that have the same basic structure, and I'm trying to make my layouts DRY. The duplicated code looks like the below. It contains a scrollable area with a footer that has "Back" and "Dashboard" links. …
pbristow
  • 1,997
  • 4
  • 26
  • 46
5
votes
1 answer

Android Compound View: cannot make child view match parent

I have created a custom view (compound view) that is inherited from FrameLayout and contains several child views in it: MediaComponentView.java: final public class MediaComponentView extends FrameLayout { private int ratio = 1; private…
5
votes
2 answers

how to detect the secondary finger on touching the screen not at same time in android touchlistener?

How to detect an additional finger on the screen? E.g. I touch the screen using one finger and after sometime I keep the first finger on screen and then touch the screen using other finger while keeping first finger as it is? How to detect the…
5
votes
1 answer

Application throws java.lang.StackOverflowError Exception in Activity

I am working on one Android application. in my one activity i am using PullToRefreshListView. sometime i am getting java.lang.StackOverflowError Exception on my activity. i have tried to fix it and i also searched on google too but not getting…
Ajay
  • 1,189
  • 1
  • 12
  • 28
4
votes
2 answers

How can ExpandableListView's default list item press behavior be preserved when supplying a group view that contains more than just a TextView?

Is it possible to preserve ExpandableListView's default list item press behavior when supplying a group view that contains more than just a TextView. The behavior I'm referring to is where the item being pressed changes background color to yellow.…
Julian A.
  • 10,928
  • 16
  • 67
  • 107
4
votes
0 answers

What ways can hasOverlappingRendering result in faulty rendering?

From Google's video on transparency performance, it points out that if you override hasOverlappingRendering() to return false, it tells the renderer to avoid hardware layers which saves on drawing costs. However it says if we misuse it and have it…
David Liu
  • 9,426
  • 5
  • 40
  • 63
4
votes
0 answers

How to pass touch event from parent view to child view

I am writing an code to handle touch event based on what suggested here. Basically I wanted to pass touch event back to child view from parent view. Following what I did and remaining. What I need Detect multitouch event on child view: DONE then…
CoDe
  • 11,056
  • 14
  • 90
  • 197
3
votes
0 answers

Keeping ViewPager elements all the same max height

I have a viewpager (in a CardView) that swipes between 4 different items. These pages are relatively the same layout and close in height (same width) however there are instances where one child has extra lines of text which bumps the cardview size…
3
votes
0 answers

How to drop a view on to another view inside a ViewGroup?

I have an Activity with one big ImageView in the center that I can drag onto another 4 smaller views. The small views are aligned to the bottom of the screen and they must be centered horizontally, that's why they have to be inside a ViewGroup (in…
josemigallas
  • 3,761
  • 1
  • 29
  • 68
3
votes
1 answer

Can't add views to ViewGroups added programmatically

I can't add child views to a ViewGroup that I added programmatically. First I create a GroupView (_view) and add it to the Background RelativeLayout (_root) like this... _view = new ViewGroup(MainActivity.this) { …
Axonshi 123
  • 123
  • 2
  • 10
3
votes
1 answer

Is it possible to detect View click if it is drawn outside of it's parent?

I have a RelativeLayout with clipChildren="false". Then I have a view inside of it which has marginTop="-50dp". So 50dp of the View inside RelativeLayout is actually drawn outside of RelativeLayout. Now the problem is that the 50dp that is outside…
Guy
  • 6,414
  • 19
  • 66
  • 136
3
votes
2 answers

Which view should I use to show a small square containing only a background color, to show a color preview?

I want to display a color for the user to preview. Which View should I use? I want a small square of, say, 100dp.
Solace
  • 8,612
  • 22
  • 95
  • 183
1
2
3
14 15