Android : Avoid Restarting Activity On Keyboard Flip Change

Aug 11, 2009

when i open my keyboard, it restarts the activity. i use only landscape mode and dont want the activity to restart.

Android : avoid restarting activity on keyboard flip change


Android :: Avoid Restarting Background Threads On Orientation Change

May 19, 2010

I start a number of background threads in my Activity onCreate that do work to keep the UI free. I was originally destroying these threads in onDestroy. However, the idea of shutting down and restarting these background threads every time there is an orientation change seems like a waste of time to me. What is the preferred way of avoiding the shutdown of my background threads on an orientation change? I supposed I could set a flag in onSaveInstanceState and then not destroy my threads if this flag is set. Is this a valid approach or is there a more standard framework approach that I am overlooking?

View 6 Replies View Related

Android :: Prevent Orientation Change On Keyboard Flip Until Thread Execution Completes

Oct 25, 2009

When I flip the keyboard, the layout changes from portrait to landscape, activity is recreated but any background thread keeps running. How can I prevent orientation change/activity from being recreated until my background thread finishes.

View 2 Replies View Related

Android :: Avoid Activity Restart At Keyboard Open Or Close?

Jul 28, 2009

I have fixed the activity screen orientation to portrait on AndroidManifest.xml file. When I open or close the keyboard the activity gets restarted. How to avoid this restart?

View 4 Replies View Related

Android :: Screen Flip Doesn't Trigger An Orientation Change And Activity Destruction/recreation

Aug 29, 2010

I'm testing an app on a Droid. It's a kind of card matching game. I'd like to keep the cards physically located in the same place on the screen regardless of a screen rotation. For example, I can put my thumb on a card, rotate the phone any way I please and the card stays fixed under my thumb. However, the orientation of the content of the card will change to match the current phone rotation. I handle this by transforming the card grid in onCreate. This works fine for 90 degree rotations, but if I do a fast 180 degree flip from one landscape mode to another the screen simply flips and the Activity is NOT destroyed and recreated.

This seems contrary to the documentation:

http://developer.android.com/reference/android/R.attr.html#configChanges

"public static final int configChanges Since: API Level 1

Specify one or more configuration changes that the activity will handle itself. If not specified, the activity will be restarted if any of these configuration changes happen in the system. Otherwise, the activity will remain running and its Activity.onConfigurationChanged method called with the new configuration. "

I am NOT specifying any configChanges in my AndroidManifest.xml file, so it seems that the activity SHOULD be destroyed and recreated. Why isn't it? Is there some way I specify that it should be destroy/ recreated?

View 7 Replies View Related

Android :: How To Stop A Background Thread On Keyboard Flip?

Oct 24, 2009

How can I stop a background thread on keyboard flip in android?

View 1 Replies View Related

Android :: Restarting An Activity Within A Tab - TabActivity

Mar 13, 2010

I have a TabActivity, each tab holds an activity. At some point I'd like to 'refresh' the tabs. I'd basically like to restart each activity in the tabs. I'm not sure how to do this. Calling:

CODE:.........

Removes the tabs, but the activities still seem to be in alive, in limbo. How can I get them to really quit?

View 2 Replies View Related

Android :: How To Prevent Opening Physical Keyboard Restarting App

Nov 13, 2010

I have my android:screenOrientation="portait" on but when a physical keyboard is opened it doesn't rotate the screen as I wanted, but it restarts the app. It seems to run onCreate over again or something. Can someone point me in the right direction and/or tell me how to intercept this and handle it?

View 2 Replies View Related

Android :: Why Restarting Activity When Call Finish()

Sep 10, 2010

I have an activity that after some user interaction calls finish() on itself. From time to time it gets into a loop where when it calls finish() it finishes but immediately restarts again. Any idea why android tries to restart my activity?

View 3 Replies View Related

Android : Restarting An Activity In A Single Tab In A TabActivity?

Mar 12, 2010

I have a TabActivity. Each tab points to a sub activity. Works great.

Is there any clever way to refresh one of the activity tabs? I just want to 'restart' the activity in tab #3 for example. Not sure of a good way to do this other than building in refresh support to the activity itself, or clearing ALL the tabs and recreating all of them.

View 1 Replies View Related

Android :: Avoid History Of Activity?

Oct 13, 2010

I have total 3 activities.
First activity(A) starts second activity(B). From Activity B, 3rd activity(C) is called.

