Android :: SurfaceView - Does Not Show The Activity In Grey Background

Jul 27, 2009

1)Which is better for developing a game.

a)Using XML layouts

b)Using Custom layouts with Surface view

2) while making a custom view using Surface view... do we need to have a secondary thread to implement the surfaceholder.callback()......

My code below does not show the activity in grey background as i have coded... do i need to use the unlockcanvas and all ,,but i havent used the secondary thread

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

Android :: SurfaceView - does not  show the activity in grey background


Motorola Droid :: 2.1 News / Weather Widget Grey Background Gone

Apr 1, 2010

This morning, at random, i woke my phone up and unlocked the screen after being in my packet and the news and weather widget's grey background is gone and the news and weather is simply in white text over the top of my background. i actually like it, but just wanted to know if this was right?

View 8 Replies View Related

HTC Droid Eris :: Nexus 3D Gallery Show Up As Grey Boxes / View It?

May 25, 2010

So I have the nexus 3D gallery app installed on my 2.1 Eris. It works fine other than it refuses to generate thumbnails sometimes. They just show up as grey boxes. Once it finally does generate the thumbnails, it's fine, but sometimes they just won't generate. For example, I took some pics this past Sunday and the thumbnails are still just showing up as grey boxes. It takes several cycles of closing gallery, opening gallery, closing, opening, etc. etc. to get it to finally generate all the thumbnails, then they're fine. Oh, and sometimes they don't show up at all. Seems this app is very buggy on the Eris.

View 8 Replies View Related

Android :: Android List View Background Colors Always Showing Grey

Sep 9, 2009

I have a ListView that I'm populating from a custom ListAdapter. Inside the Adapter (in the getView(int, View, ViewGroup) method) I'm setting the background color of the View using setBackgroundColor(int). The problem is that no matter what color I set the background to it always comes out a dark grey. It might also be worth noting that I'm using the Light theme.

View 5 Replies View Related

Android :: Setup Background Of SurfaceView Just Like A 2D View?

Mar 27, 2009

Code...

Is there a way to set the background of the SurfaceView just like a 2D view?

View 4 Replies View Related

Android : Transparent Background Overlay Of SurfaceView Broken On 1.5?

Jun 17, 2009

I believe I have found a graphics bug introduced in the 1.5 platform. I'm looking for some confirmation (or a description of what I'm doing wrong) before reporting it as a real bug.

I have a SurfaceView that fills the screen and on top of that I have a LinearLayout that wraps some other components that overlay the surface. These other components are not visible most of the time, and the LinearLayout has a transparent background so that the SurfaceView is unobstructed until the other components are made visible. Under 1.0 and 1.1 this all worked with a background of #00000000 for the LinearLayout. Now under 1.5 there is a black rectangle obstructing my surface unless I give the LinearLayout background some color. I can still keep the transparency so it is still invisible as it should be but it is strange that it can't be black and invisible anymore. My layout is below. The background of #00000001 works, but changing it to #00000000 results in a black rectangle. code...

View 2 Replies View Related

Android :: How To Exit Activity Using SurfaceView

May 18, 2010

When exiting the activity in a thread in a SurfaceView. This log appears in this situation:.............

View 2 Replies View Related

Android :: Put Camera Preview Inside A Surfaceview In An Activity Xml Gui

Aug 27, 2009

I just got my camera preview working for my app, but it is not appearing where I want it to appear, and I'm not sure how to get it there. Instead of using the entire screen for the preview, I would like to put it inside a surfaceview in an activity xml gui. What do I need to change? Here is my code:

public class TakePic extends Activity {

SurfaceView camSurface;

Preview camPreview;

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

requestWindowFeature(Window.FEATURE_NO_TITLE);//hide window title

camPreview = new Preview(this); //create preview

setContentView(R.layout.takepic);

setContentView(camPreview); //set preview as activity content

camSurface = (SurfaceView) findViewById(R.id.camsurface); }

View 5 Replies View Related

Android :: SurfaceView Vs Custom View / SurfaceView Is Slower

Aug 20, 2010

One using a Surfaceview, and the other using a custom view. According to the android SDK development guide, using a surface view is better because you can spawn a separate thread to handle graphics. Th SDK development guide claims that using a custom view with invalidate calls is only good for slower animations, less intense graphics.However, in my simple app, I can clearly see that using a custom view with calls to invalidate seems to render faster.What do you guys know/think about this?My touchEvent code is exactly the same, and my drawing code is exactly the same. The only difference is that one is all in the UI thread, and the other is using a tread to handle the drawing.

View 1 Replies View Related

Android :: Start Activity When Main Activity Is Running In Background

Jan 10, 2010

I created an application which enables the user to set whether he wants to receive notification while the application runs in background mode. If the notifications are enabled an activity should be started (the dialog should appear on the screen).

I tried to enabled it the following way:

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

This is the method from main activity. When onPause() is executed isRunningInBackground is set true.
When I tried to debug it when the main application was running in the background the line

startActivity(intent) had no effect (the activity didn't appear).

Does anyone know how to midify the logic in order to start an activity from the main activity when the main activity is running in the background (after onPause() is called)?

View 1 Replies View Related

Android :: Android Surfaceview Is No Longer Visible After Back From Other Activity

Apr 4, 2010

i use surfaceview for camera preview. it works fine, but has one problem when i start other activity (by clicking something) and then back from that activity. after that, surfaceview is no longer visible. (but onclicklistener is working)but when i occur surfacecreated/destoryed by visible/invisible surfaceview in single activity, it works very good.

View 1 Replies View Related

Android :: Show Pop Up From Background Service

Sep 15, 2010

it is possible in android to show pop-up dialog from background running service?

View 1 Replies View Related

Android :: Map Doesn't Show Real Map In Background

Nov 14, 2010

I have map in my android app. On emulator is everything OK. But on device (Motorola Droid) the map shows marker but doesn't show real map in background!! The connection is OK and I held the INTERNET permission in my manifest. What is causing this problem? Any idea?

View 5 Replies View Related

Android :: Use AsyncTask To Show ProgressDialog While Doing Background Work

Oct 8, 2010

I am developing my first Android App and I need a ProgressDialog to be showed while a background task, in this case just a http call on the server, happens.

I did a bit of studying on this and also have already checked other threads related to this subject.

http://developer.android.com/reference/android/os/AsyncTask.html

[url]

[url]

[url]

Among others.

Than I got to write a bit of code:

1) In My Activity I declare a variable to be of type ProgressDialog

code:............

2) I have also written an inner class to extend AsyncTask as required, here in the doInBackGround is where I call a static method which actually do the POST http request to the server, in the server side I have blocked the server response 20s to validate the progress dialog.

code:............

3) When the button is pressed I than build the ProgressDialog anc call the AsyncTask I have created:

code:...................

Well, this is it, I believe this was suppose to show a progress dialog while the AsyncTask would query the server in background, but what I get is NO progress bar until server response arrives and than for a fraction of time(less than 1 second) the progress shows and the next Activity is called.

View 2 Replies View Related

Android :: Map Shows Marker / Doesn't Show Real Map In Background

Nov 8, 2010

I have map in m android app but it doesn't work well. I spent last two hours looking in code line by line but I don't know what is the problem.I set in manifest uses google maps. Map shows marker, doesn't show map ( instead in background is grid lines), zoom controls disappear after few seconds and not come back. What can be a problem ?

View 1 Replies View Related

Android :: Background Service To Show Toasts On Device Screen

Mar 20, 2009

I have a background service component which is reacting to changes in network connectivity. I would like to alert the user that a a connectivity change event has occurred by popping up a Toast View on the device screen. Is this possible ? Can it be done even though a Service component does not have a UI associated with it ?

View 3 Replies View Related

Android :: Show Dialog While Loading Layout By SetContentView In Background

Apr 15, 2010

I am using below code where , i want to show dialog in front and loading content in background but not able to do the same .code...

View 3 Replies View Related

Android :: Activity In Background ?

Nov 19, 2010

Is there a way to 'preload' a user interfaces but to not display it until I am ready?

I have a service which has a receiver to listen for action_screen_on to occur. When that occurs, I would like to load an activity. However, as it is now, it takes about 1 second to load. I would like to preload the layout in advance so that when the screen is turned on the layout loads as soon as possible.

View 2 Replies View Related

Android :: Want To Change Background Of Activity

Jun 23, 2010

How to change background of activity and background of the application name at the top of your activity?

View 2 Replies View Related

Android :: Activity Background Becoming Black

Nov 19, 2010

i have set the background of an activity with a green gradient png image.This working fine almost always but some times during navigating to an activity its background is becoming black! i am not able to reproduce it with any specific operation, also not getting how to debug or fix it.

View 3 Replies View Related

Android :: Activity Background Processing

Apr 17, 2010

