Android :: Clean Up All Dialogs Show By My Activity?

Sep 30, 2010

In my activity, I show a dialog under some condition like this:

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

My question is what do I need to do to ensure there is no resource leak? From the logcat, i see there is a case where it said a window is leaking or something like that.

Android :: clean up all dialogs show by my activity?


Android :: Show Dialogs In Service Process?

Feb 5, 2009

I intended to show a dialog in a service process, then I tried to use the AlertDialog but got the below error message: WindowManager$BadTokenException: Unable to add window -- token null is not for an application The reason seems to be that the dialog is not used in a application context (activity should be fine?) Was there any way that can solve this problem?

View 2 Replies View Related

Android :: Opening Another Activity From The Map Overlay Dialogs

Jul 22, 2010

I am trying to create a map application and I need to do something similar to what Google Maps does. I want to open show a list of locations and when user taps on them I want to show a dialog.

I was able to do it till here. But now when the user clicks on the dialog that opened I want to show another acttivity with the details of that item that they clicked on.

I tried to start a new intent but it gives me an error.

Here is what I am doing

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

Here is the stack trace

CODE:........

Why am I getting this error and how can I resolve this and open a new activity? Also where can I find the source code for the google maps on android?

View 1 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 :: Show Progress Bar In Tab Activity

Jan 6, 2010

I am having a tab Activity with 5 tabs with intents.the classes are used to load data from internet source.I need to show display progress bar while clicking each tab until it completes the data loading. or how to show a progress bar for a finite time after clicking the tab.

View 2 Replies View Related

Android :: Not Show A ProgressDialog From My Activity

Jun 17, 2010

I try to show a ProgressDialog at the beginning of my application from an Activity. I debug the application and in theory the dialog is created because it prints a line from onCreateDialog... method.

For more test, I try to show a toast with:

Toast.makeText(MyActivity.this, "test", Toast.LENGTH_LONG);

And nothing is showed.

If is useful, the application is a widget.

View 4 Replies View Related

Android :: Show Many Listviews In One Activity

Aug 16, 2009

I want to show many listviews in one activity. Something like

Textview Listview TextView Listview ..........

Every listview has different type of adapter. For this, I made the activity class like:-

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

View 3 Replies View Related

Android :: Show Integer From Activity In XML?

May 18, 2010

I started two days ago with android, gone through the hello android stuff and also started to read the Hello Android book, which is great.

PROBLEM:

I use in my app - VERY EASY APP- the XML output. So basically the main activity just tells the android to show the XML layout of main.

But what if I have in the activity - code defined integer variable and I want this integer variable also be shown on the display?

How do I PUSH the integer variable to the XML??? From main XML reference to other strings in XML is easy - @string/app_name ... but how do I use the integer variable from the activity?

View 2 Replies View Related

Android :: Service - Show Progress In Activity

Jan 2, 2010

I have a service that downloads something from the Internet, it shows progress in notifications and in MyActivity (only when MyActivity is on foreground of course). How should the service post the progress to MyActivity? I know this could be done somehow with IBind but can I just simply do this in MyActivity:

MySevice.myActivity = this; startService(new Intent(....));

From MyService I can now call MyActivity's methods because I have a static reference to it in MySevice.myActivity, so I can call e.g. myActivity.sendProgress(63).

View 5 Replies View Related

Android :: Using Intent - Application To Show Another Activity

Apr 10, 2009

In my Android application, I have two activity classes. I have a button on the first one and I want to show the second when it is clicked, but I get an error.

Here are the classes:

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

The second class that should show when the button is clicked, but never does:

CODE:........

How do I create a button that will show the second activity?

View 3 Replies View Related

Android :: How To Show Up Animation At Activity Launch

Jun 22, 2010

i have a launcher activity which shows up the blank screen at the start up..i want to show up some animation using an animatd.gif...i initialize my layouts viz home etc when the oncreate of launcher is called, but how do i add some animated image until my first layout is shown..i also doubt whether android supports animated gifs or i have to do a workaround.

