Last active
September 14, 2019 15:46
-
-
Save davidelp68/db2be0575c7c0a80138b82db1d91eb33 to your computer and use it in GitHub Desktop.
Android Studio - Tutorial Fullscreen Activity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="#0099cc" | |
tools:context=".FullscreenActivity"> | |
<!-- La vista principale a schermo intero. Questo può essere sostituito con qualunque vista | |
è necessario per presentare i tuoi contenuti, ad es. VideoView, SurfaceView, | |
TextureView, ecc. --> | |
<!--Aggiunta di un TextView (casella di testo)--> | |
<TextView | |
android:id="@+id/fullscreen_content" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:keepScreenOn="true" | |
android:textColor="#33b5e5" | |
android:textStyle="bold" | |
android:textSize="50sp" | |
android:gravity="center" | |
android:text="@string/dummy_content"/> | |
<!-- Questo FrameLayout inserisce i layout figli in base alle finestre di sistema che utilizzano | |
Android: fitsSystemWindows. --> | |
<FrameLayout | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:fitsSystemWindows="true"> | |
<LinearLayout | |
android:id="@+id/fullscreen_content_controls" | |
style="?metaButtonBarStyle" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_gravity="bottom|center_horizontal" | |
android:background="@color/black_overlay" | |
android:orientation="horizontal" | |
tools:ignore="UselessParent"> | |
<!--Aggiunta di un Button (pulsante) --> | |
<Button | |
android:id="@+id/dummy_button" | |
style="?metaButtonBarButtonStyle" | |
android:layout_width="0dp" | |
android:layout_height="wrap_content" | |
android:layout_weight="1" | |
android:text="@string/dummy_button"/> | |
</LinearLayout> | |
</FrameLayout> | |
</FrameLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment