Android :: User Preference (Any Way To Force Screen Rotation)

Apr 18, 2010

I've got an app that I don't want to auto-rotate. Currently, I've got it setup so that it is always in portrait mode. However, I'd like to add a setting to my preferences where the user can choose either portrait or landscape mode. Is there a way to force screen rotation? Or, could I perhaps make two different layout XML files, one for portrait and one for landscape, and programmatically choose which to use?

Android :: User Preference (Any Way to Force Screen Rotation)


Android :: GPS Lookup And User Preference

Aug 6, 2010

I'm starting to dip my toes into LocationManager. I've created a service which tracks GPS location (interval is more than 60000ms) and updates my application with user location so they can find stuff nearby. As I understand it, users can go into their preferences and disable GPS for a particular application. I would essentially like to offer my users two modes.
1) GPS. 2) If GPS can not pull, device does not have a GPS chip, or GPS is turned off for my app, I would like to allow them to type in their zip code (or maybe switch to cell tower lookup).

The bold text is what I'm interested in. How can I tell if the device does not have GPS? How can I tell if the user has disabled GPS for my application?
Side question: My service gets launched from my 2nd Activity. I call stopService in the onDestroy method of this Activity. If I back up to my 1st Activity and the 2nd Activity is destroyed, I still notice the GPS icon on my phone running. Is stopping the service sufficient? Or do I need to stop the LocationManager in the onDestroy of the service?

View 2 Replies View Related

Android :: Application To Store User's Latest Preference

Jul 8, 2010

I have added a mute button to a menu on my application and am wondering if it is possible to store the user's latest preference of either muted or unmuted for use when he/she reopens the application. Here is the code I am using for setting mute or umute:

public void isMute() {

if(mIsMute){
mAm.setStreamMute(AudioManager.STREAM_MUSIC, false);
mIsMute = false;

}else{
mAm.setStreamMute(AudioManager.STREAM_MUSIC, true);
mIsMute = true;
}
}

View 2 Replies View Related

Android :: User Preference Data Location In Windows

Apr 15, 2010

I'm using Windows to develop android apps and want to know where user preference data is located. It says at /data/data/package/...., but where can I actually see the preference file? Via eclipse or command line tools?

View 1 Replies View Related

General :: Nexus 7 With Android 4.2.2 - Force Disable Rotation-Lock?

Jul 7, 2013

Ok... So, is there anyway to force rotation-lock to turn off on a Nexus 7 with Android 4.2.2?

Reason: I cracked my screen from the bottom left of the screen to just shy of the top right corner. The lower section, below the crack, is not responsive to touch... and the dots I need (I use the pattern pass) are on this side because I can't flip the tablet.

How This Happened: I turned on rotation lock with the tablet upside down to keep it there... But then my Nexus 7 decided to restart randomly and keep rotation-lock on but coming back in the default orientation, aka the wrong way that I need it to be.

View 1 Replies View Related

Android :: Force Deletion Of User Data On App Upgrade

Apr 13, 2010

I want to force the User Data to be deleted on Application upgrade (to delete internal database).How can I do that?

View 5 Replies View Related

Android :: Background Color Of Preference Screen

Feb 8, 2010

How to set the background color of a preference screen?

View 2 Replies View Related

Android :: Text Size Within An Preference Screen

Aug 31, 2010

I have xml file that defines some preference screens like the following example, I would like to be able to increase the font size for the text of the preference screen , but because the within a preference screen there is no android:textsize tag , i have no idea how to accomplish that!
<Preference Screen xmlns:android="http://schemas.android.com/apk/res/android"
android:key="root_preference screen" <Preference Screen android:key="general_sett" android:title="general settings" />
<Preference Screen android:key="extras_sett" android:title="extras settings" /> </Preference Screen>

View 1 Replies View Related

Android :: Want To Customize View Of Preference Screen?

Sep 1, 2010

I'd like to be able to customize the view of a Preference Screen, and so I'm interested in knowing how to set a style for it.

View 1 Replies View Related

Android :: How To Access All Children Of Preference Screen ?

May 11, 2010