"Note that when you write an activity, you can make it stop or continue running when it is moved to the background (see onStop() in Activity Lifecycle). For activities that download data from the network, it's recommended to let them continue downloading so the user can multi-task." As far as I was aware I had to create a service if I wanted to have a background activity such as a media player, internet download, or processing of data in files on the SD card continue when the activity was no longer in the foreground.I went and reread the onStop information on the "Activity Lifecycle" page, which was referred to. But I didn't find any mention of how an activity might continue to run in the background after onStop was called.

View 3 Replies View Related

Android :: How To Detect An Activity Goes Into Background

Aug 5, 2010

I need a way for my Activity to known that it's going into the background, and not when it's getting killed. I thought about hooking at onStop(), but onStop() is called for both cases. In other words, is there a way to tell if when my Activity is moving into the background and not getting killed?

View 2 Replies View Related

Android :: Background Tasks And Activity

Jul 14, 2010

Has anyone any idea on how to solve the generic problems related to starting a task in background from an activity and when the task is finished posting the result to the activity that created ? (the activity might get destroyed in the meantime due to a orientation change ,or receiving a call , or might be in the process of destroying and recreation)

View 2 Replies View Related

Android :: Start An Activity In The Background?

Aug 4, 2010

Is it possible to start an Activity in the background? I need such an Activity that can operate in the background and spawn other Activities as needed in response to user commands issued to my Home Screen widget.

View 1 Replies View Related

Android : Add Background Image To Activity?

Jul 22, 2010

Using theme or ImageView ?

View 2 Replies View Related

Android :: Use URL To Show New Activity?

Jan 1, 2010

Inside my app, I was wondering if it was possible to make a certain URL in a WebView, when clicked, to redirect to a new activity view outside of the WebView?

View 2 Replies View Related

Android :: Show An Activity As Pop-up On Other?

Jul 28, 2010

I have an Activity A, and there is a button B in the view. If somebody presses B then I want a pop-up which can take some part of screen making the A invisible in that area but rest of A is visible but not active. How can I achieve this?

View 2 Replies View Related

Android :: Changing Background Color Of An Activity

Jan 31, 2010

When i launch Activity A, the screen goes black, then dark-gray. Then A launches B, and the screen goes black and dark-gray again. Is there a way to set the default background color to black? Activity A has no screen, its just a stub that calls B.

View 4 Replies View Related

Android :: Activity Should Be Transparent / But Has Black Background

Apr 22, 2010

My use case is writing an overlay controller activity for a landscape camera preview. I followed the instructions from a couple of tutorials for writing a transparent theme.When I start this activity from my root activity, the layout gets drawn correctly, but the background stays black. I tried to use @android:style/Theme.Translucent instead, but this Theme inherits the orientation from the calling activity (landscape) and thats not what I want.The application holding the camera preview is set to landscape view as it does not display the preview correctly in portrait orientation. (see old google bug report)What I wanted to do was to put an independent activity for user interaction interface in front of the camera surface holder (this activity should be set to 'portrait', or even better to 'sensor')

View 3 Replies View Related

Android :: Set Solid Background To Spawned Activity

Sep 9, 2010

I'm not very familiar with the android SDK yet. I have an application (game), which is developed mainly using the NDK, and uses egl to render. i have an activity which handles the egl swapbuffer and runs the games native main loop, pretty straight forward I guess.

Now I have made another activity which host a TableLayout containing an EditText as well as a button (simply for text-input later used by the game). I spawn this activity from my main activity using startActivityForResult. The small problem I'm having now is that I can't manage to make this "popup" activity to have a background, so my paused game will reside in the background, with the various widgets just overlaid. This is not very pretty in my opinion, and I would like to at least have a solid background color for my spawned activity while it's active. I *could* just simply go into some state in the games main loop which clears the gl-screen just before I spawn the new activity. But I don't like this solution and it's a tad more work then I'm prepared to put in just at this time in the project. I'm pretty sure there is some simple way to just set a background color somehow, I just can't find *any* way to do it, I've looked around in the SDK resources and tried to search for any hints towards this, but i'm just not familiar enough with the java SDK to find what i'm looking for.

On a side note I would also like to be able to center the EditText widget as well as the button on the screen once the Activity is active, I haven't looked very deeply into it yet, but from a quick glance of the documentation I couldn't really find any suitable positioning methods in the tablelayout class. But as I said, haven't looked very hard. Can probably solve that one easy, but i'm just throwing this in as well :)

View 2 Replies View Related







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