티스토리 뷰

Android/XML

핸드폰 회전 시 동영상 초기화 방지

혀가 길지 않은 개발자 2020. 8. 17. 22:10

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.jwsoft.kotlinproject">

    <uses-permission android:name="android.permission.INTERNET"/>

    <application
        android:usesCleartextTraffic="true"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity"
            android:configChanges="orientation|screenSize">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

android:configChanges="orientation|screenSize"  추가

 

실행 결과

 

 

 

 

'Android > XML' 카테고리의 다른 글

<Flow>  (0) 2020.08.24
<ConstraintLayout>  (0) 2020.08.23
<SeekBar>  (0) 2020.08.15
networkSecurityConfig  (0) 2020.08.14
<EditText>  꾸미기  (0) 2020.08.04
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함