Changeset View
Changeset View
Standalone View
Standalone View
res/layout-land/activity_mpris.xml
Show All 17 Lines | 11 | <ImageView | |||
---|---|---|---|---|---|
18 | android:scaleType="fitCenter" /> | 18 | android:scaleType="fitCenter" /> | ||
19 | 19 | | |||
20 | <include | 20 | <include | ||
21 | layout="@layout/mpris_control" | 21 | layout="@layout/mpris_control" | ||
22 | android:layout_width="0dp" | 22 | android:layout_width="0dp" | ||
23 | android:layout_height="match_parent" | 23 | android:layout_height="match_parent" | ||
24 | android:layout_weight="1" /> | 24 | android:layout_weight="1" /> | ||
25 | 25 | | |||
26 | <fragment android:name="org.kde.kdeconnect.Plugins.SystemvolumePlugin.SystemvolumeFragment" | ||||
mtijink: Why is this here if it's not shown? | |||||
Because the plugin assumes that it is there and will crash otherwise as soon as my phone switches to landscape it will crash. It's not excactly a clean solution, I'll try to come up with something better nicolasfella: Because the plugin assumes that it is there and will crash otherwise as soon as my phone… | |||||
Android restarts the activity after rotating to landscape (https://developer.android.com/guide/topics/resources/runtime-changes). So you can just check (while creating the activity) if the fragment exists and don't do anything with it if necessary. mtijink: Android restarts the activity after rotating to landscape (https://developer.android. | |||||
27 | android:id="@+id/systemvolume_fragment" | ||||
28 | android:layout_width="0dp" | ||||
29 | android:layout_height="0dp" /> | ||||
30 | | ||||
26 | </LinearLayout> | 31 | </LinearLayout> |
Why is this here if it's not shown?