Home >

android orientation

  • Handling Multiple Fragments when orientation changesFebruary 16

    I have a MainActivity, and I want to attach a fragment with 3 buttons in it to that activity. On clicking button 1 it should replace this fragment with another fragment. But when I change orientation the current fragment and the old fragment are both

  • Should Fragments Be Used In the Back StackFebruary 15

    I know I can use a Fragment and have it added to the back stack, like so: Fragment fragment = MyFragment.newInstance(); getSupportFragmentManager().beginTransaction() .add(R.id.fragment_holder, fragment).addToBackStack("my_fragment").commit(); T

  • Changing SlidingUpPanelLayout anchor point when orientation changesFebruary 15

    I use a SlidingUpPanelLayout in my app. (Thanks umano it's a very handy library) I have added a parallax image (with a width equal to the width of the screen) that behaves in a way similar to Google maps, i.e the image is hidden underneath the panel

  • VISIBLE EditText goes to INVISBLE on orientation changeFebruary 14

    I have a spinner that has numbers from 1 - 10. If the user selects anything above 1, a certain EditText that is INVISBLE becomes VISIBLE, this is what I want. But when I change it from portrait to landscape, it goes back to INVISIBLE. This is where t

  • Android Fragment Orientation Causes Attach IssuesFebruary 10

    Hello everyone I have a question on rotating fragments and restoring them after detaching them. Currently I have three fragments: Fragment_Data, Fragment_Log, and Fragment_Control. My problem is if I rotate Fragment_Data, then detach and add Fragment

  • Problems with getSavedInstanceState() and onViewStateRestored() bundleJanuary 22

    I have a Fragment in an Activity and when the device is rotated, onSaveInstanceState() and onViewStateRestored() are called. onSaveInstanceState(): @Override public void onSaveInstanceState(Bundle outState){ Log.e("Fragment", "Called onSave

  • Android: How to detect when user trying to focus camera at objectJanuary 20

    I have an activity that use the camera, I want to make it "send a request" after the user pause in a direction / pointed at something. How does the phone know when user stop moving the camera around? This is similar to how the camera app will fo

  • Android device orientation , pitch calculation not consistentJanuary 20

    I have developing an android application , which requires device inclination for real time processing. the device is inclined on a surface i wanted to calculate the angle, for this i have used the project in github to calculate the pitch value. but t

  • onConfigurationChanged is not getting triggeredJanuary 17

    I have to detect when the configuration has changed. I have put the configChanges conditions in the manifest <activity android:name=".WorkoutActivity" android:configChanges="orientation|keyboardHidden|screenSize"> </activity&g

  • Opening activity in landscape mode without locking the orientationJanuary 16

    I want to open an activity initially in Landscape orientation but i don't want to lock that orientation.That means user can switch the orientation on rotating.I tried adding below code to activity.It opens the activity in Landscape mode but its locke

  • Android Orientation Change: Different Layout, Same Fragments

    Android Orientation Change: Different Layout, Same FragmentsJune 1

    This is pretty much a classic Android use case. Say we have 2 fragments: FragmentA and FragmentB. In landscape mode, FragmentA and FragmentB sit side by side. In portrait mode, they each take up the full screen when in use. (See this image but replac

  • android fragment created twice on orientation changeApril 28

    i am having this weird problem where my list fragment is created twice, once when the super.oncreate is called on the parent activity and once when the setContentView is called on the same parent activity. It is a simple application where i use diffe

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.437 s.