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
0
votes
1 answer

Detecting which View was tapped, after animating its position

I have a ScrollView which contains a RelativeLayout. The RelativeLayout contains some other viewgroups which are initially all positioned in the same place (On top of one another). A swipe down gesture pushes these viewgroups down so that the top…
Matt Fellows
  • 6,512
  • 4
  • 35
  • 57
0
votes
1 answer

Android: ViewGroup Overlapping When Adding Children within Activity

My situation is as follows: In my layout xml, I have a general LinearLayout serving as a master container and I want to populate the contents based on a paging system all contained within the single activity. My Java Code is as follows: private void…
0
votes
1 answer

irregular / custom shaped ImageButton for Android

I'd like to create irregularly shaped image buttons for Android, based on the transparent areas of the button image. Basically, if you click on the transparent area of a button, instead of handling the event, it should propagate it 'down' to the…
0
votes
1 answer

How to add subView to ViewGroup using RelativeLayout.LayoutParams

I wrote a class that extends ViewGroup and override the method as follow: @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); for(int index = 0; index <…
MuziLee
  • 27
  • 6
0
votes
1 answer

Android - Removing and adding views won't work after change of screen orientation?

i have experienced some strange behavior of my dynamically added views after screen orientation change. I really would appreciate some help here... I have a base layout for my activity, which is a LinearLayout that contains a ScrollView and a…
sk00p
  • 21
  • 3
0
votes
2 answers

Android - LinearLayout not adding custom view

NOTICE: THIS QUESTION HAS BEEN RESOLVED DUE TO ME CATCHING MY OWN STUPIDITY I want to add a custom class to a LinearLayout, but for some reason I keep getting a NullPointerException. Here is the method that deals with the addition: protected void…
Jeeter
  • 5,887
  • 6
  • 44
  • 67
0
votes
1 answer

Drag and drop between views

I have a viewgroup with textviews that are added dynamically into the viewgroup. How would I add the ability to drag and drop a textview between other textviews. Is there a way to detect what view you have dropped it over. If it makes it easier the…
Reg
  • 741
  • 2
  • 9
  • 24
0
votes
0 answers

Android ViewGroup ticker

I am developing an Android component that has the same functionality as a news Ticker. It's a ViewGroup that takes an array of Views and animate them to create the effect of a Ticker. I have implemented the onMeasure and onLayout methods, and I have…
kristoffz
  • 129
  • 1
  • 8
0
votes
3 answers

Android colored view containing textviews

Ive made a program which has a view in the top op the window (right under the title bar). According to what is goin on in the program, the color of the view will change. This works just fine. Now my problem is: I want 2 textviews inside it, next to…
user1285334
  • 309
  • 3
  • 13
0
votes
1 answer

Managing a list item of ListView

I created a custom ListView. Each item in the list have one imageView and two TextView. The code is: public class PersonalList extends ListActivity{ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); …
GVillani82
  • 17,196
  • 30
  • 105
  • 172
0
votes
2 answers

ViewPager Inside Fragment that is part of tabs in FragmentActivity

I'm trying to build something that I'm not sure if it's possible. I have Fragment tabs (using FragmentActivity, TabHost and TabWidget as my fragment tabs container) and in each of the fragments I want to have, as top bar, another fragments. You can…
Nativ
  • 3,092
  • 6
  • 38
  • 69
0
votes
1 answer

releasing surfaceview

I have a custom ViewGroup that contains about 10 SurfaceView's. When you push a button a xml file gets parsed and a skin gets generated which contains 10 more surface views. These then get added to the view group, the view group gets invalidated,…
0
votes
1 answer

Copying Contents of One ViewGroup to Another

Hi I need to get a duplicate of a ViewGroup but not with the exact same location by sort of copying and pasting a ViewGroup. So I tried to do this and this is the result: public void ViewGroupCopy(ViewGroup source,int sourceOffset,ViewGroup…
Tanuj Nayak
  • 607
  • 1
  • 8
  • 22
0
votes
2 answers

Custom View not respond very well on touch events

I have a custom grid which extends ViewGroup and I have the next onLayout and measureChildrenSizes methods: @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { // .. tileSide calcultion .. …
Alpha75
  • 2,140
  • 1
  • 26
  • 49
0
votes
1 answer

Children not setting layout_width/-height in custom ViewGroup

I made a custom ViewGroup which kinda works except that when I drag&drop views to this ViewGroup, editor says it cannot set layout_width and layout_height to children. What could be causing it? I have overriden two methods only - onLayout and…
Pijusn
  • 11,025
  • 7
  • 57
  • 76