Skip to content

Commit 040e7d2

Browse files
committed
Work trying to improve layout on Android, and also allow app to accept other apps sending it files.
Added some code that tries to detect soft-keyboard showing and changing screen size, but I seem unable to move teh whole display up, or whatever, to keep input field visible. Handling the layout with the WebView as the only part of the app seems to be causing some difficulties that are frusterating (I dont want WebView to resize, and I cant get the OS to handle things to keep input visible, like iOS does by default). Resolve issue #34 (hopefully), by changing to allow InterSpec to accept any file type from another app. Currently only handles accepting a single file. Only tested with Radiacode app and google drive.
1 parent 06618b6 commit 040e7d2

File tree

3 files changed

+204
-61
lines changed

3 files changed

+204
-61
lines changed

target/android/InterSpec/app/src/main/AndroidManifest.xml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<!-- <uses-sdk android:minSdkVersion="12" android:targetSdkVersion="19"/> -->
99
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
1010
<application android:label="InterSpec"
11-
android:theme="@style/Theme.AppCompat.NoActionBar"
11+
android:theme="@style/AppTheme"
1212
android:usesCleartextTraffic="true"
1313
android:networkSecurityConfig="@xml/network_security_config">
1414
<!-- I added InterSpec/target/android/InterSpec/app/src/main/xml/network_security_config.xml,
@@ -37,13 +37,14 @@ ExecutorService myExecutor = Executors.newCachedThreadPool();
3737
-->
3838
<activity android:name="InterSpec"
3939
android:label="InterSpec"
40+
android:theme="@style/AppTheme"
4041
android:icon="@mipmap/ic_launcher"
4142
android:roundIcon="@mipmap/ic_launcher_round"
4243
android:hardwareAccelerated="true"
4344
android:exported="true"
44-
android:windowSoftInputMode="adjustResize|stateHidden"
45-
android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation"
46-
android:screenOrientation="sensorLandscape"
45+
android:windowSoftInputMode="adjustPan"
46+
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
47+
android:screenOrientation="unspecified"
4748
android:launchMode="singleTask">
4849

4950
<intent-filter
@@ -156,6 +157,12 @@ ExecutorService myExecutor = Executors.newCachedThreadPool();
156157
<category android:name="android.intent.category.LAUNCHER" />
157158
</intent-filter>
158159

160+
<intent-filter>
161+
<action android:name="android.intent.action.SEND" />
162+
<category android:name="android.intent.category.DEFAULT" />
163+
<data android:mimeType="*/*" />
164+
</intent-filter>
165+
159166
<!-- Splash screen -->
160167
<!--
161168
<meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/logo"/>

0 commit comments

Comments
 (0)