Activity B, shows list with checkbox to select items and single OK button. On clicking OK button Activity C is called with selection.

When user clicks BACK button in Activity C, by default Activity B is displayed (with selected checkbox).

I want to display Activity A when BACK button is clicked in Activity C.

How to achieve that?

I have handled OnKeyDown() in Activity C to startactivity(A). it is working. But when user clicks BACK button on Activity A, again Activity C is displayed. while application should end.

In this direction how to skip Activity B is ever called?

View 1 Replies View Related

Android :: Refresh RelativeLayout When Orientation Changes Without Restarting The Activity?

Jun 7, 2010

I have an Android Activity with a RelativeLayout and I have implemented the following method to prevent the activity from being recreated on change of Orientation:

CODE:..............
I am obviously not doing anything in this method, but it worked perfect when using a LinearLayout. Now however, using RelativeLayout, my layout is all messed up when changing to landscape orientation.

What is the most efficient way to have the screen redraw correctly without having the activity restarted again with a call to onCreate?

View 2 Replies View Related

Avoid Keyboard To Popup?

Mar 1, 2012

I have a textview where to put a date. I've associated to this field a date picker, the problem is that at the first touch the keyboard pops up and I have to tap a second time the field to show the picker.

How can I avoid the keyboard to pop up?

View 1 Replies View Related

Android :: Avoid Non Static Inner Classes In Activity?

Jun 17, 2010

Since I seem to have caught two activity references in a heapdump, where the Activity is set to singleTask. Romain's advice on avoiding memory leaks includes: "Avoid non-static inner classes in an activity if you don't control their life cycle, use a static inner class and make a weak reference to the activity inside"

What does this mean exactly? I can't find any examples, positive, or negative for this rule. I do have some non static inner classes in my activity. Most of them are anonymous inner classes like this one. I see hundreds of them in the samples:....................

View 24 Replies View Related

Android :: Can I Avoid Sending Notification When Activity Is Currently On Top

Sep 13, 2010

I have a server socket bound to a port and I want to send notifications using NotificationManager when a client connects. This all works well.

What I want to avoid is sending notifications if a specific activity is currently being used by the user. E.g., I'm trying to avoid something like GMail notification if I'm already reading email.

View 2 Replies View Related

HTC Incredible :: Weather And Toggle Flip Clock Widget Time Doesn't Flip

May 19, 2010

well just baught this in the app store and its really confusing need some help like wen i open up the weather and toggle flip clock widget the time doesnt flip et dont know how to get/delete skins just iso someone who has this and knows how to run this.

View 2 Replies View Related

HTC Droid Eris :: Homescreen Flip Clock Doesn't Flip

Jan 11, 2010

I have the giant clock/weather widget on my homescreen (the one that comes on the phone when you first get it and the one most people probably use). I have seen animations of this clock on the HTC site that show the digits flipping over. And you would think it would do that anyway based on the design. However, I noticed my doesn't really flip. The digits just change instantaneously. No flipping animation. Is this just mine or is that how it is? I was actually hoping it would flip because I always thought it looked neat.

View 13 Replies View Related

Android :: Hide Soft Keyboard On Activity Without Any Keyboard Operations

Oct 13, 2010

I have a tabbed view with one Activity per tab, and when I switch from the first tab, which has a TextView, to the second tab, which only shows a clickable list, the soft keyboard is still there. I want it to go away.

I tried this:

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

But this does not work, because there is no relevant view to provide, as there is no View on the screen that takes keyboard input.

View 1 Replies View Related

Android :: "Keyboard Not Responding" In Emulator / How To Avoid It

Jan 19, 2010

I'm using Android 2.1 SDK on MacOS 10.6.2.

When I try to run the standard Notepad app in the emulator, I get the expected messages from Eclipse. code..

deprecated. Apps should cease use of QuickDraw and move to Quartz.code...

Then it starts to go wrong. A dialog flashes on to the screen too fast for me to read it.

Then notepad starts (I have to "unlock" the screen manually by dragging the lock tag)

Then there is a "Force close or wait" dialog that announces "Application Android keyboard (in process com.android.inputmethod.latin) is not responding."

The app won't do anything further at this point. I have not made any changes to the app.

Has anyone else seen this error?

Does anyone have advice on how to avoid it?

View 1 Replies View Related

Android :: Orientation Change Crash In Tab Activity With List Activity

Jan 21, 2010

When views with different type have same id and screen orientation changes,

