Questions tagged [viewgroup]

ViewGroup is a subclass of the Android View class(parent of all Android graphical widgets) which can contain child views.

ViewGroup is the base class for all Android layouts and views containers. This class is designed to be extended so the user can implement his own layout(which arranges the children following the desired logic, one not covered by the standards layouts) or a new view container. More information about the ViewGroup class can be found at the links below:

503 questions
8
votes
1 answer

Views within a Custom ViewGroup are not showing

I have recently delved into creating custom ViewGroups and have encountered a problem I can't figure out. I have 2 ViewGroups - ViewManager and Article ViewManager simply lays out an Article below the previous Article (ie like a vertical…
triggs
  • 5,890
  • 3
  • 32
  • 31
8
votes
3 answers

How does one Animate Layout properties of ViewGroups?

I have the following layout:
i_am_jorf
  • 53,608
  • 15
  • 131
  • 222
8
votes
1 answer

Android: getChildDrawingOrder() returned invalid index 1 (child count is 1)

This is the stacktrace: Fatal Exception: java.lang.IndexOutOfBoundsException: getChildDrawingOrder() returned invalid index 1 (child count is 1) at android.view.ViewGroup.getAndVerifyPreorderedIndex(ViewGroup.java:1988) at…
Roudi
  • 1,249
  • 2
  • 12
  • 26
8
votes
4 answers

removeView not working after LayoutInflater.inflate(resource, root, true)

I add and remove a view dynamically to a custom view (FrameLayout) doing this: LayoutInflater inflater = (LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); mMyView = inflater.inflate(resId, this, true); Later on I try…
Emanuel Moecklin
  • 28,488
  • 11
  • 69
  • 85
8
votes
1 answer

Secret Android build process

The Android (Open Source Project) native launcher source code seems to be missing the following required XML layout parameters in some of its published resource files: layout_height and layout_width Missing attributes AppsCustomizeTabHost in…
Cel
  • 6,467
  • 8
  • 75
  • 110
8
votes
2 answers

move Android fragment to a different container Can't change container ID of fragment

Here is what I would like my application to do on a tablet. Fragment (0) has some menu that would display fragments (1)...(n) like this: ----------------- | | | | | | | | | | |(0)| X | X | X | | | | | | | | | | …
Matthieu
  • 16,103
  • 10
  • 59
  • 86
8
votes
5 answers

Android ViewGroup.setScaleX() cause the view to be clipped

I use NineOldAndroids library to scale my custom layout. public class MyLayout extends FrameLayout { // LayoutParams.MATCH_PARENT and all. ... @Override public boolean setPositionAndScale(ViewGroup v, PositionAndScale pas, PointInfo pi) { …
user802421
  • 7,465
  • 5
  • 40
  • 63
8
votes
4 answers

android on view removed from parent

on a child layout (View) is there a callback for when the view is removed from it's parent? I need to recycle some images when the view is done. I've been looking around on the web for what to do, but haven't found anything helpful yet.
Jacksonkr
  • 31,583
  • 39
  • 180
  • 284
7
votes
3 answers

Android StackOverflowError in ViewGroup.resetResolvedTextDirection

I just went to android market to publish an update to my app and noticed there a few new errors reported from existing installs. While I can understand (and attempt to do something about) most of them, this one leaves me rather…
Aleks G
  • 56,435
  • 29
  • 168
  • 265
7
votes
2 answers

Implement Drag & Drop in Gingerbread

I need to know how I can implement Drag & Drop in Android for the Gingerbread version. As I know Gingerbread doesn't support that by default. What I have coded: a ViewGroup class to hold dynamic added child, each child should after a long click be…
7
votes
1 answer

onMeasure not getting called in my custom viewgroup android

Im having two custom viewgroups, superViewGroup and subViewGroup. The subviewgroup contains views. Im adding my superviewgroup to a linearLayout and the subViewGroups to my superviewgroup. The superviewgroup onMeasure() is getting called but not in…
srinivasan
  • 685
  • 9
  • 18
7
votes
3 answers

How to create a Button that contains multiple Views?

On Android, I would like to create a button that contains some other Views. For example, something like this: +---------------------------+ | Hello world! +-------+ | | | image | | | Some more info +-------+…
Thomas
  • 174,939
  • 50
  • 355
  • 478
7
votes
3 answers

How to handle click in the child Views, and touch in the parent ViewGroups?

In my layout I have a structure like that: --RelativeLayout | --FrameLayout | --Button, EditText... I want to handle touch events in the RelativeLayout and in the FrameLayout, so I set the onTouchListener in these two view groups. But…
androidevil
  • 9,011
  • 14
  • 41
  • 79
7
votes
1 answer

Android - Image Warp effect

In my android application, i want to apply image warp effect provided in Photo Warp and Photo Deformer application. For that i used BitmapMesh. The problem is that, it's not saving warped image. Whenever i touch image, it refresh the image and…
Zankhna
  • 4,570
  • 9
  • 62
  • 103
7
votes
5 answers

How to Get the index of particular(custom) view from ViewGroup (FrameLayout) after doing onLongClick on the View

Can someone help me with my Syntax? I am dynamically adding some views(custom view) to a FrameLayout that is already defined in XML. those custom view's are different type or same type. I'm able to add views to the screen but unable delete a…
RajaReddy PolamReddy
  • 22,428
  • 19
  • 115
  • 166
1 2
3
33 34