diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 1969b22..4aa3376 100755 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -3,23 +3,36 @@ package="com.example.app" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> + + + + android:exported="true" + android:launchMode = "singleInstance" + android:keepScreenOn="true" + android:hardwareAccelerated="true" + android:theme="@android:style/Theme.NoTitleBar.Fullscreen"> + + + - \ No newline at end of file + diff --git a/app/src/main/java/com/example/app/MainActivity.java b/app/src/main/java/com/example/app/MainActivity.java index 2ac45b1..69bb65e 100755 --- a/app/src/main/java/com/example/app/MainActivity.java +++ b/app/src/main/java/com/example/app/MainActivity.java @@ -3,6 +3,8 @@ package com.example.app; import android.annotation.SuppressLint; import android.app.Activity; import android.os.Bundle; +import android.view.View; +import android.view.WindowManager; import android.webkit.WebSettings; import android.webkit.WebView; @@ -14,6 +16,16 @@ public class MainActivity extends Activity { @SuppressLint("SetJavaScriptEnabled") protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + //Code fuer Fullscreen in APP + //http://www.java2s.com/example/java-api/android/view/view/system_ui_flag_fullscreen-4.html + getWindow().getDecorView()// w w w . j a v a2 s. c o m + .setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); + getWindow().addFlags( + WindowManager.LayoutParams.FLAG_FULLSCREEN | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); + //Code Ende fuer Fullscreen + setContentView(R.layout.activity_main); mWebView = findViewById(R.id.activity_main_webview); WebSettings webSettings = mWebView.getSettings(); @@ -21,7 +33,7 @@ public class MainActivity extends Activity { mWebView.setWebViewClient(new MyWebViewClient()); // REMOTE RESOURCE - // mWebView.loadUrl("https://example.com"); + mWebView.loadUrl("https://foto.steffen.probst.click/index.php?/category/8#&ui-state=dialog"); // LOCAL RESOURCE // mWebView.loadUrl("file:///android_asset/index.html"); diff --git a/app/src/main/java/com/example/app/MyWebViewClient.java b/app/src/main/java/com/example/app/MyWebViewClient.java index c9f7178..90fdb4c 100755 --- a/app/src/main/java/com/example/app/MyWebViewClient.java +++ b/app/src/main/java/com/example/app/MyWebViewClient.java @@ -1,5 +1,8 @@ package com.example.app; + +import static android.view.View.SYSTEM_UI_FLAG_LAYOUT_STABLE; + import android.content.Intent; import android.net.Uri; import android.webkit.WebView; @@ -12,13 +15,14 @@ class MyWebViewClient extends WebViewClient { String hostname; // YOUR HOSTNAME - hostname = "example.com"; + hostname = "foto.steffen.probst.click"; Uri uri = Uri.parse(url); if (url.startsWith("file:") || uri.getHost() != null && uri.getHost().endsWith(hostname)) { return false; } Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); + view.getContext().startActivity(intent); return true; } diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 3db1011..6759df7 100755 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -5,7 +5,7 @@ + android:layout_width="fill_parent" + android:layout_height="fill_parent" /> - \ No newline at end of file + diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 51a03f6..46ae215 100755 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -1,9 +1,23 @@ - - --> + + +