either java.lang.ClassCastException: android.view.AbsSavedState$1 or java.lang.IllegalArgumentException: Wrong state class -- expecting View State will occur. (depends on the view's order)

Because View.dispatchRestoreInstanceState() checks id only.

You may wonder why anyone would make views with different type to have same id.

But it can happen when you use tab activity.

Imagine you have tab activity with two children activity.

Tab1 is ListActivity and Tab2 is ExpandableListActivity.

Both activity have id of "@android:id/list" but the type of view is different.

This means we cannot use ListActivity & ExpandableListActivit at the same in one tab activity.

View 4 Replies View Related

Sony Ericsson Xperia X10 Mini/pro :: Change The Keyboard To Landscape Keyboard

Aug 30, 2010

I just received my Xperia mini and I'd like to change the keyboard to "landscape keyboard". The user manual says that I have to change the settings to auto rotate for the keypad to function in landscape. I've done this but I still don't have it.

View 4 Replies View Related

Samsung Galaxy S :: Change Keyboard To IPhone Like Keyboard With Key-popups

Jul 19, 2010

When you click a key on the Samsung keyboard you don't see the key-popup like on the iPhone or on a HTC device. Is there any way to change this keyboard?

View 10 Replies View Related

Android :: Change Intent Bundle Data Before Activity Recreated After Orientation Change

Jul 30, 2009

I have a notification that starts my activity and passes a messages using the intent's putExtra() function. The message is then displayed to the user in the activity's onCreate function. When the application is restarted due to a orientation change, the message is shown again as it is still in the intent's bundled data.
How can I remove the extra data?

I tried the following:

Bundle bundle = getIntent().getExtras();
if (bundle.getBoolean("showMessage")) {
// ... show message that is in bundle.getString("message")
// remove message
bundle.remove("showMessage");
}

But the message will still be shown after the orientation changed, seems like the intent used is not the one I changed, but the original one. The only workaround I found is to save the showMessage additionally in onSaveInstanceState(). Is there another way? Or is this the way to go?

View 2 Replies View Related

Android :: Soft Keyboard On Activity Startup

Jan 12, 2010

I am struggling trying to have the soft keyboard appear in a search screen and from the looks of numerous pleas on various forums, I am not the only one. I have tried many variants, culling from the byzantine attempts of those others.

InputMethodManager imm = (InputMethodManager) getSystemService
(Context.INPUT_METHOD_SERVICE); imm.showSoftInput (query, 0);
(for 0, substitute InputMethodManager.SHOW_FORCED or InputMethodManager.SHOW_IMPLICIT.)

The problem seems to be that showSoftInput doesn't work from onCreate. This is a very common need. Surely there is a reasonable solution to this problem, or is it botched here?

View 3 Replies View Related

Android :: Force An Activity To Display The Soft Keyboard

Jun 16, 2009

My activity contains an editable text view and I would like to automatically show the soft keyboard when the activity start. Anyone knows how to do it?

I tried this:

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

View 2 Replies View Related

Android :: Soft Keyboard Appears When Activity Starts

Aug 13, 2010

I have an activity which loads a TableLayout. This is made up of TextView and EditView fields. When I run my app within the emulator the layout appears correctly (WITHOUT the soft keyboard appearing). When I run the app from a device (HTC Evo) and enter the activity the soft keyboard ALWAYS appears. I tried doing an OnFocusChange() for the first field in the layout and then doing:

InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(tvIndications.getWindowToken(), 0);

It doesn't work. The soft keyboard always appears.

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 :: Keep Soft Keyboard From Opening On Activity Launch?

Jun 14, 2010

In an Android app, whenever the activity launches, the textbox gets the focus and the soft keyboard pops up automatically. I have tried to stop this by using following line in onCreate method, but it does not work.

((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(EditText.getWindowToken(), 0);

View 4 Replies View Related

Android :: Disable Keypad Or Whole Keyboard Support On Activity?

Nov 2, 2010

I have a layout with lots of different imagebuttons on it. Application is developed in full-touch, so there should be no response to keyboard or keypad on all activities except one, where user can input his name.
Is there a way to achieve that?

I've checked on debug, keypress and keypad press result in onKeyDown event. I've set it to return 'false' for all keys. But, for some reason, android keeps selecting my imagebuttons when keypad is pressed. And pressing Enter key result in View.onClick event.

How to totally disable all keyboard input for activity? I use Motorola Milestone for tests - a slider with a keyboard.

View 1 Replies View Related







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