¡@

Home 

2014/10/16 ¤W¤È 08:20:55

android Programming Glossary: orientation

Android - what's the difference between the various methods to get a Context?

http://stackoverflow.com/questions/1026973/android-whats-the-difference-between-the-various-methods-to-get-a-context

many times as the activity is destroyed during screen orientation changes and such. I couldn't find really anything about when..

How to handle screen orientation change when progress dialog and background thread active?

http://stackoverflow.com/questions/1111980/how-to-handle-screen-orientation-change-when-progress-dialog-and-background-thre

to handle screen orientation change when progress dialog and background thread active My.. on the handler. This all works fine except when screen orientation changes while the dialog is up and the background thread is.. the threads have been killed. How can I handle the screen orientation change gracefully The sample code below matches roughly what..

How to disable orientation change in Android?

http://stackoverflow.com/questions/1512045/how-to-disable-orientation-change-in-android

to disable orientation change in Android I have an application that I just would like.. XML. This works OK for the HTC magic phone and prevents orientation changes on other phones as well . But I have a problem with.. is opened. Any idea on how I can prevent that android orientation android activity restart share improve this question Update..

How to make a nice looking ListView filter on Android [closed]

http://stackoverflow.com/questions/1737009/how-to-make-a-nice-looking-listview-filter-on-android

fill_parent android layout_height fill_parent android orientation vertical Pretty hint text and maxLines EditText android id @..

Android: Tabs at the BOTTOM

http://stackoverflow.com/questions/2395661/android-tabs-at-the-bottom

android layout_height fill_parent LinearLayout android orientation vertical android layout_width fill_parent android layout_height..

What does android:layout_weight mean?

http://stackoverflow.com/questions/3995825/what-does-androidlayout-weight-mean

Activity restart on rotation Android

http://stackoverflow.com/questions/456211/activity-restart-on-rotation-android

entire application is created so the Activity restarts on orientation or keyboard visibility changes won't trigger it. It's good practice.. listen for events that would cause a restart like orientation and keyboard visibility changes and handle them within your.. manifest node android configChanges keyboardHidden orientation or for Android 3.2 API level 13 and newer android configChanges..

Capture Image from Camera and Display in Activity

http://stackoverflow.com/questions/5991319/capture-image-from-camera-and-display-in-activity

android http schemas.android.com apk res android android orientation vertical android layout_width fill_parent android layout_height..

Getting an issue while checking the dynamically generated checkbox through list view

http://stackoverflow.com/questions/7738527/getting-an-issue-while-checking-the-dynamically-generated-checkbox-through-list

android http schemas.android.com apk res android android orientation vertical android layout_width fill_parent android layout_height..

AsyncTask Android example

http://stackoverflow.com/questions/9671546/asynctask-android-example

fill_parent android layout_height fill_parent android orientation vertical ProgressBar android id @ id progressBar style android..

support for different screen sizes in android

http://stackoverflow.com/questions/14215690/support-for-different-screen-sizes-in-android

mdpi hdpi nodpi no auto scale Aspect ratio long notlong Orientation land Usage res layout my_layout.xml res layout small my_layout.xml..

Android Fragment Pager and Custom Page Indicator( ViewPagerIndicator created by Jake Wharton)

http://stackoverflow.com/questions/14433281/android-fragment-pager-and-custom-page-indicator-viewpagerindicator-created-by

float mPageOffset private int mScrollState private int mOrientation private boolean mCentered private int mTouchSlop private float.. final int defaultOrientation res.getInteger R.integer.default_circle_indicator_orientation.. R.styleable.CirclePageIndicator_centered defaultCentered mOrientation a.getInt R.styleable.CirclePageIndicator_android_orientation..

Eclipse and Android XML layouts gives “'default' is not a best match for any device/locale combination”

http://stackoverflow.com/questions/3774686/eclipse-and-android-xml-layouts-gives-default-is-not-a-best-match-for-any-dev

__ Normal Screen Short screen aspect ratio Landscape Orientation No Dock Day time Medium Density Finger based touchscreen Soft..

Background task, progress dialog, orientation change - is there any 100% working solution?

http://stackoverflow.com/questions/3821423/background-task-progress-dialog-orientation-change-is-there-any-100-working

