onconfigurationchanged

How to detect screen rotation on Android in Kivy?

♀尐吖头ヾ 提交于 2021-02-20 17:54:26
问题 I have been searching for a Kivy solution to capture the Android device rotation from one orientation to another. I have tried both of the window methods below but neither executes the on_rotate or rotate_screen routines when I rotate the device. I see there is an onConfigurationChanged event in java but I can't find the same event handling for Kivy. Window.on_rotate(self.on_rotate) Window.bind(on_rotate=self.rotate_screen) What I do get in the logcat is the following messages indicating the

How to detect screen rotation on Android in Kivy?

ぃ、小莉子 提交于 2021-02-20 17:53:23
问题 I have been searching for a Kivy solution to capture the Android device rotation from one orientation to another. I have tried both of the window methods below but neither executes the on_rotate or rotate_screen routines when I rotate the device. I see there is an onConfigurationChanged event in java but I can't find the same event handling for Kivy. Window.on_rotate(self.on_rotate) Window.bind(on_rotate=self.rotate_screen) What I do get in the logcat is the following messages indicating the

Change Android layout with Fragments

怎甘沉沦 提交于 2019-12-24 01:53:15
问题 I am developing an Android Activity which has two Fragments. The Activity has two possible layouts , one in Portait, and another one in Landscape. I have created the Fragments working well, but I'm having troubles when I change the orientation of the Phone/tablet. One of this Fragment is a ListFragment , with an AsyncTask to load the list data from the web. With this Fragment I don't have problems, because I can create it again. (Although it takes a while loading). The other Fragment has a

Change Android layout with Fragments

自作多情 提交于 2019-12-24 01:52:28
问题 I am developing an Android Activity which has two Fragments. The Activity has two possible layouts , one in Portait, and another one in Landscape. I have created the Fragments working well, but I'm having troubles when I change the orientation of the Phone/tablet. One of this Fragment is a ListFragment , with an AsyncTask to load the list data from the web. With this Fragment I don't have problems, because I can create it again. (Although it takes a while loading). The other Fragment has a

onConfigurationChanged() is not being called on orientation change

*爱你&永不变心* 提交于 2019-12-24 00:43:36
问题 I saw some related questions on SO, but I'm not able to resolve my issue. I've created separate layout for PORTRAIT and LANDSCAPE mode. I've modified the AndroidManifest.xml file for corresponding orientation change but onConfigurationChanged() is not working when I'm implementing it in activity. Now the issue is at layout.addView(graphView, lp); in onCreate() . I've written absolute hard-coded value in GraphView class. So it works perfectly foe PORTRAIT mode but graphView is not correctly

layout-land xml files does not work with onConfigurationChanged call back

一个人想着一个人 提交于 2019-12-20 01:52:05
问题 I have different layouts for portrait and landscape mode and I also need to override the onConfigurationChanged() callback. But problem is when I change the phone orientation to landscape my landscape layout does not work. Can anybody tell me is this onConfigurationChanged call back problem or something else causing that? Any help will be appreciative. 回答1: i also need to override the onConfigurationChanged() callback Why? but problem is when i change the phone orientation to landscape my

On Rotation I get “Unable to destroy activity … Can not perform this action after onSaveInstanceState”

筅森魡賤 提交于 2019-12-12 20:28:51
问题 Hi and thank you for any help. I am only at the very beginning of configuring my code to handle rotation: I have implemented onDestroy(), but not yet any onSaveInstanceState() or onRetainNonConfigurationInstance() because I am figuring out what will not cause problems if destroyed and recreated after rotation and what needs to be saved. In my application I use a Service that runs an AsyncTask, and 3 fragments that get swapped on user pressing buttons. I use the compatibility library for

Android - Handle Screen Orientation

元气小坏坏 提交于 2019-12-12 10:08:06
问题 I'm currently working on an Android application that have different behaviors according to the screen orientation. I'm using getWindowManager().getDefaultDisplay().getRotation() to get the screen orientation in the onCreate() method and manage from there. Basically, my problem is that I need a control over the orientation. In landscape mode, when the user decides it, the application must switch to portrait mode, and stays like that, but only until the use goes to portrait mode, and then again

Why does android:label's text not changing when user changes language within my app?

余生长醉 提交于 2019-12-12 03:03:58
问题 So within my app, the very first Activity that user sees is to choose language. Lets say if user chooses french and then goes to ActivityB, then to ActivityC. Now decides to changes language. So goes back to ActivityB and then to very first Activity and choses language as Spanish. Now again when user goes to ActivityB, all other text within the fragment/activity is changed to Spanish, but android:label still remains in French. how to fix this? This is how my ActivityA looks public View

layout-land is not working?

若如初见. 提交于 2019-12-11 10:58:58
问题 I did some researches about this question but I couldn't find my answer. So, yes I did create a folder under res called "layout-land" and I put a separate main.xml in it. I intentionally deleted some images in the main.xml in the layout-land and I noticed that these images were still there when I rotated the android phone to horizontal. Many questions similar to mine are caused by adding onConfigurationChanged to manifest. But I did NOT add anything to manifest as explained by this link