I'm trying to programmatically uncheck all the CheckBoxPreference children of a PreferenceScreen in my app. How can I do that?

View 2 Replies View Related

Android :: Remove/hide A Preference From The Screen

Feb 10, 2010

I have an activity which extends PreferenceActivity. I'm loading preferences from the xml file. But in some cases i need completely hide one of the preferences from the screen based on my app state. There is a setEnabled method, but it's not exactly what if want. I want to remove that preference from the screen completely.

View 1 Replies View Related

Android :: Why User Report Force Quits Every Time I Load?

Nov 23, 2009

I'm trying to guess why a user would report "Force quits every time I load" the problem does not occur for all users, especially not me.The system constructs a database when it first loads. I suspect that user's phone does not have enough memory.Questions: How can I verify that the system has enough memory to store a small database?
What else might cause a user's particular system to force quit on startup?Wrong answers or things I've tried thus far:The user's hardware is probably different than mine The user's software and available memory is likely different as well The data is already loading in its own thread, with a progress dialog showing

View 4 Replies View Related

Android :: Force User To Complete A Task Before Pressing Back?

Mar 21, 2010

I show to user a list of categories, he must choose one.
How to force the user to choose before pressing back?

View 4 Replies View Related

Android :: Need App To Prevent Screen Rotation

Mar 30, 2010

I've got an app where I don't want the screen to rotate when they rotate their device, I need to keep the app in portrait mode all the time. How do I do this?

View 2 Replies View Related

Android :: Screen Rotation And ProgressDialog

Sep 20, 2010

How should I handle an active ProgressDialog when the screen is rotated? Perhaps I should cancel the dialog in onDestroy and restart it in response to a SavedInstanceState flag?

I'm getting an exception and the following message in logcat:

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

View 7 Replies View Related

Android :: AsyncTask And Screen Rotation

Sep 10, 2010

Is there a standard pattern for handling a running AsyncTask with screen rotation? My AsyncTask runs for about 10 seconds. I could call AsyncTask.cancel in the Activity's onDestroy method and restart the task in onCreate but that would waste cycles, bandwidth, and user time. I'm guessing there is a better way.

View 1 Replies View Related

Android :: Screen Rotation Changes Settings

Nov 22, 2010

In my Android app I have 2 layouts, one for portrait and one for landscape.

In both layouts I have a TextView that the user can change by clicking on, by default it reads 'ON'
If the user presses it then it changes to 'OFF' All well and good.

However if it's set to OFF and the screen is rotated the text view resets to ON. How can I stop this from happening?

View 1 Replies View Related

Android :: How To Return From Preference Screen To Main Activity?

Oct 14, 2010

I have one main activity and one preference Activity. On my first activity I call menu and go on preference Activity by calling startActivityForResult. Code...

View 1 Replies View Related

Android :: Fatal Error During Screen Rotation

Sep 16, 2010

Step #1: Make it a static inner class

Step #2: Manually associate your activity with the task in its constructor

Step #3: Return the task object from onRetainNonConfigurationInstance() of your activity

Step #4: In onCreate() of your activity, check getLastNonConfigurationInstance(), and if it is not null, associate your new activity instance with the task via a setter

Step #5: Use the activity within onPostExecute()

View 3 Replies View Related

Android :: Screen Rotation - Keep Notification Bar Etc In Same Position

Aug 22, 2009

I have an activity which I have defined to keep in portrait position.

However I would still like to change things (slightly) when the screen is rotated, what is the best way of doing this? I notice onConfigurationChanged is still called, but this still reports portrait mode.

I want to keep the notification bar etc in the same position if possible.

View 4 Replies View Related

Android :: Screen Rotation Counter Clockwise

Nov 1, 2009

Is there any way to make autorotation work in both ways: both clockwise and counter clockwise? It's a pain when reading a book that scrolls with volume keys (HTC Hero).

View 2 Replies View Related

Android :: Control Screen Rotation In Application

Aug 16, 2010

I'd like rotate the screen to put it upside down. Can I do that with android API? I was told by some friends that there are APIs to rotate the screen by 90 degree but I can't find a way to rotate the screen by 180 degree (upside down).

