Android :: Multiple Surface Views

May 20, 2010

I am working on a graphics application in Android. I have a question regarding MULTIPLE SURFACE VIEWS. Can I be rendering multiple surface views at the same time. Initially, when I had two surface views in the same activity, it didn't seem to work, as it used to show only one at any time. But, with one surface view attached to one activity, is there any way I can keep the background activity's Surface View alive so that both the surfaces get rendered together?

Android :: Multiple Surface Views


Android :: OpenGL On Top Of Camera Preview - Using Two Surface Views

Jul 19, 2009

I have openGL layered on top of camera view by using the 'workaround' specified at-http://groups.google.com/group/android-beginners/browse_thread/thread... and it works great.

However, has been mentioned before that surfaceviews were not designed to be layered ontop of each other- [url]

As you can notice in the code snippet thats mentioned in the first thread, to get openGL working on top of camera we are first setting the contentView to be the openGL view and then adding the camera (on top of it) instead of the other way around as one would expect it. I am assuming there's something strange going on in here as it has also been mentioned that Z-order is not supported on surface views- [url]

Now my question is will all devices have this behavior? Can I use this behavior in my app to get openGL layered on top of camera preview? Please answer this query, its so cool to have openGL over the camera preview! It opens up for some amazing stuff!

View 2 Replies View Related

Android :: Pros - Cons Of Multiple Activities In An App Vs One Activity - Multiple Views

Aug 16, 2010

Are there design guidelines to help decide if an application with multiple views should be designed with multiple activities or just one activity and control the back button itself.

I've tried both. My most complex applications using one activity per screen. However, now that I'm successfully written an app with just one activity and handling the back button myself, I don't see any compelling reason to use multiple activities. The one activity application is much simpler and more straightforward.

What advantages of multiple activities am I missing?

View 8 Replies View Related

Android :: Multiple Framebuffer Devices Support For Surface Flinger

Sep 15, 2009

As suface flinger uses fb0 for rendering the image and video. i want to change the frame buffer devices dynamically for rendering the image on the screen one time on Fb0 other time on Fb1. i am looking into the surface flinger code. but we are not able to get the pointer where to change for this. can simeone please give us some pointer.

View 3 Replies View Related

Android :: Use Multiple Activities Or Multiple Content Views

Feb 18, 2010

I'm working on an application using xml layouts.

I wish to know which is better:
1. Use few activities and change its contentview
2. Use an activity for each 'view' needed

If both works, in which case which option would be better?

View 1 Replies View Related

Droid :: How To Create Blur Surface From Android.view.Surface?

Jan 22, 2009

How do I create blur surface from android.view.Surface?

View 2 Replies View Related

Android :: Activities And Multiple Views

Aug 3, 2010

I start a browser and from the browser,I start a video which occupies only a small part of the screen,say the bottom right corner.

Now the browser will be pushed to the 2nd position in the window order and Video will come to the first position. Is it possible that browser can have the control for active window and receive the key events though the video is the Top Most window.

View 4 Replies View Related

Android :: FindViewById When Multiple Views Have Same ID

Aug 5, 2009

what would be the outcome of using findViewById when multiple child views have the same ID lets say for example when using a layout to dynamically produce multiples of the same control?

View 4 Replies View Related

Android :: Multiple Views For For Row In ListView

Jan 17, 2010

I have a ListView that could have 4 different views for a row depending on the data for the row. I have the ListView working correctly overriding getViewTypeCount and getItemViewTYpe. I originally was trying to dynamiclly update the view type count as new views were inflated by forcing calls to getViewTypeCount because it was possible that maybe one or two views may be all that would be needed. The app never functioned correctly crashing after there was more than one view added. The problem was fixed by setting getViewTypeCount to always return 4. I noticed getViewTypeCount is automatically called on app start-up and never called again unless a force call is made. So I'm just curious if this can be changed dynamically or do you need to know the number of max views you can possibly have and override getViewTypeCount to return that max value.

View 1 Replies View Related

Android :: Way To Add Multiple Views To A Listview?

Jun 15, 2010

I tried to add these views to list view using this kind of factory but everytime I try and add the view to a ListActivity, it comes up with nothing. What am I doing wrong?

View 3 Replies View Related

Android :: How To Use Multiple Map Activities / Views?

Jul 31, 2010

My situation is the following: I have written one MapActivity class that is able to display a set of places as well as single places. On startup, the application creates an instance of this MapActivity and displays multiple places. If the user clicks on a certain place, then a new Activity is launched that shows the details of the selected place. This activity has a menu item that allows the user to view the place on a map - this causes that a new instance of the MapActivity is created, except that now only this single place is displayed.

The problem now is that if the user navigates back to the first MapActivity (the one that shows multiple places) the tiles won't be loaded anymore + sometimes OutOfMemoryErrors are encountered. According to the Android JavaDocs, it is only possible to have one MapActivity per process. However, I don't want to define my MapActivity as a singleInstance/singleTask, since the user should always be able to navigate back to the first MapActivity that shows multiple places. I have seen that the Google Places app (which has come with Google Map 4.4) for Android uses multiple MapActivity instances. How is this possible?

