diff --git a/ARE/app/build.gradle b/ARE/app/build.gradle index ff52219..492fccd 100644 --- a/ARE/app/build.gradle +++ b/ARE/app/build.gradle @@ -1,4 +1,6 @@ apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply plugin: 'kotlin-android-extensions' android { compileSdkVersion 26 @@ -21,6 +23,7 @@ dependencies { implementation 'com.android.support:design:27.1.1' // implementation 'com.android.support:appcompat-v7:26.1.0' implementation project(':are') - implementation 'com.github.bumptech.glide:glide:4.9.0' + implementation 'com.github.bumptech.glide:glide:4.9.0' // implementation 'com.github.chinalwb:are:0.1.6' + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" } diff --git a/ARE/app/src/main/AndroidManifest.xml b/ARE/app/src/main/AndroidManifest.xml index 72c0ef7..dbd0ab0 100644 --- a/ARE/app/src/main/AndroidManifest.xml +++ b/ARE/app/src/main/AndroidManifest.xml @@ -13,13 +13,15 @@ - + @@ -36,19 +38,28 @@ + android:label="@string/title_activity_are__full_bottom" + android:windowSoftInputMode="adjustResize" /> + android:label="@string/title_activity_are__full_top" + android:windowSoftInputMode="adjustResize" /> - - - + android:label="@string/title_activity_are__min_bottom" + android:windowSoftInputMode="adjustResize" /> + + + \ No newline at end of file diff --git a/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_MultiInstanceActivity.kt b/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_MultiInstanceActivity.kt new file mode 100644 index 0000000..e4a7b24 --- /dev/null +++ b/ARE/app/src/main/java/com/chinalwb/are/demo/ARE_MultiInstanceActivity.kt @@ -0,0 +1,31 @@ +package com.chinalwb.are.demo + +import android.content.Intent +import android.support.v7.app.AppCompatActivity +import android.os.Bundle +import com.chinalwb.are.AREditor +import kotlinx.android.synthetic.main.activity_are__multi_instance.* +import kotlinx.android.synthetic.main.activity_main.* + +class ARE_MultiInstanceActivity : AppCompatActivity() { + + var activeARE : AREditor? = null + + private val areFocusChangeListener = AREditor.ARE_FocusChangeListener { arEditor, hasFocus -> if (hasFocus && arEditor != null) activeARE = arEditor } + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_are__multi_instance) + + are_1.setAreFocusChangeListener(areFocusChangeListener) + are_2.setAreFocusChangeListener(areFocusChangeListener) + are_3.setAreFocusChangeListener(areFocusChangeListener) + are_4.setAreFocusChangeListener(areFocusChangeListener) + + activeARE = are_1 + } + + override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { + this.activeARE?.onActivityResult(requestCode, resultCode, data) + } +} diff --git a/ARE/app/src/main/java/com/chinalwb/are/demo/IndexActivity.java b/ARE/app/src/main/java/com/chinalwb/are/demo/IndexActivity.java index 03d2d69..80363e5 100644 --- a/ARE/app/src/main/java/com/chinalwb/are/demo/IndexActivity.java +++ b/ARE/app/src/main/java/com/chinalwb/are/demo/IndexActivity.java @@ -41,6 +41,9 @@ private void initViews() { Button minHideButton = this.findViewById(R.id.minHideButton); openPage(minHideButton, ARE_MinHideActivity.class); + + Button multipleInstanceButton = this.findViewById(R.id.multiInstanceButton); + openPage(multipleInstanceButton, ARE_MultiInstanceActivity.class); } private void openPage(Button button, final Class activity) { diff --git a/ARE/app/src/main/res/layout/activity_are__full_bottom.xml b/ARE/app/src/main/res/layout/activity_are__full_bottom.xml index 594afde..31973bd 100644 --- a/ARE/app/src/main/res/layout/activity_are__full_bottom.xml +++ b/ARE/app/src/main/res/layout/activity_are__full_bottom.xml @@ -12,6 +12,7 @@ are:expandMode="FULL" are:hideToolbar="false" are:toolbarAlignment="BOTTOM" + are:useEmoji="true" /> diff --git a/ARE/app/src/main/res/layout/activity_are__min_bottom.xml b/ARE/app/src/main/res/layout/activity_are__min_bottom.xml index 9312f9f..227049f 100644 --- a/ARE/app/src/main/res/layout/activity_are__min_bottom.xml +++ b/ARE/app/src/main/res/layout/activity_are__min_bottom.xml @@ -28,6 +28,7 @@ are:expandMode="MIN" are:hideToolbar="false" are:toolbarAlignment="BOTTOM" + are:useEmoji="true" android:visibility="visible" /> diff --git a/ARE/app/src/main/res/layout/activity_are__multi_instance.xml b/ARE/app/src/main/res/layout/activity_are__multi_instance.xml new file mode 100644 index 0000000..e02dd81 --- /dev/null +++ b/ARE/app/src/main/res/layout/activity_are__multi_instance.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ARE/app/src/main/res/layout/activity_index.xml b/ARE/app/src/main/res/layout/activity_index.xml index 691fb10..b26b031 100644 --- a/ARE/app/src/main/res/layout/activity_index.xml +++ b/ARE/app/src/main/res/layout/activity_index.xml @@ -50,6 +50,13 @@ android:textAllCaps="false" android:text="AREditor Min Hide"/> +