View 3 Replies View Related

Android :: How To Handle An AsyncTask During Screen Rotation

Apr 12, 2010

How to save my instance state or how to deal with my activity getting destroyed during screen rotation.

There seem to be a lot of possibilities but I haven't figured out which one works best for retrieving results of an AsyncTask.

I have some AsyncTasks that are simply started again and call the isFinishing() method of the activity and if the activity is finishing they wont update anything.

The problem is that I have one Task that does a request to a web service that can fail or succeed and restarting the task would result in a financial loss for the user.

How would you solve this? What are the advantages or disadvantages of the possible solutions?

View 3 Replies View Related

Android :: OnItemSelectedListener Called On Screen Rotation

Nov 20, 2010

When I change the orientation of my screen in Android, an OnItemSelectedListener from a Spinner is called. It's not just the emulator, it also happens on a physical phone. How can I stop this from occurring?

View 1 Replies View Related

Force User To Use One Of Autocomplete Options?

Sep 11, 2012

My business app requires specific items to be entered into EditText Fields. (Zip codes for the state of Virginia only, for example.) I am using an AutoCompleteTextView, and it is working as advertised. How do I ensure that only one of the items shown in the auto-complete drop-down list are allowed in the edit box field.

View 4 Replies View Related

Android :: CheckBox -- Restoring State After Screen Rotation

Mar 24, 2010

I have come across some very unexpected (and incredibly frustrating) functionality while trying to restore the state of a list of CheckBoxes after a screen rotation. I figured I first would try to give a textual explanation without the code, in case someone is able to determine a solution without all the gory details. If anyone needs more details I can post the code.

I have a scrolling list of complex Views that contain CheckBoxes. I have been unsuccessful in restoring the state of these check boxes after a screen rotation. I have implemented onSaveInstanceState and have successfully transfered the list of selected check boxes to the onCreate method. This is handled by passing a long[] of database ids to the Bundle.

In onCreate() I check the Bundle for the array of ids. If the array is there I use it to determine which check boxes to check when the list is being built. I have created a number of test methods and have confirmed that the check boxes are being set correctly, based on the id array. As a last check I am checking the states of all check boxes at the very end of onCreate(). Everything looks good... unless I rotate the screen.

When I rotate the screen, one of two things happens: 1) If any number of the check boxes are selected, except for the last one, all check boxes are off after a rotation. 2) If the last check box is checked before rotation, then all check boxes are checked after rotation.

Like I said, I check the state of the boxes at the very end of my onCreate(). The thing is, the state of the boxes at the end of onCreate is correct based on what I selected before the rotation. However, the state of the boxes on the screen does not reflect this.

In addition, I have implemented each check box's setOnCheckChangedListener() and I have confirmed that my check boxes' state's are being altered after my onCreate method returns.

Why would the state of my check boxes change after my onCreate method returns?

I have been trying to degub this for a couple days now. After I found that my check boxes were apparently changing somewhere outside my own code I figured it was time to ask around.

View 4 Replies View Related

General :: Make Android Screen Rotation Faster?

Mar 2, 2013

How to make Android's screen rotation faster (like iPhone)?

View 6 Replies View Related

Set Background Image In Preference Screen

Jul 20, 2010

I would like to set my own background in my preference screen, but the method I know doesn't work...

RelativeLayout
ImageView
PreferenceScreen

This just crashes my app.

View 9 Replies View Related

Android :: Home Screen Widget Support Auto Rotation

Mar 9, 2010

I am working on a home screen widget. I hope this widget can support auto rotation. For example, if the phone is in portrait mode, I want this home screen widget to be 2 cell * 2 cell on the home screen; if the phone is in landscape mode, I want this home screen widget changes be 3 cell * 1 cell on the home screen.

View 2 Replies View Related

Motorola Droid :: Super User Keeps Force Closing

Sep 26, 2010

I'm currently running bb.05, every time I click super user it just force closes. All of my rooted apps open and run fine. Has anyone else experienced this? I restarted my phone but it had no affect.

TIBU works, SetCPU works, Screenshots force closes and SU force closes.

View 3 Replies View Related







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