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
2
votes
3 answers

Is it possible to draw View or ViewGroup inside GLSurfaceView

Is it possible to draw any view inside bounded region inside GLSurfaceView or SurfaceView? At the moment my GLSurfaceView is filled with Bitmap textures. I want to achieve something like this +---------------------------------+ | …
Regs
  • 119
  • 1
  • 7
2
votes
2 answers

Select only one children in custom layout per time

I'm stuck with this: I have a ViewGroup that hosts few Views. All Views has layout parameters: match_parent/match_parent. Views can be placed one over another like on the picture. On touch event View should be selected (if tap happend over its…
ab.helly
  • 517
  • 1
  • 5
  • 21
2
votes
3 answers

cannot add inflated view to custom viewgroup

I have been trying to inflate views from xml to their corresponding view objects, then add these view objects to a programmed viewgroup. However, whenever I call myviewgroup.addView(childview), the childview seems to lose all the buttons and things…
Isaac
  • 323
  • 4
  • 14
2
votes
3 answers

Layout, adding views into a viewgroup, and having them shown on lines so no scroll is needed

I have tried RelativeLayout and LinearLayout, havnt figured out on any of them. I have a number of views(EditText) 5-10, some of them are enabled, some arn't. What i want is to have them all displayed. First should be placed topleft, then they…
Anders Metnik
  • 6,096
  • 7
  • 40
  • 79
2
votes
1 answer

Why the touch event on the child of my ViewGroup does'nt work?

Here is my code - PadsGrid is a ViewGroup - : public class Emc_PadControllerActivity extends Activity implements OnTouchListener { /** Called when the activity is first created. */ @Override public void onCreate(Bundle…
nonozor
  • 865
  • 2
  • 14
  • 24
1
vote
1 answer

trying to display a different menu

I'm trying to make my menu appear from the right of the screen like in the facebook app, I had tried to build a custom view group to do so but I have trouble with it when refreshing the content that I explained several times in that forum and I…
Renaud Favier
  • 391
  • 6
  • 20
1
vote
0 answers

Resized ImageView in a ViewGroup is not displayed well

I have a Customised viewgroup and customized imageViews in it. Using that I can slide from one imageview to another image view in fling gesture. When scaled ImageView using pinch zoom, some how it is zooming but space according to its zooming is not…
Sreedev
  • 6,563
  • 5
  • 43
  • 66
1
vote
0 answers

Custom Android ViewGroup Forcecloses

So I was basically searching around for a custom ViewGroup that could side-scroll and lock into place, and found one here: https://github.com/ysamlan/horizontalpager/tree/master/src/com/github/ysamlan/horizontalpager Afterwards, I proceeded to edit…
Elias Wu
  • 71
  • 7
1
vote
1 answer

How Do I Set My View LayoutParams Width Smaller?

Hi I am borrowing Seth's method found here to animate my viewGroups. It works great but in the wrong direction - This is my first time using/extending the Animation class and I cant figure how to decrease the size of my view -This expands it. Below…
user742030
1
vote
1 answer

Layout parameters don't apply when inflating content from layout XML on custom ViewGroup

I'm using the LayoutInflater to add a layout into a custom ViewGroup (not a subclass of ...Layout but a simple ViewGroup). After a short battle with it, and after implementing all that was said in this post, I managed to make the content to finally…
Igor K.
  • 750
  • 9
  • 25
1
vote
2 answers

How to add a bitmap to a view, then add that view to a viewgroup

Maybe a simple question but i have an activity that retrieves a bitmap(camerashot) from a folder on the sdcard. The activity's custom view extends viewgroup. i'd like to add the bitmap to the view then add that view to the view group then display.…
turtleboy
  • 8,210
  • 27
  • 100
  • 199
1
vote
0 answers

Android LayoutInflater fails quietly for LinearLayout

I'm using a LayoutInflater to retrieve a view from the resources, then insert it into a programmaticly constructed custom ViewGroup. It works fine when the resource contains only a TextView. But when the resource contains a LinearLayout it fails…
Guy Smith
  • 178
  • 1
  • 12
1
vote
1 answer

Re drawing a view on orientation change

I am using aTextView in a ViewGroup and I am using that ViewGroup to create a gallery like scrollable UI. The TextView has its entire background filled with a single color. All is working fine except that when I change my orientation from portrait…
1
vote
1 answer

Android: using onTouchEvent with a custom view in a custom viewgroup

I have a custom view which I call "Node" that is a child of a custom ViewGroup called "NodeGrid". The "NodeGrid" class more specifically extends RelativeLayout. I have the following code snippet in my custom view class ("Node"): private boolean…
David
  • 1,847
  • 4
  • 26
  • 35
1
vote
1 answer

At what point are all Viewgroup children created and ready to set some initial properties?

I am working on a custom ViewGroup that extends LinearLayout but only accepts children of a particular subclass. At the first possible moment I have the opportunity, I want to set some properties on the children (things like their index etc). In…
Arpit
  • 2,207
  • 1
  • 18
  • 29