├── screenShareKit ├── consumer-rules.pro ├── src │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── loka │ │ │ │ └── screensharekit │ │ │ │ ├── DisplayInfo.kt │ │ │ │ ├── ErrorInfo.kt │ │ │ │ ├── callback │ │ │ │ ├── StartCaptureCallback.kt │ │ │ │ ├── AudioCallBack.kt │ │ │ │ ├── ErrorCallBack.kt │ │ │ │ ├── RGBACallBack.kt │ │ │ │ └── H264CallBack.kt │ │ │ │ ├── IAudioCapture.kt │ │ │ │ ├── AudioFrameListener.kt │ │ │ │ ├── OutputBufferInfo.kt │ │ │ │ ├── EncodeConfig.kt │ │ │ │ ├── AudioRecordErrorCallback.kt │ │ │ │ ├── ScreenInfo.kt │ │ │ │ ├── Size.kt │ │ │ │ ├── DisplayManager.kt │ │ │ │ ├── ScreenShareKit.kt │ │ │ │ ├── Position.java │ │ │ │ ├── InvisibleFragment.kt │ │ │ │ ├── ServiceManager.kt │ │ │ │ ├── WindowManager.kt │ │ │ │ ├── NotificationUtils.kt │ │ │ │ ├── OrientationEventHandler.java │ │ │ │ ├── OrientationListener.kt │ │ │ │ ├── Device.kt │ │ │ │ ├── EncodeBuilder.kt │ │ │ │ ├── AudioCapture.kt │ │ │ │ └── ScreenReaderService.kt │ │ ├── res │ │ │ └── drawable │ │ │ │ └── screen_notification_icon.png │ │ ├── aidl │ │ │ └── android │ │ │ │ └── view │ │ │ │ └── IRotationWatcher.aidl │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── org │ │ │ └── loka │ │ │ └── screensharekit │ │ │ └── ExampleUnitTest.kt │ └── androidTest │ │ └── java │ │ └── org │ │ └── loka │ │ └── screensharekit │ │ └── ExampleInstrumentedTest.kt ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── app ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── themes.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── drawable │ │ │ │ ├── screen_notification_icon.png │ │ │ │ └── ic_launcher_background.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── values-night │ │ │ │ └── themes.xml │ │ │ ├── layout │ │ │ │ ├── media_projection.xml │ │ │ │ └── activity_main.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── org │ │ │ └── loka │ │ │ └── screenshare │ │ │ └── MainActivity.kt │ ├── test │ │ └── java │ │ │ └── org │ │ │ └── loka │ │ │ └── screenshare │ │ │ └── ExampleUnitTest.kt │ └── androidTest │ │ └── java │ │ └── org │ │ └── loka │ │ └── screenshare │ │ └── ExampleInstrumentedTest.kt ├── proguard-rules.pro └── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── gradlew.bat ├── README.md ├── gradlew └── LICENSE /screenShareKit/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':screenShareKit' 2 | include ':app' 3 | rootProject.name = "ScreenShare" -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ScreenShare 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LxzBUG/ScreenShare/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LxzBUG/ScreenShare/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LxzBUG/ScreenShare/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LxzBUG/ScreenShare/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LxzBUG/ScreenShare/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LxzBUG/ScreenShare/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LxzBUG/ScreenShare/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LxzBUG/ScreenShare/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LxzBUG/ScreenShare/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LxzBUG/ScreenShare/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/screen_notification_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LxzBUG/ScreenShare/HEAD/app/src/main/res/drawable/screen_notification_icon.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LxzBUG/ScreenShare/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /screenShareKit/src/main/java/org/loka/screensharekit/DisplayInfo.kt: -------------------------------------------------------------------------------- 1 | package org.loka.screensharekit 2 | 3 | class DisplayInfo(val size: Size, val rotation: Int) -------------------------------------------------------------------------------- /screenShareKit/src/main/java/org/loka/screensharekit/ErrorInfo.kt: -------------------------------------------------------------------------------- 1 | package org.loka.screensharekit 2 | 3 | data class ErrorInfo(val code:Int, val message:String) 4 | -------------------------------------------------------------------------------- /screenShareKit/src/main/res/drawable/screen_notification_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LxzBUG/ScreenShare/HEAD/screenShareKit/src/main/res/drawable/screen_notification_icon.png -------------------------------------------------------------------------------- /screenShareKit/src/main/java/org/loka/screensharekit/callback/StartCaptureCallback.kt: -------------------------------------------------------------------------------- 1 | package org.loka.screensharekit.callback 2 | 3 | fun interface StartCaptureCallback { 4 | fun onStart() 5 | } -------------------------------------------------------------------------------- /screenShareKit/src/main/java/org/loka/screensharekit/IAudioCapture.kt: -------------------------------------------------------------------------------- 1 | package org.loka.screensharekit 2 | 3 | public interface IAudioCapture { 4 | fun startRecording(): Boolean 5 | fun stopRecording() 6 | } -------------------------------------------------------------------------------- /screenShareKit/src/main/java/org/loka/screensharekit/AudioFrameListener.kt: -------------------------------------------------------------------------------- 1 | package org.loka.screensharekit 2 | 3 | import java.nio.ByteBuffer 4 | 5 | interface AudioFrameListener { 6 | fun onAudioData(var1:ByteArray) 7 | } -------------------------------------------------------------------------------- /screenShareKit/src/main/java/org/loka/screensharekit/callback/AudioCallBack.kt: -------------------------------------------------------------------------------- 1 | package org.loka.screensharekit.callback 2 | 3 | import java.nio.ByteBuffer 4 | 5 | fun interface AudioCallBack { 6 | fun onAudio(buffer: ByteArray?,ts: Long) 7 | } -------------------------------------------------------------------------------- /screenShareKit/src/main/java/org/loka/screensharekit/callback/ErrorCallBack.kt: -------------------------------------------------------------------------------- 1 | package org.loka.screensharekit.callback 2 | 3 | import org.loka.screensharekit.ErrorInfo 4 | 5 | fun interface ErrorCallBack { 6 | fun onError(error: ErrorInfo) 7 | } -------------------------------------------------------------------------------- /screenShareKit/src/main/java/org/loka/screensharekit/callback/RGBACallBack.kt: -------------------------------------------------------------------------------- 1 | package org.loka.screensharekit.callback 2 | 3 | fun interface RGBACallBack{ 4 | fun onRGBA(rgba: ByteArray,width:Int,height:Int,stride:Int,rotation:Int,rotationChanged:Boolean) 5 | } -------------------------------------------------------------------------------- /screenShareKit/src/main/java/org/loka/screensharekit/callback/H264CallBack.kt: -------------------------------------------------------------------------------- 1 | package org.loka.screensharekit.callback 2 | 3 | import java.nio.ByteBuffer 4 | 5 | fun interface H264CallBack { 6 | fun onH264(buffer: ByteBuffer, isKeyFrame: Boolean, width:Int, height:Int, ts: Long) 7 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Aug 02 09:19:10 CST 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip 7 | -------------------------------------------------------------------------------- /screenShareKit/src/main/java/org/loka/screensharekit/OutputBufferInfo.kt: -------------------------------------------------------------------------------- 1 | package org.loka.screensharekit 2 | 3 | import java.nio.ByteBuffer 4 | 5 | data class OutputBufferInfo(var index:Int, var buffer: ByteBuffer, var isKeyFrame:Boolean, var presentationTimestampUs:Long, var size:Int) 6 | 7 | -------------------------------------------------------------------------------- /screenShareKit/src/main/java/org/loka/screensharekit/EncodeConfig.kt: -------------------------------------------------------------------------------- 1 | package org.loka.screensharekit 2 | 3 | data class EncodeConfig(var width:Int = 1080,var height:Int = 1920,var frameRate:Int = 60,var bitrate:Int = 1000000,var audioCapture:Boolean = true,var sampleRate:Int = 16000,var channels:Int = 2) 4 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /screenShareKit/src/main/aidl/android/view/IRotationWatcher.aidl: -------------------------------------------------------------------------------- 1 | // IRotationWatcher.aidl 2 | package android.view; 3 | 4 | // Declare any non-default types here with import statements 5 | 6 | interface IRotationWatcher { 7 | /** 8 | * Demonstrates some basic types that you can use as parameters 9 | * and return values in AIDL. 10 | */ 11 | oneway void onRotationChanged(int rotation); 12 | } -------------------------------------------------------------------------------- /screenShareKit/src/main/java/org/loka/screensharekit/AudioRecordErrorCallback.kt: -------------------------------------------------------------------------------- 1 | package org.loka.screensharekit 2 | 3 | interface AudioRecordErrorCallback { 4 | fun onWebRtcAudioRecordInitError(var1: String?) 5 | 6 | fun onWebRtcAudioRecordStartError( 7 | var1: AudioCapture.AudioRecordStartErrorCode?, 8 | var2: String? 9 | ) 10 | 11 | fun onWebRtcAudioRecordError(var1: String?) 12 | } -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /app/src/test/java/org/loka/screenshare/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package org.loka.screenshare 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /screenShareKit/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /screenShareKit/src/test/java/org/loka/screensharekit/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package org.loka.screensharekit 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /screenShareKit/src/main/java/org/loka/screensharekit/ScreenInfo.kt: -------------------------------------------------------------------------------- 1 | package org.loka.screensharekit 2 | 3 | import org.loka.screensharekit.ScreenInfo 4 | 5 | class ScreenInfo(val deviceSize: Size, val videoSize: Size, private val rotated: Boolean) { 6 | fun withRotation(rotation: Int): ScreenInfo { 7 | val newRotated = rotation and 1 != 0 8 | return if (rotated == newRotated) { 9 | this 10 | } else ScreenInfo(deviceSize.rotate(), videoSize.rotate(), newRotated) 11 | } 12 | } -------------------------------------------------------------------------------- /app/src/androidTest/java/org/loka/screenshare/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package org.loka.screenshare 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("org.loka.screenshare", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /screenShareKit/src/androidTest/java/org/loka/screensharekit/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package org.loka.screensharekit 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("org.loka.screensharekit.test", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /screenShareKit/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /screenShareKit/src/main/java/org/loka/screensharekit/Size.kt: -------------------------------------------------------------------------------- 1 | package org.loka.screensharekit 2 | 3 | import android.graphics.Rect 4 | import java.util.* 5 | 6 | class Size(val width: Int, val height: Int) { 7 | 8 | fun rotate(): Size { 9 | return Size(height, width) 10 | } 11 | 12 | fun toRect(): Rect { 13 | return Rect(0, 0, width, height) 14 | } 15 | 16 | override fun equals(o: Any?): Boolean { 17 | if (this === o) { 18 | return true 19 | } 20 | if (o == null || javaClass != o.javaClass) { 21 | return false 22 | } 23 | val size = o as Size 24 | return (width == size.width 25 | && height == size.height) 26 | } 27 | 28 | override fun hashCode(): Int { 29 | return Objects.hash(width, height) 30 | } 31 | 32 | override fun toString(): String { 33 | return ("Size{" 34 | + "width=" + width 35 | + ", height=" + height 36 | + '}') 37 | } 38 | } -------------------------------------------------------------------------------- /screenShareKit/src/main/java/org/loka/screensharekit/DisplayManager.kt: -------------------------------------------------------------------------------- 1 | package org.loka.screensharekit 2 | 3 | import android.os.IInterface 4 | 5 | class DisplayManager(private val manager: IInterface) { 6 | // width and height already take the rotation into account 7 | val displayInfo: DisplayInfo 8 | get() = try { 9 | val displayInfo = 10 | manager.javaClass.getMethod("getDisplayInfo", Int::class.javaPrimitiveType).invoke( 11 | manager, 0 12 | ) 13 | val cls: Class<*> = displayInfo.javaClass 14 | // width and height already take the rotation into account 15 | val width = cls.getDeclaredField("logicalWidth").getInt(displayInfo) 16 | val height = cls.getDeclaredField("logicalHeight").getInt(displayInfo) 17 | val rotation = cls.getDeclaredField("rotation").getInt(displayInfo) 18 | DisplayInfo(Size(width, height), rotation) 19 | } catch (e: Exception) { 20 | throw AssertionError(e) 21 | } 22 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/media_projection.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 11 | 16 | 23 | 28 | 29 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true 20 | # Kotlin code style for this project: "official" or "obsolete": 21 | kotlin.code.style=official -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 |