AsyncTask and display a progress dialog while downlaoding. Orientation changes Activity is restarted and then my AsyncTask is completed..

How do I use a service to monitor Orientation change in Android

http://stackoverflow.com/questions/4625167/how-do-i-use-a-service-to-monitor-orientation-change-in-android

do I use a service to monitor Orientation change in Android I'm writing a Widget that will display a.. does what you ask for hope this helps. public class ScreenOrientationListener extends Activity private static final String TAG ScreenOrientationListener.. extends Activity private static final String TAG ScreenOrientationListener @Override public void onCreate Bundle savedInstanceState..

Android phone orientation overview including compass

http://stackoverflow.com/questions/4819626/android-phone-orientation-overview-including-compass

see below which is then passed into the SensorManager.getOrientation .. method. Does anyone know why the Android team deprecated.. system used by the SensorEvent API. C SensorManager.getOrientation .. method figure So my understanding is that A represents the.. system of B to C So when you call SensorManager.getOrientation .. method you use the values array with values that correspond..

android camera surfaceview orientation

http://stackoverflow.com/questions/5157984/android-camera-surfaceview-orientation

The way I implemented it private Camera mCamera private OrientationEventListener mOrientationEventListener private int mOrientation.. private Camera mCamera private OrientationEventListener mOrientationEventListener private int mOrientation 1 private static final.. mOrientationEventListener private int mOrientation 1 private static final int ORIENTATION_PORTRAIT_NORMAL 1 private..

Picture distorted with Camera and getOptimalPreviewSize

http://stackoverflow.com/questions/5540981/picture-distorted-with-camera-and-getoptimalpreviewsize

int height This line helped me set the preview Display Orientation to Portrait Only works API Level 8 and higher unfortunately... API Level 8 and higher unfortunately. camera.setDisplayOrientation 90 Camera.Parameters parameters camera.getParameters Camera.Size..

Android onConfigurationChanged not being called

http://stackoverflow.com/questions/6457659/android-onconfigurationchanged-not-being-called

Output 06 23 12 33 20.327 DEBUG APP 2905 onCreate Called Orientation Changes 06 23 12 33 23.842 DEBUG APP 2905 onCreate Called Does.. getting called Ensure that you are not calling setRequestedOrientation ActivityInfo.SCREEN_ORIENTATION_PORTRAIT anywhere. This will.. to not fire. Check that you are not using android screenOrientation in your manifest. Also it shouldn't make a difference but you..

How to get Latitude and Longitude infromation from picture

http://stackoverflow.com/questions/6798508/how-to-get-latitude-and-longitude-infromation-from-picture

exif ExifInterface.TAG_MODEL n builder.append Camera Orientation getExifTag exif ExifInterface.TAG_ORIENTATION n builder.append..

Orientation change in Honeycomb

http://stackoverflow.com/questions/6968105/orientation-change-in-honeycomb

change in Honeycomb I have an activity that shouldn't be recreated..

IllegalStateException when replacing a Fragment

http://stackoverflow.com/questions/7707032/illegalstateexception-when-replacing-a-fragment

about what the application should do Landscape Orientation L R click L R2 On landscape orientation the activity has.. int it's based upon the clicked button. Portrait Orientation L click R In portrait orientation it just shows the..

Android: Detect Orientation Changed

http://stackoverflow.com/questions/8248274/android-detect-orientation-changed

Detect Orientation Changed I need to detect an orientation change in my application.. from portrait to landscape. Currently I'm using the OrientationEventListener however detecting the orientation angle is not.. another way to detect orientantion change without using OrientationEventListener . Ultimately I can implement my own orientation..

Android Fragment lifecycle over orientation changes

http://stackoverflow.com/questions/8474104/android-fragment-lifecycle-over-orientation-changes

3143 OnCreateView SavedInstanceState null Orientation Change 1 12 04 11 57 39.031 D FragmentTest.FragmentOne 3143.. 3143 OnCreateView SavedInstanceState null Orientation Change 2 12 04 11 58 32.162 D FragmentTest.FragmentOne 3143..

How to keep Popup window opened when orientation changes at run time in Android?

http://stackoverflow.com/questions/9546061/how-to-keep-popup-window-opened-when-orientation-changes-at-run-time-in-android

