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
1
vote
1 answer

How can you draw custom ViewGroup in Android (API Level 23+) and outside of that ViewGroup should be still accessible?

I am working on a project where I need to do mainly 4 stuff: Get screen source Find out on which button/text/image user has clicked Draw the red rectangle around that object. Repeat So, what I have achievid so far. to get the screen source, I am…
1
vote
3 answers

How to align in center of a space using constraint layout

I have the following layout file that uses a ConstraintLayout
1
vote
1 answer

How to delete a single View inside a ScrollView

I have a ScrollView inside my activity, to which Views are added during runtime. Basically, when the player defines his name and gender (and names and genders of other players) and then clicks the plus button, then three elements are added to a…
1
vote
1 answer

how to create a family tree structure? in flutter

How to create a family tree structure in Android? I already tried different types of tree structures but I can't find anything like this type of design structure, any idea about creating this type of tree structure? I am currently using Team-Blox…
balboa
  • 27
  • 1
  • 4
1
vote
2 answers

Implementing of Apple watch board UI for Android

I need implement a custom ViewGroup which seems like Apple Watch home screen with bubbles (there's a screenshot below) The ViewGroup has to be scrollable in both directions and its children have to change their scale in depend of how close to the…
Oleg Ryabtsev
  • 457
  • 2
  • 9
  • 24
1
vote
1 answer

getChildCount() always returning 1 even after using addView

I am designing a simple calculator with history feature. All the previous results are stored in form of text view and are added to linear layout using addView(childview). The problem is that even after adding textviews to linear layout,…
1
vote
1 answer

How to locate the Android ViewGroup element?

There is a calendar layout hierarchy. I'd like to locate each element in the ViewGroup. I can achieve it by hardcoding the Whole XPath, apparently it's quite un-efficient. Is there any better approach to do this? Screenshot and the Hierarchy are…
Almett
  • 876
  • 2
  • 11
  • 34
1
vote
0 answers

set margin to a custom view group item view liked edittext

I am trying to create a custom view group and created it successfully but unable to set margin to an child of viewgroup like editext Following is my code, import android.content.Context; import android.support.annotation.NonNull; import…
1
vote
1 answer

Is it possible to enable touch events for a View inside a ViewGroup but outside its bounds?

I'm currently trying to design a ViewGroup (specifically a subclass of FrameLayout) that can layout any number of subviews and enable them for drag/drop outside the layout group. It's almost identical to a LinearLayout: Curently I am able to drag…
1
vote
0 answers

samsung phone inputmethodservice onScreenStateChanged crash

Unable to detect the cause of crash, this crash only occur on samsung devices java.lang.NullPointerException: at android.inputmethodservice.ExtractEditText.onScreenStateChanged (ExtractEditText.java:246) at…
1
vote
0 answers

In android, what can I use for a root element (View, ViewGroup, etc.) of my custom control which only allows a single child?

Trying to write better-encapsulated custom views and composite controls. The old way I would do this was to subclass a ViewGroup such as LinearLayout, like so... public class RadioButton extends LinearLayout { private RadioButtonView…
Mark A. Donohoe
  • 28,442
  • 25
  • 137
  • 286
1
vote
0 answers

What is the use of state bits(most significant 8 bits) in the measured width/height ?

The most significant 8 bits of the measured width/height integer is allotted for measured state. In those state bits 1 bit is used to identify if the measured width/height is too small. Can anyone explain whether there are more uses with those…
1
vote
1 answer

My Toolbar compound view doesn't align with parent view group properly

I am in need of a custom toolbar for a new app that I am writing. When I try to add the view to my main layout it doesn't align properly. Can someone please explain why? public class LjCustomToolbar extends Toolbar { private Context…
1
vote
1 answer

Custom dashboard buttons text positioning

I have implemented my dashboard that is extending ViewGroup using code below. But the result does not displayed as I expected. Dashboard has the buttons as its children views that are properly displayed but the text inside of buttons has an abnormal…
1
vote
1 answer

is it possible to add view programatically without remove parent view ?

i want to reuse my videoview to another fragment but for that i need to remove videoview first, from parent view then i can add view,but i want to reuse videoview in another fragment without removing it from parent view.is it possible ? if…
Nitin
  • 79
  • 1
  • 10