View 1 Replies View Related

Android : Switching Between Multiple Views In A ViewFlipper

Jul 19, 2010

I have an application using ListView inside Tabs, and I'd like to switch to a separate View(data collection widget) on clicking an item in the List.I'm adding each List's row's children to a ViewFlipper and the items are added at runtime so there is no definite number of views. As such, i would want to navigate/switch to a particular View in the ViewFlipper.Any pointers?

View 3 Replies View Related

Android :: Multiple Activities Or Switching Views Manually

Jan 15, 2010

I have developed some apps for Android, and this questions stays always:

How should I structure my UI? Should I launch activity after activity and leave the phone to make the "back" button, or should I choose more optimized, but more complex to implement, way with switching manually Views and then manually doing the "Back" button functionality?

View 4 Replies View Related

Android :: Application With Multiple Views - Best Practice For Structure?

Jun 20, 2010

I am new to developing for android. I have a question regarding some best practices. My app is like a dashboard from which multiple different "sub-activities" can be started and done. I am wondering what is the best way to structure the app. One way is to have different layouts and load and unload them appropriately. The other is to start new activities using intents. At least this is what I have gathered from what I have read.

View 3 Replies View Related

Android :: Implement Multiple Views That React To OnTouch?

Oct 10, 2010

Let's say I have MyActivity and inside my onCreate method I initialize MyBackgroundView, then MyPlayer1View then MyPlayer2View. I want to be able to touch the screen, figure out if I have touched Player1 or Player2 and then respond with changes to the players if I have touched them.

My problem is, where do I put the onTouchListener? Can only MyBackgroundView listen for touches, or can the players listen for touches too? If MyBackgroundView can only accept touches, do I need to call view.ontouchlistener that says, you have touched me, and I have a player at those coordinates, so I'll pass the motion event to the player and let it handle it? Or do call view.ontouchlistener in each of the players that says, you've touched me, now I will react to the motion event?

View 1 Replies View Related

Android : Group Of Views Controls On Multiple Screens

Aug 15, 2010