Configuration.ORIENTATION_LANDSCAPE Log.i orientation Orientation changed to Landscape else Log.i orientation Orientation changed.. Orientation changed to Landscape else Log.i orientation Orientation changed to Portrait for preview download and install this sample..

Android - what's the difference between the various methods to get a Context?

http://stackoverflow.com/questions/1026973/android-whats-the-difference-between-the-various-methods-to-get-a-context

is associated with the activity and could possibly be destroyed many times as the activity is destroyed during screen orientation changes and such. I couldn't find really anything about when to use getBaseContext other than a post from Dianne Hackborn..

How to handle screen orientation change when progress dialog and background thread active?

http://stackoverflow.com/questions/1111980/how-to-handle-screen-orientation-change-when-progress-dialog-and-background-thre

to handle screen orientation change when progress dialog and background thread active My program does some network activity in a background thread... starting it pops up a progress dialog. The dialog is dismissed on the handler. This all works fine except when screen orientation changes while the dialog is up and the background thread is going . At this point the app either crashes or deadlocks or.. a weird stage where the app does not work at all until all the threads have been killed. How can I handle the screen orientation change gracefully The sample code below matches roughly what my real program does public class MyAct extends Activity implements..

How to disable orientation change in Android?

http://stackoverflow.com/questions/1512045/how-to-disable-orientation-change-in-android

to disable orientation change in Android I have an application that I just would like to use in portrait mode so I have defined android screenOrientation.. defined android screenOrientation portrait in the manifest XML. This works OK for the HTC magic phone and prevents orientation changes on other phones as well . But I have a problem with the HTC G1 phone as i open the hardware qwerty keyboard not.. want it to restart and lose all its states when the keyboard is opened. Any idea on how I can prevent that android orientation android activity restart share improve this question Update April 2013 Don't do this. It wasn't a good idea in 2009 when..

How to make a nice looking ListView filter on Android [closed]

http://stackoverflow.com/questions/1737009/how-to-make-a-nice-looking-listview-filter-on-android

http schemas.android.com apk res android android layout_width fill_parent android layout_height fill_parent android orientation vertical Pretty hint text and maxLines EditText android id @ building_list search_box android layout_width fill_parent android..

Android: Tabs at the BOTTOM

http://stackoverflow.com/questions/2395661/android-tabs-at-the-bottom

android id @android id tabhost android layout_width fill_parent android layout_height fill_parent LinearLayout android orientation vertical android layout_width fill_parent android layout_height fill_parent android padding 5dp FrameLayout android id @android..

What does android:layout_weight mean?

http://stackoverflow.com/questions/3995825/what-does-androidlayout-weight-mean

Activity restart on rotation Android

http://stackoverflow.com/questions/456211/activity-restart-on-rotation-android

onCreate in the application class is only called when the entire application is created so the Activity restarts on orientation or keyboard visibility changes won't trigger it. It's good practice to expose the instance of this class as a singleton.. Changes As a further alternative you can have your application listen for events that would cause a restart like orientation and keyboard visibility changes and handle them within your Activity. Start by adding the android configChanges node to.. Start by adding the android configChanges node to your Activity's manifest node android configChanges keyboardHidden orientation or for Android 3.2 API level 13 and newer android configChanges keyboardHidden orientation screenSize Then within the Activity..

Capture Image from Camera and Display in Activity

http://stackoverflow.com/questions/5991319/capture-image-from-camera-and-display-in-activity

imageview1 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 Button android id @ id button1 android layout_width..

Getting an issue while checking the dynamically generated checkbox through list view

http://stackoverflow.com/questions/7738527/getting-an-issue-while-checking-the-dynamically-generated-checkbox-through-list

and XML. 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 wrap_content TableLayout android layout_width wrap_content..

AsyncTask Android example

http://stackoverflow.com/questions/9671546/asynctask-android-example

http schemas.android.com apk res android android layout_width fill_parent android layout_height fill_parent android orientation vertical ProgressBar android id @ id progressBar style android attr progressBarStyleHorizontal android layout_width match_parent..

support for different screen sizes in android

http://stackoverflow.com/questions/14215690/support-for-different-screen-sizes-in-android

improve this question Size small normal large Density ldpi mdpi hdpi nodpi no auto scale Aspect ratio long notlong Orientation land Usage res layout my_layout.xml res layout small my_layout.xml res layout large my_layout.xml res layout large long..

