Skip to content

Commit

Permalink
Work trying to improve layout on Android, and also allow app to accep…
Browse files Browse the repository at this point in the history
…t 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.
  • Loading branch information
wcjohns committed Sep 29, 2024
1 parent 06618b6 commit 040e7d2
Show file tree
Hide file tree
Showing 3 changed files with 204 additions and 61 deletions.
15 changes: 11 additions & 4 deletions target/android/InterSpec/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!-- <uses-sdk android:minSdkVersion="12" android:targetSdkVersion="19"/> -->
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
<application android:label="InterSpec"
android:theme="@style/Theme.AppCompat.NoActionBar"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
android:networkSecurityConfig="@xml/network_security_config">
<!-- I added InterSpec/target/android/InterSpec/app/src/main/xml/network_security_config.xml,
Expand Down Expand Up @@ -37,13 +37,14 @@ ExecutorService myExecutor = Executors.newCachedThreadPool();
-->
<activity android:name="InterSpec"
android:label="InterSpec"
android:theme="@style/AppTheme"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:hardwareAccelerated="true"
android:exported="true"
android:windowSoftInputMode="adjustResize|stateHidden"
android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation"
android:screenOrientation="sensorLandscape"
android:windowSoftInputMode="adjustPan"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:screenOrientation="unspecified"
android:launchMode="singleTask">

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

<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>

<!-- Splash screen -->
<!--
<meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/logo"/>
Expand Down
Loading

1 comment on commit 040e7d2

@ckuethe
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also works accepting shares from app v 1.61.03 on android 14.

The keyboard vs screen thing isn't all that terrible: I tap on an editable field, input some value, and then use the little [v] element on my keyboard to collapse it again. OK, it might be just a little bit easier to use if somehow the webview could scroll up so the value is visible as I type, but it's not impossible to use in its current state.

Please sign in to comment.