File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ RUN cat <<MANIFEST_EOF > app/src/main/AndroidManifest.xml
6060 android:hardwareAccelerated="true"
6161 android:icon="@mipmap/ic_launcher" >
6262 <activity android:name=".MainActivity" android:exported="true"
63+ android:configChanges="orientation|screenSize|keyboardHidden"
6364 android:windowSoftInputMode="adjustResize" >
6465 <intent-filter>
6566 <action android:name="android.intent.action.MAIN" />
@@ -190,7 +191,22 @@ public class MainActivity extends AppCompatActivity {
190191 }
191192 });
192193
193- webView.loadUrl(BASE_URL);
194+ webView.restoreState(savedInstanceState);
195+ if (webView.getUrl() == null || webView.getUrl().isEmpty()) {
196+ webView.loadUrl(BASE_URL);
197+ }
198+ }
199+
200+ @Override
201+ protected void onSaveInstanceState(Bundle outState) {
202+ webView.saveState(outState);
203+ super.onSaveInstanceState(outState);
204+ }
205+
206+ @Override
207+ protected void onRestoreInstanceState(Bundle savedInstanceState) {
208+ super.onRestoreInstanceState(savedInstanceState);
209+ webView.restoreState(savedInstanceState);
194210 }
195211
196212 private void openInCustomTab(String url) {
Original file line number Diff line number Diff line change 11#! /bin/bash
22chmod +x ./android-web-app-builder.sh
3- ./android-web-app-builder.sh --url " https://deckk.it" --app-name " deckk.it" --package-name " com.deckk.it"
3+ ./android-web-app-builder.sh --url " https://deckk.it" --app-name " deckk.it" --package-name " com.deckk.it" --version " $VERSION " --version-code " $VERSION_CODE "
You can’t perform that action at this time.
0 commit comments