All Questions
Tagged with android-framelayout view
40 questions
0
votes
2
answers
1k
views
How to place correctly two views in a framelayout?
I am trying to get this design:
But my problem is that i can't get to place the red view exacly like in the photo above.
For now I'm using a framelayout but I still can't get the desire design.
Xml:
...
0
votes
1
answer
1k
views
How to insert a layout into another frameLayout?
I am trying to insert a resource layout into a frame layout but failed. The frame layout is in activity_main.xml
My frame layout is (frame_result_contact.xml):
<FrameLayout
android:layout_width=...
-1
votes
1
answer
473
views
How to get XY coordinates of FrameLayout in Android?
I am trying to get coordinates of frame layout present in my screen in android.
I tried getLocationOnScreen but it is giving me 0. How to get the right value?
int[] location = new int[2];
...
0
votes
1
answer
62
views
Android : Focus on a view much like selecting a layer in photoshop
Say I have the following layout :
<FrameLayout>
<Button>
<ImageView
android:height="match_parent"
android:width="match_parent"/>
</FrameLayout>
ImageView ...
0
votes
0
answers
474
views
Converting FrameLayout to Video?
In my Framelayout I have an ImageView and TextView and I was able to convert the FrameLayout into a Bitmap and Save it by using the following snippet code
Bitmap bitmap = Bitmap.createBitmap(...
1
vote
0
answers
284
views
View Order of Framelayout
Here is the sample code:
FrameLayout Root = new FrameLayout(this);
this.addContentView(Root, LayoutParam0);
setContentView(this);
GLSurfaceView gls = new GLSurfaceView(this);
Root.addView(gls,0, ...
0
votes
0
answers
400
views
The size of the FrameLayout's child is larger than its parent
The problem is my FrameLayout's child draw and show larger than its parent, Through seeing the source code of FrameLayout, I still have no idea about the reason, If anyone knows solution or other ...
1
vote
1
answer
1k
views
Is ViewGroup with id android.R.id.content always FrameLayout?
In my activity I get a root view by code:
ViewGroup root = findViewById(android.R.id.content);
Debugger shows me that root variable is instance of FrameLayout.
My Question is: "Android guarantees to ...
0
votes
1
answer
955
views
Can't refresh FrameLayout?
I'm starting my studies about Android development and I can't refresh my app's FrameLayout correctly.
This FrameLayout (panelA) is holding a StreetViewPanorama fragment and every time after I remove ...
1
vote
2
answers
460
views
How to disable the listener and input on First view FrameLayout
I have Two children on a FrameLayout, a view pager and a backround view
I add the background view as a second child , so it's supposed to be on top of my view pager.
The problem is I can still scroll ...
-1
votes
1
answer
43
views
Position a particular view
I am using a frameLayout and adding that to a viewgroup that already consists of a list view. Now the problem that arise is that the frameview is settled a bottom. I want it to come down at the bottom....
0
votes
1
answer
1k
views
Adding a view inside a view
I am trying to make a music player and I am stuck at this problem for about a day.
So what I am doing is that I am following a tutorial. In that we use a class called MediaController which is used to ...
0
votes
0
answers
327
views
Foreground Drawable doesn't cover entire View
I am using a FrameLayout with a ColorDrawable foreground. Most of the time it works fine, but occasionally the colour doesn't fill the entire View. It seems to remember the heights of other views.
...
0
votes
1
answer
132
views
Bring view to the front prprogrammaticly
I am using a frameLayout and trying to bring a view on another view programmaticly, when an imageButton is clicked. I use Frame Layout because I have been told that it allows you to put view on each ...
0
votes
1
answer
392
views
Android Radial Menu Clipping
I have implemented the radial menu library from here: https://code.google.com/p/radial-menu-widget/downloads/list.
I use the menu inside of a FrameLayout where I show a WebView with a map. If I click ...
0
votes
1
answer
40
views
Adding CameraInstance() to view
Trying to add the feed from the phone camera to a view so I can display it. I've been following a tutorial and have solved all the other issues except this one. This is the code in question:
private ...
0
votes
0
answers
59
views
Android Change image without a drawable
I have a fragment that has a list of text views and buttons. There is an image button that when clicked allows me to select a picture. I want to change the image in the button to match the picture ...
1
vote
0
answers
619
views
How to update a FrameLayout with a AlertDialog open?
I need to update a text View and turn it visible with the text inputed on an AlertDialog, the problem is, after update and change from GONE to VISIBLE I want to save my FrameLayout as image, and share ...
1
vote
2
answers
1k
views
Resize parent to match its child
I have a complex xml layout with part of it being:
...
<FrameLayout
android:id="@+id/parent"
android:layout_width="match_parent"
android:layout_height="0dp"
...
1
vote
0
answers
46
views
Android Alignment
I have android layout issue
<FrameLayout android:layout_marginLeft="140dp" android:layout_marginTop="670dp" android:layout_width="1000dp" android:layout_height="707dp" android:id="@+id/home" ...
0
votes
1
answer
502
views
Two view at same spot, with same height and width in XML
In my widget I've an image of a refresh icon and circular progress bar (CPB) that is showed when the refresh icon is pressed (obviously only one view can be showed in the same time).
The CPB is too ...
0
votes
2
answers
3k
views
display a child view of frame layout at the front
I want to change the view layer of a FrameLayout, and I try to call bringToFront() method. It does not work. Then, I tried to setVisibility(View.GONE) and setVisibility(View.VISIBLE). Again, it does ...
0
votes
1
answer
68
views
Why isn't the listener set properly in this case
In my activity, I display a camera preview and a button (a view that looks like a button) that I draw over it. The problem is that when I set the click listener on that View, no matter where I click ...
-3
votes
1
answer
288
views
How to scroll menu from left to right and vice versa in android [closed]
Hi Can u please tell how to move menu bars from left to right or right to left
Thanks in advance
0
votes
1
answer
3k
views
android custom view ondraw, get bitmap from canvas?
So I seem to have a conundrum. I need to add multiple custom views to a framelayout. The code for this is working just fine. However, I wish to access the underlying bitmap that the canvas uses in the ...
1
vote
2
answers
636
views
getParent returns wrong ViewGroup
When execute code below I can verify in my LogCat that getParent returns an other ViewGroup then FrameLayout (It returns LinearLayout). Normally I would expect that getParent would return the ...
0
votes
0
answers
183
views
How to drag a View to show another one that was underneath
How could I drag (only vertical down) my entire root view to show another one that it's suppose to be underneath? I need something similar to Android Notifications Bar behaviour that, when you drag it,...
16
votes
3
answers
34k
views
How to set foreground attribute to other non FrameLayout view
I would like to know how to apply or emulate foreground effect in a view different from FrameLayout, as LinearLayout or RelativeLayout
This is what I have now:
<?xml version="1.0" encoding="utf-8"...
5
votes
1
answer
19k
views
How to redraw canvas in a view from activity
I have a class that extends View and have the onDraw method implemented
in my xml file I have a FrameLayout with my view and a RelativeLayout with a button
<?xml version="1.0" encoding="utf-8"?&...
0
votes
1
answer
594
views
How can I dynamically add Views that use XML Layouts to the ContentView?
Within my main Activity, I create a FrameLayout with child Views and set it as the ContentView. Now, staying within the same Activity, after onCreate() has executed fully, I need to be able to add ...
2
votes
0
answers
2k
views
Visibility trouble with framelayout children
I have a problem with the children of my FrameLayout when I change their visibility dynamically :
The FrameLayout is composed with a simple ScrollView that is allways visible and a RelativeLayout ...
5
votes
2
answers
11k
views
How to programmatically adjust z order of Views
The below code is my attempt to send mMyView to the front or the back of the set of children of mPivotParent so it will be rendered on top or behind the others. Hiding the view will not suffice in my ...
4
votes
1
answer
2k
views
Rotating 90 degrees the FrameLayout containing webview in Android
I am trying to rotate the framelayout containing the webview in android, here is my code :
FrameLayout contentView = (FrameLayout) getRootView().findViewById(
R.id.content);
...
0
votes
1
answer
596
views
Multiple layers android Animation
I am working on an android application that requires multiple views which will overlap each other in one main view (FramLayout). Each of those 3 views will be the same size and have different kinds ...
5
votes
2
answers
16k
views
Is it possible to pass an onTouchEvent to multiple views in Android?
I have read a few questions regarding this topic on SO but haven't really found a solid answer to it.
I have a framelayout that I stack multiple custom views on, however the onTouch event only works ...
3
votes
0
answers
5k
views
How to add View to Frame Layout Android
I'm trying to get a simple camera app up.
I have used the sample CameraPreview code provided by Google.
And even the code below is taken from the documentation on the android developers site.
But ...
0
votes
1
answer
4k
views
Android borders on individual views
I have trouble making borders for android views
What I try to do for simulating a border is to create a view with the main background, then create a view around it with the border color as the ...
0
votes
1
answer
565
views
Sit FrameLayout on top of WebView?
First off, I have read some of the other WebView questions and none of them appear to be having quite the same problem.
I've got a WebView and a FrameLayout , the FrameLayOut looks something like..
...
0
votes
1
answer
383
views
When generating new views they are stacking on top of each other
When I click my button for adding new buttons to a framelayout, the new buttons are stacking on top of each other. Any idea what I'm doing wrong?
public void onClick(View v) {
Button ...
1
vote
1
answer
2k
views
Android. How do I dynamically change the color of the entire FrameLayout instead of just the color of the View backround?
This is my main.xml
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="...