View 1 Replies View Related

Android :: How Can I Show My Activity On Top Of In-calling Screen?

Apr 23, 2010

I'm writing an android application which listens the phone calling events. What I want to do is, if there is a call incomes or outgoes, an activity shows with my customized info.I want to this screen keeps showing during the calling period. However, if a call is coming, the system UI which shows the contact always appears on top of my activity.I've found some apps already realized this function, but mine can't.

View 1 Replies View Related

Android :: Show Toast After Finishing App / Activity?

Sep 13, 2010

I want to show a simple toast, when exiting an application. The problem is, that the toast is not shown. I assume it is because the acitivity is finished or because of System.exit(0), but I don't know how to solve it. Does anyone have a tip?

In my activity I have the following code...

View 1 Replies View Related

Android :: Home Button - Does Not Show The Last Activity

Jan 23, 2010

I'm experiencing kind of strange behavior of my application after hard Home button is pressed. When you press Home, everything is OK - my app goes to the background, showing Home screen. But if you try to choose my app in the main menu or in the list of last tasks it behaves like it was not started before and does not show the last activity you were on - it just starts from scratch, namely, shows the splash screen and starts next corresponding activities. Moreover, old activities of this app remain on the activities stack, and previous instance of the app is not terminated - so if you press Back for a few times you'll just run into those activities which were undoubtedly started during the previous session of work with my app. Splash screen activity is filtered by "android.intent.action.MAIN" filter and "android.intent.category.LAUNCHER" category. The strange thing is that all of that happens despite the fact that I do not intercept any Back key hits, or override any onPause or onResume methods. What's happening contradicts with my understanding of Android app lifecycle - I was sure that when you hit Home an app just goes to the background, and when you choose it in the menu later - it just unwinds and does not start anew. (Of course, unless stuff like that is stated in the app manifest or corresponding methods are overridden or something else). I also checked it for some other lifecycle events - such as changing orientation or flipping hard keyboard out - and none of those led to such strange results. It appears that the problem occurs when you try to start the app from main menu or menu of last applications.

View 1 Replies View Related

Android :: TabActivity How To Show Contact Activity In A Tab

Dec 29, 2009

I am developing an application and as part of it I would like to show a tabactivity and use the contact activity to let the user see,modify,or call a specified contact.

My code is this:

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

View 3 Replies View Related

Android :: Show Dialog When Application / Activity Startup

Aug 24, 2010

Can we show the dialog when our application/activity startup?

View 4 Replies View Related

Android :: Show Soft Keyboard When Activity Starts

Mar 17, 2010

I have 2 activities, A and B. When A starts, it checks for a condition and if true, it calls startActivityForResult() to start B. B only takes text input so it makes sense for the soft keyboard to automatically pop up when B start. When the activity starts, the EditText already has focus and it ready for input. The problem is that the keyboard never shows up, even with windowSoftInputMode="stateAlwaysVisible" set in the manifest under the <activity> tag for B. I also tried with the value set to stateVisible. Since it doesn't show up automatically, I have to tap the EditText to make it show.

View 2 Replies View Related

Android :: Soft Keyboard Does Not Show When Activity Starts

Apr 26, 2010

I have added android:windowSoftInputMode="stateAlwaysVisible" to my Activity in AndroidManifest.xml and here's my layout:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<EditText android:id="@+id/EditText01" android:layout_width="wrap_content"
android:layout_height="wrap_content"></EditText>
<EditText android:id="@+id/EditText02" android:layout_width="wrap_content"
android:layout_height="wrap_content"></EditText>
<Button android:id="@+id/Button01" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Send"></Button>
</LinearLayout>

When the Activity starts, the EditText is focused, but soft keyboard isn't displayed. If I click on the EditText, then I see the soft keyboard. Do I need to set aditional parameters to display soft keyboard when my Activity starts?

View 4 Replies View Related

Android :: Show ProgressDialog Until Activity UI Finished Loading

Jul 1, 2010

