Android :: Leaked Window Changing Orientation With SubMenu

Jul 27, 2010

I get a leaked window when I have a submenu visible on the screen and I rotate the screen. If it would be a Dialog I colud call dismiss() in the onStop() before to change the orientation, but with a SubMenu how do I can solve it?

Android :: Leaked Window changing orientation with SubMenu


Android :: Activity Leaked Window

Oct 2, 2009

Is the 'Activity leaked window' issue (http://code.google.com/p/ beepmystuff/issues/detail?id=3) fixed in any of the latest Android releases? I'm not sure about the Android version I'm using. I get this error during orientation changes. I create PopupWindows inside TextView. When I change orientation when the popupwindow is shown, my log says Activity has leaked a window (popupwindow) and then sometimes the application crashes, but not always. When the application crashes, the log says 'Uncaught handler: thread main exiting due to uncaught exception java.lang.IllegalArgumentException: View not attached to window manager'

View 11 Replies View Related

Android :: Leaked Window In Preference Activity

Jan 30, 2009

I've created a set of preference screens building on the tuts on androidguys. My preference XML contains nested PreferenceScreens. The below doesn't occur in the root screen, only once clicking to a child PreferenceScreen. Once in that PreferenceScreen, even before selecting an EditPreference, if I change orientation (i.e. flick the G1 keyboard out) I get an error: 01-30 09:33:54.080: ERROR/WindowManager(1261): android.view.WindowLeaked: that was originally added here.I have previously overcome this in other activities by utilising the onPause etc methods with custom dialogs I use. How can I prevent this in the PreferenceActivity? What am I missing?

View 17 Replies View Related

Android :: Dialog Is Leaked On Orientation Change

Jun 23, 2010

built a simple app that displays an alertDialog with two buttons.The problem is it's not getting dismissed when i change orientation. After change i get a leak warning on debugger and the dialog appears twice(pressing back hides the first dialog, only a second back dismisses it completely).

View 7 Replies View Related

Android :: Redrawing Widget When Changing Orientation

Apr 26, 2010

I have a widget set up and it displays properly in both portrait and landscape when added to each. But when I change orientation it has the problem "Problem Loading Widget". I delete this, re-add the widget, and it displays correctly. Thus, my widget can support both portrait and landscape but it doesn't survive an orientation switch. What am I missing? Do I need to redraw the widget when orientation is changed? Doesn't it do this automatically? Do I need to call onUpdate() somehow?

View 2 Replies View Related

Android :: Changing Orientation Resets Activity

Jul 7, 2009

I finally got to the point where I was ready to deploy my app to my G1 and test it out and the first thing I noticed was that when I change my phone to landscape view my main activity restarts and resets all of my variables to their default settings. How can I avoid this?

View 7 Replies View Related

Android :: OutOfMemoryError When Changing Screen Orientation

May 8, 2009

I get an OutOfMemoryError every time i change the screen orientation and I am having a hard time finding the mistake...

The Activitie's view consists of an ImageView, two Buttons and a Spinner. I don't have static variables and can't imagine where i could leak a context.

Most of the times, the exception is thrown at setContentView (R.layout.upload); sometimes it goes fine until imgUpload.setImageURI(imageURI);

The images i am displaying are form the G1's camera, so about 500kb and 2048x1536pixels

Here is some code:

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

View 3 Replies View Related

Android :: Maintaining The State When Changing The Orientation

May 13, 2010

I am having an application showing ListItems and Dialog boxes in it.. I want that when i change the orientation from Portrait to landscape mode, i need to maintain the state of the application .. I have seperate XMLs for landscape and portrait mode..

View 11 Replies View Related

Android :: Widget Not Working Properly When Changing Orientation

Jul 8, 2009

I have a widget , thats working just fine in a particular orientation, but the moment i change the orientation to landscape/portrait, the widget is not able to launch. I have one layout and one layout-land folder in res directory.The problem is that the widget created in landscape mode is not opening in portrait mode and vice-versa.

View 4 Replies View Related

Android :: ListView In Activity Getting Refreshed On Changing Orientation

Apr 7, 2010

I have Activity with ListView inside it and in the onCreate method of the Activity I have code for populating the Data of the ListView this Data is a server based and so populating includes calling Network URLs. I have the ArrayAdapter of the ListView in the Same Activity Class.

Now the Issue I'am facing is that, in Rest all scenarios my Activity is behaving in a proper way but when the Orientation [ Portrait to Landscaped or other way round] is taking place the Data is Getting lost and Newer Data calls are Required to Populate the Same Old Data now this is something that is not intended out the code how should I deal with it.

View 4 Replies View Related

Android :: Changing Orientation - Losing All My List Items

May 25, 2010

While I tested my application on an Android Device turning my Android phone from landscape to portrait, results in all the list items in my list view are disappearing.

View 2 Replies View Related

Game For Android - Changing Screen Depending On Orientation

Jan 18, 2012

I am working on a game for android at the moment, and was wondering how i would change the screen depending on orientation.

So if the user turned the phone horizontally then the app would be viewed horizontally if you know what i mean

Also how would i make a timer, so if a button were pressed, how would i say stop for 2 seconds and then go to link?

View 3 Replies View Related

Android :: 1.6 SDK Arrow Keys - Dpad/trackball - Dir Not Changing With Orientation

Sep 16, 2009

Just started testing my games in 1.6 and the first thing I notice is that on the landscape ones, the dpad up/down/left/right orientation doesn't switch 90 degrees like it did on all emulators before.

The device trackball/dpad will still change with orientation (right becomes up on landscape, etc..), right?

View 9 Replies View Related

Motorola Droid X :: Screen Orientation Not Changing?

Jul 16, 2010

I'm not sure If I did something to my phone after hours and hours of playing and installing/uninstalling ... but my screen orientation no longer changes to landscape when I rotate the phone!

View 1 Replies View Related

HTC Hero :: Animation In Web Browser Changing Orientation

Oct 3, 2009

I've seen on YouTube quite nice animation as browser changes from portrait to landscape. I don't get this, even after selecting 'show animation' in settings. How can I get this?

View 3 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 :: AVD Screen Orientation Not Changing With CTRL+F11 Or CTRL+F12

Apr 26, 2010

I run my app in the AVD emulator using eclipse but I'm unable to change the screen orientation in the AVD (Android 2.0 platform on the emulator).When I press CONTROL+F11 or CONTROL+F12 on the keyboard, nothing happens. No messages are generated in the adb debuglog/logcat either when I press either hotkey.

According to http://developer.android.com/guide/developing/tools/emulator.html these are the correct hotkeys to switch the emulator's screen orientation. I tried it with my app, and with the messaging app. The hotkey has no affect in any case. I'm running Fedora 12, Gnome. I checked my Keyboard Shortcuts in the System -> Preferences menu, nothing's attached to either hotkey.

View 2 Replies View Related

Android :: Icons For Submenu Items Doesn't Show Up

Apr 20, 2010

With below code, the icon for submenu items does not get displayed.

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

First the item "Settings", its displaying but for its submenu items("Preferences"/"Profile") , it is not showing up.

View 4 Replies View Related

Android :: Difference Between Phone Window And Mid Window

Sep 1, 2010

What is the basic difference between the PhoneWindow and MidWindow policies? I found that the emulator version takes the implementations of the PhoneWindow.When the MidWindow implementations will be used? Also, I found that PhoneWindow handles the call settings implementation and the same is not there in MidWindow? Please someone help me pointing out the differences between both the policies and under which circumstances which one will be used.

View 6 Replies View Related

Motorola Droid 2 :: Create Shortcut To Settings Submenu On Global?

Nov 18, 2010

I know you can create shortcuts to the main Settings menus (battery use, bluetooth settings, etc.) by just long-pressing the screen -> Shortcuts, but I need to create a shortcut to a submenu (specifically Settings -> Wireless & Networks -> Mobile Networks -> Network Mode) This is on a Droid 2 Global. Anyone know how I can do this? I have LauncherPro and I know you can make shortcuts with it but programming those shortcuts seems pretty complicated. Also I know you can make additional shortcuts using the LauncherPro "Activities" menu but I can't find the "Network Mode" settings in that list either.

View 6 Replies View Related

Android :: Orientation Change - Dialog Above Activity With Fixed Orientation

May 14, 2009

I have created an activity for my game which handles all orientation changes by itself and has a fixed "portrait" layout. Actually it uses the accelerometer and is rendered using 2D canvas methods. If the level has been completed I show up a highscore dialog in which the user can enter his name. The dialog is floating above the underlying level screen which gets blurred out nicely. This generally works.

Problem is that the dialog does not get rotated if the orientation of the phone changes. So even if the keyboard is exposed the dialog is shown in portrait mode instead of landscape. I have tried to use an activity with dialog theme instead but the behavior didn't change. After several tries it seems that I have found the reason for this: Once there's an activity with fixed orientation in the activity stack then all subsequent activities keep this orientation, too. They will not react on orientation changes anymore (e.g. if the keyboard gets exposed).

After upgrading to 1.5 SDK the described behavior changed a little bit. Now at subactivities indead react on orientation changes like expected. However, the need to have an opaque background! That means that neither dialogs nor activities with dialog theme will work. Those will stick with the orientation of the underlaying activity. So my workaround is to first start a sub-activity with an opaque black background. This activity then shows my highscore dialog on top. It looks quite okay but I wonder if there's a better solution? Is it possible to show a dialog above a fixed portrait or landscape activity which automatically adapts to orientation changes?

View 3 Replies View Related

Android :: Can Force A Specific Layout Orientation - But Have An Opposite Keyboard Orientation Android

Aug 19, 2010

I understand how to force a specific orientation per activity in the android manifest. I would like to know if it is possible to allow the keyboard to change orientation even though the activity(the layout really) must remain unchanged.

View 1 Replies View Related

Android :: Using Orientation Sensor To Get 360° Orientation

Jul 17, 2009

I have a problem with working with the ORIENTATION values of the SensorManager. I would like to have some kind of 360°-value which directly shows me if the phone is in normal portrait (0°), landscape, portrait turned around (180°) or anything in between. So I could have, for example, an arrow that points to the floor (like gravity would do with a plummet) all the time, no matter how I tilt (sidewards) the phone. I thought this would be easy, but I'm pretty confused at the moment.

First of all, the X value of the orientation-array seems to correspondent with how I turn the phone, BUT: if it's completely uprightly standing, this value is about 60° ... why not 0° (or 90°, 180°, 270°), as I would expect?

Second: The value resets if I turn the phone and Android automatically changes screen orientation. So both in Portrait and in Landscape mode it will be sth. like 60° when the phone is in a 0° angel in real world. I set "android:screenOrientation" to "landscape" but this doesn't help anything :/

I want the app NOT to change orientation when I turn the phone, but I want it to get a continuous orientation value when I tilt the phone.

View 4 Replies View Related

Android :: Submenu Within Menu Within Menu?

Jun 7, 2010

On pressing menu button , I have 2 options : Add & more.On click of more i have 3 options : Organize ,Export & Exit On click of Organize i want other 5 options.On click of more i get my submenu. But i want other 5 options on click of organize.How do i proceed? My code in parts is as follows :XML file
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/more"
android:title="@string/moreMenu"
android:icon="@drawable/icon">
<menu>
<item android:id="@+id/Organize"
android:title="@string/Organize" />
<item android:id="@+id/Export"
android:title="@string/Export" />
</menu>
</item>
<item
android:id="@+id/add"
android:title="@string/addMenu"
android:icon="@drawable/add"/>
</menu>
Java-------------------------
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;
public class ToDoList extends Activity {
Menu menu;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.todolist);
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
getMenuInflater().inflate(R.layout.categorymenu, menu);
return true;
} public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.more:
Toast.makeText(this, "You pressed more!", Toast.LENGTH_LONG).show();
//(What needs to be done from here)
return true;
case R.id.add:
Toast.makeText(this, "You pressed add!", Toast.LENGTH_LONG).show();
return true;
} return false;
} public boolean onPrepareOptionsMenu(Menu menu) {
return true;

View 2 Replies View Related

Android :: What Window.demo.clickOnAndroid() - Window And Demo?

Feb 7, 2010

<html>
<script language="javascript">
/* This function is invoked by the activity */
function wave() {
alert("1");
document.getElementById("droid").src="android_waving.png";
alert("2");
}
</script>
<body>
<!-- Calls into the javascript interface for the activity -->
<a onClick="window.demo.clickOnAndroid()"><div style="width:80px;
margin:0px auto;
padding:10px;
text-align:center;
border:2px solid #202020;" >
<img id="droid" src="android_normal.png"/><br>
Click me!
</div></a>
</body>
</html>

What is "window.demo.clickOnAndroid()"? I know that clickOnAndroid is a method in my Android application. But what is window and demo? My file is called demo.html. Is that it?

View 2 Replies View Related

Android :: Leaked Intent And AlarmManager

Aug 27, 2010

I am trying to create authentication system which pops up the login window if the device has been off (SCREEN_OFF) for more than INTERVAL.

I have registered a BroadcastReceiver to listen to SCREEN_ON/OFF events in the onCreate() of the launchable activity:

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

When the alarm goes off, the program crashes:

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

View 1 Replies View Related

Sprint HTC :: Leaked Screenshots Of Android 2.1 For Hero

Nov 29, 2009

Just found them in a thread about a possible 2.1 dump into the hands of the European Hero devs over at the XDA forum. Check them out:

Hero Android 2.1 Hero Build Screenshots

Looks promising!

Remember, 2.1 is supposed to have native CDMA support built in. This means, theoretically, that if the Euro 2.1 ROM is released, devs *should* be able to cook up a ROM and release it for our Sprint Heros possibly sooner than expected! Assuming root will be required...

View 37 Replies View Related

Android :: Binder Is Leaked By Binding To A Service

Jul 30, 2010

I made a code for my understanding of Android Service class.

It has just a single Activity and Service in apk. Service is the same as the sample code of API reference as below: http://developer.android.com/intl/ja/reference/android/app/Service.ht...

A client side is an Activity based on the above sample, and just added the following code:

CODE:.......

My sample application has a check box which starts(binds)/unbind to the local service on a single process. The local service instance is created by every bind request (and destroyed by every unbind).

If I press the button repeatedly, then LocalService$LocalBinder is leaked!

The problem is not resolved even If I set an obtained binder to null (like below).

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

View 6 Replies View Related

Android :: Google 2.5 Froyo Upcoming Features Leaked

Apr 1, 2010

Exclusive: Google Android 2.5 Froyo ROM And Upcoming Features Leaked.

View 5 Replies View Related

Motorola Droid X :: Clamps Down - Leaked Android 2.2 Upgrade

Aug 22, 2010

Wow what do you think of this ? Motorola clamps down on Droid X's leaked Android 2.2 upgrade with cease and desist scare.

View 49 Replies View Related







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