Android Fragment Pager and Custom Page Indicator( ViewPagerIndicator created by Jake Wharton)

http://stackoverflow.com/questions/14433281/android-fragment-pager-and-custom-page-indicator-viewpagerindicator-created-by

mListener private int mCurrentPage private float mPageOffset private int mScrollState private int mOrientation private boolean mCentered private int mTouchSlop private float mLastMotionX 1 private int mActivePointerId INVALID_POINTER.. final int defaultFillColor res.getColor R.color.default_circle_indicator_fill_color final int defaultOrientation res.getInteger R.integer.default_circle_indicator_orientation final int defaultStrokeColor res.getColor R.color.default_circle_indicator_stroke_color.. defStyle 0 mCentered a.getBoolean R.styleable.CirclePageIndicator_centered defaultCentered mOrientation a.getInt R.styleable.CirclePageIndicator_android_orientation defaultOrientation mPaintPageFill.setStyle Style.FILL mPaintPageFill.setColor..

Eclipse and Android XML layouts gives “'default' is not a best match for any device/locale combination”

http://stackoverflow.com/questions/3774686/eclipse-and-android-xml-layouts-gives-default-is-not-a-best-match-for-any-dev

20 43 23 Rockport Displaying it with 'Locale Language ___Region __ Normal Screen Short screen aspect ratio Landscape Orientation No Dock Day time Medium Density Finger based touchscreen Soft keyboard Qwerty keybard Trackball navigation Screen resolution..

Background task, progress dialog, orientation change - is there any 100% working solution?

http://stackoverflow.com/questions/3821423/background-task-progress-dialog-orientation-change-is-there-any-100-working

download some data from internet in background thread I use AsyncTask and display a progress dialog while downlaoding. Orientation changes Activity is restarted and then my AsyncTask is completed I want to dismiss the progess dialog and start a new Activity...

How do I use a service to monitor Orientation change in Android

http://stackoverflow.com/questions/4625167/how-do-i-use-a-service-to-monitor-orientation-change-in-android

do I use a service to monitor Orientation change in Android I'm writing a Widget that will display a countdown timer. I have the widget working the way I want it.. improve this question Please find below an example which does what you ask for hope this helps. public class ScreenOrientationListener extends Activity private static final String TAG ScreenOrientationListener @Override public void onCreate Bundle.. ask for hope this helps. public class ScreenOrientationListener extends Activity private static final String TAG ScreenOrientationListener @Override public void onCreate Bundle savedInstanceState super.onCreate savedInstanceState mContext this setContentView..

Android phone orientation overview including compass

http://stackoverflow.com/questions/4819626/android-phone-orientation-overview-including-compass

.. method to get a rotation matrix see below which is then passed into the SensorManager.getOrientation .. method. Does anyone know why the Android team deprecated Sensor.TYPE_ORIENTATION Is it an efficiency thing That is what.. and represents the World's coordinate system B Coordinate system used by the SensorEvent API. C SensorManager.getOrientation .. method figure So my understanding is that A represents the world's coordinate system which I presume refers to the way.. in thinking that the rotation matrix transforms the coordinate system of B to C So when you call SensorManager.getOrientation .. method you use the values array with values that correspond to figure C. When the phone is pointed to the sky the rotation..

android camera surfaceview orientation

http://stackoverflow.com/questions/5157984/android-camera-surfaceview-orientation

android sdk 2.1 android camera share improve this question The way I implemented it private Camera mCamera private OrientationEventListener mOrientationEventListener private int mOrientation 1 private static final int ORIENTATION_PORTRAIT_NORMAL 1.. share improve this question The way I implemented it private Camera mCamera private OrientationEventListener mOrientationEventListener private int mOrientation 1 private static final int ORIENTATION_PORTRAIT_NORMAL 1 private static final int.. way I implemented it private Camera mCamera private OrientationEventListener mOrientationEventListener private int mOrientation 1 private static final int ORIENTATION_PORTRAIT_NORMAL 1 private static final int ORIENTATION_PORTRAIT_INVERTED 2 private..

Picture distorted with Camera and getOptimalPreviewSize

http://stackoverflow.com/questions/5540981/picture-distorted-with-camera-and-getoptimalpreviewsize