Im trying to show a ProgressDialog while the activity is loading. my problem is that although i completed all the work in the activity. it takes a long time for the activity to load, i suspect this is because i use
multiple views with multiple listviews with custom array adapters inside a viewflipper. it takes a long time for the UI to show.how would i go about checking that all the UI inside the activity finished loading? or is there a way to preload all the activity and the UI?

View 2 Replies View Related

Android :: Show Dialog When Activity Running And Game Over?

Nov 1, 2009

I want to show a dialog to ask player "play again ?" when the game is over.I find the code can only add in a activity for dialog is a part of activity,But I should show the dialog when the game is over,in other words ,I should know the time game is over.how can I do this?

View 2 Replies View Related

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:..............

View 2 Replies View Related

Android :: Show Adds At Bottom Of An Activity(with Custom View)?

Mar 29, 2010

I need show ads in my application. Ads in my custom view must move from bottom of screen with animation. How can I add my view in bottom of screen?

View 2 Replies View Related

Android :: Try To Show Popup Activity / Dialog When Phone Is Locked?

Sep 28, 2010

I am trying to show a activity or a dialog when the phone is locked.
I have tried using a WakeLock but it did not work and I can only see the activity once my phone is unlocked?

What is the proper way to do this?

View 1 Replies View Related

Android :: How To Show A Webview Inside An Activity In Middle Of Screen

Jul 30, 2010

I am having issue while showing a WebView in an activity in the middle of the screen. I have an activity and I want to show a webview in the center of screen. My activity is transparent so background activity will be visible. Whenever I try to create a webview and add it to activity using setContentView(webview) it always shows the view on the top left corner of the screen. Is their a way to workaround this?I am trying to do this via pure code only.

Here is my code.

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

View 1 Replies View Related

Android :: Show AlertDialog On Activity Start - But Not On Screen Orientation Change

Aug 13, 2010

It seems when screen orientation changes, the activity's onCreate() method is called. In my onCreate() method, I have an AlertDialog which pops up when the activity is called. The problem is when I switch the screen sideways, the popup is displayed again. How can I avoid this?

View 1 Replies View Related

Android :: Activity To Show Directory Explorer To Browse Content Of Sdcard

Sep 20, 2010

In android, is there an activity show a directory explorer to browse content of sdcard?Like a File explorer in Java, it can show the content of current directory and I can move up to its parent by clicking '..' and move down to a child directory by clicking the name of the child directory?

View 1 Replies View Related

Android :: Dialogs On A Change Orientation

Mar 5, 2010

I'm doing an APP that shows some dialogs. Those dialogs are Alert dialogs, and when they are being showed if I change the orientation of the mobile I lost them...they are not being kept on the screen.

View 13 Replies View Related

Android :: SubMenu - Dialogs And ActivityGroup

May 31, 2009

I have 6 options to put in options Menu, but 3 of them are not so important and i want to hide them in submenu. All of my Activities are started from one ActivityGroup which creates Menu on MENU button press. Problem is that when I open SubMenu or Dialog (which is created and displayed by ActivityGroup) my current foreground activity makes onPause, onStop and onDestroy, and when I close this submenu (using "back" key) or dialog (by "ok" button for ex.) I don't have any response (onCreate, onResume) from any of my activities registered in LocalActivityManager.

View 3 Replies View Related

Android :: Close Activity Hierarchy In Droid / Show New Not Present In Current Task?

Sep 26, 2010

How do I close a whole hierarchy of activities and show a new activity not present in the current task?

Context

Consider a FTP browser that resumes the previous session on launch. Each folder is displayed in its own activity. When I click on a folder, a new activity is started for the folder. If I press the back button, the app returns to the previous activity, which corresponds to the the parent folder.

I can logoff from the menu at any time. Logging off should bring me to the login activity (not present the current task when the app has resumed the session), and close all the other activities. How can I do this?

From what I've read, if the activity were in the current task I could use FLAG_ACTIVITY_CLEAR_TOP in the intent, but this is not my case.

View 1 Replies View Related







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