android-framelayout

Is it possible to add buttons to a framelayout that was set programmatically?

China☆狼群 提交于 2020-01-11 10:11:36
问题 this is somewhat of of difficult to describe issue but I'll do my very best: I am developing a an android app that uses a custom camera activity. In this camera activity I use create a surface view programmatically and set it to the framelayout (covers full screen) that was defined in the xml layout file. My question now is, how can I add other elements to the frame layout? Only programmatically? I am asking because as of now I was only able to add other elements programmatically. Elements

Is it possible to add buttons to a framelayout that was set programmatically?

独自空忆成欢 提交于 2020-01-11 10:11:27
问题 this is somewhat of of difficult to describe issue but I'll do my very best: I am developing a an android app that uses a custom camera activity. In this camera activity I use create a surface view programmatically and set it to the framelayout (covers full screen) that was defined in the xml layout file. My question now is, how can I add other elements to the frame layout? Only programmatically? I am asking because as of now I was only able to add other elements programmatically. Elements

Converting FrameLayout as Bitmap

隐身守侯 提交于 2020-01-10 20:00:09
问题 I have a FrameLayout that consist some Image views & one EditText. I am saving this layout as an image in the memory (external). First time when I set the images in imageviews everything goes fine i.e. the exact image is being saved (same as displaying on screen) but when after saving first time if I change any thing (text, image) it displays correctly on screen but in saved image it displays earlier image (first image). XML of Layout: <RelativeLayout xmlns:android="http://schemas.android.com

Android: FrameLayout not respecting draw order

余生长醉 提交于 2020-01-07 02:01:07
问题 I have a FrameLayout with four SurfaceViews arranged in a 2x2 grid. The user can resize each of the views. I'd like the views to be drawn in order of their area, with the largest view drawn first and so on. Each time a view is resized, I order the views by their area, and update the FrameLayout: public void reorderViews() { PlotView child1; PlotView child2; boolean swap = false; for(int i = 0; i < layout.getChildCount(); i++) { child1 = (PlotView) layout.getChildAt(i); for(int j = i + 1; j <

Can I put a fragement in a viewpager in an extra container?

陌路散爱 提交于 2020-01-06 15:16:06
问题 Is it possible to put one of the fragments in a viewpager inside a framelayout? My idea was to do something like this: <android.support.v4.view.ViewPager android:id="@+android:id/viewpager" android:layout_width="match_parent" android:layout_height="match_parent"> <FrameLayout android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" /> </android.support.v4.view.ViewPager> What I would to do is have all fragments in the viewpager, except for one, that

Layout issue on Android with FrameLayout and ScrollView

时光总嘲笑我的痴心妄想 提交于 2020-01-05 08:43:31
问题 I'm trying to split the screen in 2 areas, to the left an ImageView and to the right a ScrolView . I'm adding the ImageView and the content of the ScrollView programatically, so the xml file of the layout looks like this: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <FrameLayout android:id="@+id/scene_view" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout

Got Warning : this linearlayout layout or its framelayout parent is possibly useless

廉价感情. 提交于 2020-01-04 13:28:10
问题 <TabHost android:id="@+id/tabHost" android:layout_width="fill_parent" android:layout_height="fill_parent" > <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" > // --------------------------- Here I got warning ------------------------- <LinearLayout android:id="@+id/chat_list"

Got Warning : this linearlayout layout or its framelayout parent is possibly useless

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-04 13:26:30
问题 <TabHost android:id="@+id/tabHost" android:layout_width="fill_parent" android:layout_height="fill_parent" > <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" > // --------------------------- Here I got warning ------------------------- <LinearLayout android:id="@+id/chat_list"

How to change the ImageView size at runtime within FrameLayout

喜欢而已 提交于 2020-01-03 05:54:10
问题 I have one ImageView inside FrameLayout. I am increasing the size of FrameLayout programmatically but ImageView size is not changing. I have set the ImageView paramas as MatchParent. Please Help me how to increase the size of image within frameLayout? here I have added the image into FrameLayout: img_pinch=new ImageView(getApplication()); img_pinch.setImageBitmap(m_bitmap); img_pinch.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH

How to add image to a framelayout in android app ?

妖精的绣舞 提交于 2020-01-03 04:38:10
问题 I am building a left slide menu in my app, in which I am using a framelayout. And a listview is called inside this framelayout. In this frame layout, I want to call a imageView which will display user profile picture. Here is the code for my navigation drawer, where I am initializing framelayout and calling its listview. Here is my navigation drawer code - public class NavigationDrawerFragment extends Fragment { Context context; ArrayList prgmName; public static int [] prgmImages={R.drawable