void surfaceChanged SurfaceHolder holder int format int width int height This line helped me set the preview Display Orientation to Portrait Only works API Level 8 and higher unfortunately. camera.setDisplayOrientation 90 Camera.Parameters parameters.. me set the preview Display Orientation to Portrait Only works API Level 8 and higher unfortunately. camera.setDisplayOrientation 90 Camera.Parameters parameters camera.getParameters Camera.Size size getBestPreviewSize width height parameters.setPreviewSize..

Android onConfigurationChanged not being called

http://stackoverflow.com/questions/6457659/android-onconfigurationchanged-not-being-called

Called super.onConfigurationChanged newConfig And my LogCat Output 06 23 12 33 20.327 DEBUG APP 2905 onCreate Called Orientation Changes 06 23 12 33 23.842 DEBUG APP 2905 onCreate Called Does anyone know what I am doing wrong Thanks. java android configuration.. of answers from this question onConfigurationChanged not getting called Ensure that you are not calling setRequestedOrientation ActivityInfo.SCREEN_ORIENTATION_PORTRAIT anywhere. This will cause onConfigurationChange to not fire. Check that you are.. anywhere. This will cause onConfigurationChange to not fire. Check that you are not using android screenOrientation in your manifest. Also it shouldn't make a difference but you can try using android configChanges orientation keyboardHidden..

How to get Latitude and Longitude infromation from picture

http://stackoverflow.com/questions/6798508/how-to-get-latitude-and-longitude-infromation-from-picture

n builder.append Camera Model getExifTag exif ExifInterface.TAG_MODEL n builder.append Camera Orientation getExifTag exif ExifInterface.TAG_ORIENTATION n builder.append Camera White Balance getExifTag exif ExifInterface.TAG_WHITE_BALANCE..

Orientation change in Honeycomb

http://stackoverflow.com/questions/6968105/orientation-change-in-honeycomb

change in Honeycomb I have an activity that shouldn't be recreated after an orientation change. I added the following to..

IllegalStateException when replacing a Fragment

http://stackoverflow.com/questions/7707032/illegalstateexception-when-replacing-a-fragment

seen what my mistake is. Anyway let's give a little more explaination about what the application should do Landscape Orientation L R click L R2 On landscape orientation the activity has a view with 2 fragments leftLand rightLand and if you click.. different those two instances is a parameter passed to newInstance int it's based upon the clicked button. Portrait Orientation L click R In portrait orientation it just shows the fragment leftPort has the same layout as leftLand and if you..

Android: Detect Orientation Changed

http://stackoverflow.com/questions/8248274/android-detect-orientation-changed

Detect Orientation Changed I need to detect an orientation change in my application but I don't want my layout to be changed from portrait.. change in my application but I don't want my layout to be changed from portrait to landscape. Currently I'm using the OrientationEventListener however detecting the orientation angle is not enough. I want to detect that the user changed from portrait.. but force the layout to stay in portrait Is there another way to detect orientantion change without using OrientationEventListener . Ultimately I can implement my own orientation changed algorithm any ideas on this It has to be something..

Android Fragment lifecycle over orientation changes

http://stackoverflow.com/questions/8474104/android-fragment-lifecycle-over-orientation-changes

3143 OnCreateView 12 04 11 57 16.081 D FragmentTest.FragmentOne 3143 OnCreateView SavedInstanceState null Orientation Change 1 12 04 11 57 39.031 D FragmentTest.FragmentOne 3143 onSaveInstanceState 12 04 11 57 39.031 D FragmentTest.FragmentTestActivity.. 3143 OnCreateView 12 04 11 57 39.167 D FragmentTest.FragmentOne 3143 OnCreateView SavedInstanceState null Orientation Change 2 12 04 11 58 32.162 D FragmentTest.FragmentOne 3143 onSaveInstanceState 12 04 11 58 32.162 D FragmentTest.FragmentOne..

How to keep Popup window opened when orientation changes at run time in Android?

http://stackoverflow.com/questions/9546061/how-to-keep-popup-window-opened-when-orientation-changes-at-run-time-in-android

super.onConfigurationChanged newConfig if newConfig.orientation Configuration.ORIENTATION_LANDSCAPE Log.i orientation Orientation changed to Landscape else Log.i orientation Orientation changed to Portrait for preview download and install this sample..