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

How to have multiple layouts in one activity in android?

What i want in my activity is two buttons on the top in one single line.. and below that i want a framelayout in which i want an imageview and i wil add my custom view on the top of imageview. I tried a lot but i am having a lot of confusion.…
0
votes
4 answers

Make button be less visible but not gone

A couple of weeks ago I think I read something about makeing a Button or any other View group a bit faded or less visible to show that it is not in use, but can be used if the user does something. Now I can not find it anywhere, and I really want to…
Magakahn
  • 498
  • 9
  • 31
0
votes
1 answer

Android: Having trouble getting View in a ViewGroup used to create ListView row layouts

I have a ListView with a custom layout for the rows (list items) and the list is being populated with an adapter as usual. In this custom layout, I've added an ImageView and TextView (so there's an icon to match the text). I'm unable to get the…
0
votes
2 answers

how remove view in android

When the view is removed, errors occurred, I can not find the cause of the errors: **java:** package com.test; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.view.View; import…
0
votes
2 answers

Android transfer animation of view in custom viewgroup

I want animation like expanding of the photos when I click folder of photos at gallery, like in this video about Android gallery. i have two views in same custom viewgroup view1 is in 0,0 view2 is in 100,100 since click "start" view1 will move to…
eyeeye
  • 26
  • 1
  • 6
0
votes
3 answers

How to add a layout with the click of button and id each element

Here is my image How can i add a new layout PROGRAMATICALLY(with a button and an EditText)on CLICK of a '+' button and set a unique id for each child(like in the pic).
jaisonDavis
  • 1,407
  • 2
  • 22
  • 36
0
votes
2 answers

Android, How to get Width and Height of ViewGroup?

In my app I need to know what is the size of main container of activity. I have written following code: Button btnActionMenu = (Button) findViewById(R.id.actionbar_menu); btnActionMenu.setOnClickListener(new OnClickListener() { …
Hesam
  • 52,260
  • 74
  • 224
  • 365
0
votes
2 answers

how to dynamically create view group?

I have a list view. I want to add footer. So i create a footer xml
Alan Lai
  • 1,094
  • 7
  • 18
  • 41
0
votes
1 answer

Can we set RelativeLayout or LinearLayout logic in ViewGroup derived class?

I have an abstract class ClassA which derives from ViewGroup. I would like to extend ClassA to these class : ClassB with LinearLayout layout logic ClassC with RelativeLayout layout logic Is this possible ? I didn't found how to implement default…
olivier_sdg
  • 1,538
  • 1
  • 10
  • 10
0
votes
1 answer

Dynamically setting bg image with viewgroup.layoutparams

I have a grid view that I reuse a few times in an app. Separate activities drive what data appears. I would like to set different bg images for each activity. What I would like to do is avoid creating multiple layouts by using…
John Stack
  • 618
  • 1
  • 4
  • 19
0
votes
1 answer

Referencing ViewGroup in android

I want to slide down a Relative layout in android withen an activity. I have the following function that slides down a layout: public void setLayoutAnim_slidedown(ViewGroup panel, Context ctx) { AnimationSet set = new AnimationSet(true); …
Developer
  • 1,803
  • 2
  • 15
  • 26
0
votes
1 answer

Scroll/Panning or drag in custom layout

I have made custom Relative Layout for Zooming with lot of research since I am new to Android and now I want to incorporate the panning/dragging which should behave like Imageview, that is, bound limits. I am not using a matrix but the…
user1169079
  • 3,053
  • 5
  • 42
  • 71
0
votes
1 answer

Are there any rules regarding the use of arbitrary integer id's for android controls?

I am writing an app that stores a series of controls in a database to be drawn on the screen at run time. I would like to assign the database ID as the control ID to make it easier to link any given control to its database record. Do control ID's…
cstrutton
  • 5,667
  • 3
  • 25
  • 32
-1
votes
1 answer

Android VIewGroup handle touch, child handle click

I have i custom ViewPager that detects taps, long press and long press up events with a GestureDetector. It also allows to wipe ViewPager. Gesture listener is simple: private inner class GestureListener : GestureDetector.SimpleOnGestureListener()…
TooLazy
  • 836
  • 4
  • 11
  • 29
-1
votes
1 answer

Is RecyclerView a ViewGroup?

Is RecyclerView is a ViewGroup? As in the below code, I am using onInterceptTouchEvent which is used with ViewGroups only and as I am implementing this with recyclerView, is RecyclerView is a ViewGroup? if not then what is the ViewGroup on which I…
1 2 3
33
34