I am working on an Android project where a group of buttons needs to show on the bottom of every screen (activity) in the application. The group of buttons are basically a navigation bar. I want to know the best way to do this without creating new buttons for every activity. I have been around programming (C++/C#) for many years but am pretty new to Android and Java so if someone can point me in a general direction.

View 2 Replies View Related

Android :: Listview / Arrayadapter With Rows Containing Multiple Text Views?

May 27, 2009

I want to create a listview with rows that have an image and two textviews. This must be a very common activity but I can't find a class/or source code that does this.

View 9 Replies View Related

Android :: How To Use Multiple Views Inside A Single Activity With A Canvas?

Nov 7, 2010

Basically what I am trying to accomplish is I want a canvas I can pass bitmaps to, to be displayed on the screen with the rest of my view objects (buttons, textviews, etc).

View 1 Replies View Related

Android :: Access Views Inside Layout When I Reuse It Multiple Times?

Aug 6, 2010

I have read the Android UI trick 2 on Android developers, which tells people how to include a layout in another layout file multiple times, and give these included layouts different id. However, the sample here is overwriting the layout id, not the id of the views IN this layout. For example, if the workspace_screen.xml looks like this: And I include it three times in another layout file. Do I end up with three TextViews with id firstText, and another three with secondText? Isn't there an id collision? And how do I find the secondText TextView in the third included layout with findViewById? What should I input in the findViewById method?

View 1 Replies View Related

Android :: Multiple Child Views Created Programmatically Not Working / Make It To Do?

Sep 27, 2009

I need a LinearLayout to contain 3 TableLayouts, and I can't get it to work. This is where the problem is I'm sure:

mTableLayout.addView(mLinearLayout, LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT); mLinearLayout.addView(nTableLayout, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); mLinearLayout.addView(oTableLayout, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); mLinearLayout.addView(pTableLayout, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);

How Do I make this work? I can get it to work just find when I only add a single child view, but when I have multiple children view objects my app crashes.

View 6 Replies View Related

Multiple Image Views In Linear Layout?

Jun 11, 2013

I am using a linear layout to draw a scalable background in my app. I am then defining multiple imageviews inside the linear layout, all of which are PNGs containing a transparency layer. I am wanting to overlay these transparent imageviews on top of the background. My issue is that only the first defined imageview shows on top of the background, any subsequent imageviews do not appear.

CODE: Note that imgSen1 appears properly with transparency overlaid on the background. imgSen2 does not appear. If I define imgSen2 first, and imgSen1 second, imgSen2 then appears properly, as if only the first defined imageview can be seen. I would like to have multiple imageviews with transparency overlaying the background.

<LinearLayout
android:layout_width="627dp"
android:layout_height="436dp"[code]...

View 1 Replies View Related

Android :: Views And Their Child Views - How To Avoid The Ugly - Boxes - When Child Views In A View Has Another Color Than Background

Jan 6, 2010

I have a simple ListView and on that ListView I have placed a number of custom defined Views. The CustomView has ImageView and two TextViews.

The CustomView also has a "stateful drawable" as background, so that the background image (a 9-patch) changes if you press the Row in the ListView. When pressing the Row, the background image changes to a Red-ish thing.

The problem is that when the background changes from the default greyish, all the Views in the CustomView (ImageView and TextViews) still have their greyish background and thus creates very ugly greay boxes on top of the now redish background.

What is the best way to solve that problem? I hoped that such things were handled automatically (as it is done in for example .NET), but I was wrong it seems.

View 1 Replies View Related

Android :: How Can Update The All The Views Inside A TabHost When Pressing On A ContextMenu Item From Within One Of The Views

Nov 16, 2010

I am implementing a music player application in Android. My play list selection screen is implemented as a tab selector widget which contains a ListActivity inside each of the tabs: Artist, Albums, Songs.
I want to update the ListView in each of the ListActivity when I delete an item from any of the lists.

i.e. When I long press an item in the Artists list a context menu is drawn with "Delete Artist"
And it should delete all the songs from this artist in the Songs ListView, delete all the albums by this artist in the Albums ListView, and finally delete the entry for the artist in the Artist ListView.

Each of the ListActivity has its own fillData() method, which updates the ListView when the button in the context menu is pressed.

How can I call the fillData() method of the Albums ListActivity after I update the ListView inside of the Artists ListActivity?

View 1 Replies View Related

Android :: How To Make Use Of Views Defined In Layout XML File As Template To Create Views Programmatic Way

Feb 28, 2010

I want to populate a table, defined in layout xml file through the programmatic way. I have define Table with a single row defining its header, with all the attributes set. Now i want to know a way so that i can just replicate that header row in the table with new content.

I tried using inflator inflate(int,view) method, but at runtime it showed up with error.

Here is the XML code for the layout file defining the table

CODE:.................

View 1 Replies View Related

Android :: Switching Views With RadioButton And Saving Views In Bundle

Mar 6, 2010

I have the following XML code:.................

The idea is to change the views, whenever I press one of the radio buttons. When I press a button the first time everything works out fine, but the second time I press a button, I get an IllegalStateException, and I can't quite see why I'm getting this.

Also, the Activity seems to set all my global variables to null, which is why I have to create them every time I switch from portrait to landscape or vice versa. So I would like to know if there is a way I can save my views in the Bundle, or any other way in which I can permanently save my views, so I don't have to add or create them every time, I flip the phone. And whenever I flip the phone, it seems that it rereads the main XML file, causing the RadioGroup to be set to 2D even if the 3D button is checked. This is because I've said the 2D button to be checked from when the app is first created, but I would like to also save the state of that RadioGroup.

View 5 Replies View Related

Android :: How To Align Views In The Middle Of Another Views Baseline

Jun 16, 2010

How do you align views relative to the "middle" part of another view? I think it is best explained with a pic of the UI I'm trying to create in android.

View 2 Replies View Related

Android :: Do Root Views Of An Activity In Android Have Any Prior Knowledge Of The Child Views That Will Be Loaded Into Them

Jan 25, 2010

Is there any way to query a root view of an activity for all of its child views even before the root view or its children have been inflated? I guess what I'm looking for is whether a view knows ahead of time what children it will have before it gets inflated, and can I get that list in some way. Bizarre I realize, but I think it will help me with some unconventional automation testing I'm working on. I haven't found anything in the API like this.

View 1 Replies View Related

Android :: Programmatically Add Views To Views

Mar 7, 2010

Let's say I have a LinearLayout, and I want to add a View to it, in my program from the Java code. What method is used for this? I'm not asking how it's done in XML, which I do know, but rather, how can I do something along the lines of (One View).add(Another View) Like one can do in Swing.

View 2 Replies View Related

Android :: Using Surface In The Native Code

Feb 3, 2010

I am planning to write a video player application and I am planning to use the gstreamer on the native side. I am trying to use the SurfaceFlinger for the rendering part. For this I have written a test program to experiment on the rendering part. I am using the surface flinger wrapper from the project

http://gitorious.org/rowboat/external-gst-plugins-android

But the following ERROR occurs when we try to run the .apk.

CODE:.......

The I changed the permission for "android.permission.ACCESS_SURFACE_FLINGER" in frameworks/base/core/ res/AndroidManifest.xml to "dangerous" and recompiled. But got the same error.

Then I commented out the "checkCallingPermission" method in IServiceManager.cpp and recompiled. Then also i got the same error.

View 4 Replies View Related

Android :: How To Set Kind Of Surface Format?

Dec 27, 2009

Looking the doc with class SurfaceHolder is possible set the kind of surface format. I need to show images YCbCr_420_SP format. If I set YCbCr_420_SP format is not clear after how I can set the data. With Canvas object I can draw only bitmap format and not YCbCr_420_SP. Then my question is : can I draw directly on surface using YCbCr_420_SP data ? how ?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved