[Android] TV: Fix About view
Geoffrey Métais
git at videolan.org
Fri Apr 20 09:11:02 CEST 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Apr 19 18:22:54 2018 +0200| [8b252ed27b81c2c0a052704c9dab5dba90fba992] | committer: Geoffrey Métais
TV: Fix About view
> https://code.videolan.org/videolan/vlc-android/commit/8b252ed27b81c2c0a052704c9dab5dba90fba992
---
vlc-android/res/layout/about_main.xml | 188 +++++++++++----------
.../src/org/videolan/vlc/gui/tv/AboutActivity.java | 2 +
2 files changed, 98 insertions(+), 92 deletions(-)
diff --git a/vlc-android/res/layout/about_main.xml b/vlc-android/res/layout/about_main.xml
index efb508153..5e276a039 100644
--- a/vlc-android/res/layout/about_main.xml
+++ b/vlc-android/res/layout/about_main.xml
@@ -1,112 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/about_main"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
-
- <LinearLayout
+ <ScrollView
+ android:id="@+id/about_main"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="bottom"
- android:orientation="vertical"
- android:paddingBottom="15dp"
- android:paddingLeft="5dp"
- android:paddingRight="5dp"
- android:paddingTop="15dp" >
+ android:layout_height="match_parent">
- <RelativeLayout
- android:layout_width="fill_parent"
+ <LinearLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="horizontal" >
+ android:gravity="bottom"
+ android:orientation="vertical"
+ android:paddingBottom="15dp"
+ android:paddingLeft="5dp"
+ android:paddingRight="5dp"
+ android:paddingTop="15dp" >
- <TextView
- android:layout_width="wrap_content"
+ <RelativeLayout
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:text="@string/app_name_full"
- android:layout_centerHorizontal="true"
- android:layout_alignParentTop="true"
- android:textSize="29sp" />
+ android:orientation="horizontal" >
- <ImageView
- android:id="@+id/logo"
- android:layout_width="50dp"
- android:layout_height="50dp"
- android:contentDescription="@string/info"
- android:focusable="true"
- android:clickable="true"
- android:src="@drawable/icon" />
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/app_name_full"
+ android:layout_centerHorizontal="true"
+ android:layout_alignParentTop="true"
+ android:textSize="29sp" />
- </RelativeLayout>
+ <ImageView
+ android:id="@+id/logo"
+ android:layout_width="50dp"
+ android:layout_height="50dp"
+ android:contentDescription="@string/info"
+ android:focusable="true"
+ android:clickable="true"
+ android:src="@drawable/icon" />
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="10dp"
- android:gravity="center"
- android:text="@string/about_text"
- android:textSize="16sp" />
+ </RelativeLayout>
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="22dp"
- android:layout_weight="0.12"
- android:gravity="center|top"
- android:text="@string/about_copyright"
- android:textSize="14sp" />
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="10dp"
+ android:gravity="center"
+ android:text="@string/about_text"
+ android:textSize="16sp" />
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="5dp"
- android:gravity="center"
- android:text="@string/authors"
- android:textSize="12sp" />
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:text="@string/vlc_authors"
- android:textSize="12sp" />
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="22dp"
+ android:layout_weight="0.12"
+ android:gravity="center|top"
+ android:text="@string/about_copyright"
+ android:textSize="14sp" />
- <TextView
- android:id="@+id/main_link"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="15dp"
- android:layout_weight="0.27"
- android:autoLink="web"
- android:gravity="center"
- android:text="@string/about_link"
- android:textSize="14sp" />
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="5dp"
+ android:gravity="center"
+ android:text="@string/authors"
+ android:textSize="12sp" />
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:text="@string/vlc_authors"
+ android:textSize="12sp" />
- <TextView
- android:id="@+id/main_revision"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="20dp"
- android:gravity="center"
- android:text="@string/revision"
- android:textSize="12sp" />
+ <TextView
+ android:id="@+id/main_link"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="15dp"
+ android:layout_weight="0.27"
+ android:autoLink="web"
+ android:gravity="center"
+ android:text="@string/about_link"
+ android:textSize="14sp" />
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="5dp"
- android:gravity="center"
- android:text="@string/compiled_by"
- android:textSize="12sp" />
+ <TextView
+ android:id="@+id/main_revision"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="20dp"
+ android:gravity="center"
+ android:text="@string/revision"
+ android:textSize="12sp" />
- <TextView
- android:id="@+id/main_compiled"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="5dp"
- android:gravity="center"
- android:text=""
- android:textSize="12sp" />
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="5dp"
+ android:gravity="center"
+ android:text="@string/compiled_by"
+ android:textSize="12sp" />
+
+ <TextView
+ android:id="@+id/main_compiled"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="5dp"
+ android:gravity="center"
+ android:text=""
+ android:textSize="12sp" />
- </LinearLayout>
+ </LinearLayout>
+ </ScrollView>
<include layout="@layout/tv_time" />
-</ScrollView>
+</FrameLayout>
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/AboutActivity.java b/vlc-android/src/org/videolan/vlc/gui/tv/AboutActivity.java
index 96f524a3d..ee2516186 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/AboutActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/AboutActivity.java
@@ -2,6 +2,7 @@ package org.videolan.vlc.gui.tv;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
+import android.widget.TextView;
import org.videolan.vlc.R;
import org.videolan.vlc.gui.helpers.UiTools;
@@ -13,5 +14,6 @@ public class AboutActivity extends FragmentActivity {
setContentView(R.layout.about_main);
UiTools.fillAboutView(getWindow().getDecorView().getRootView());
TvUtil.INSTANCE.applyOverscanMargin(this);
+ TimeUpdaterKt.registerTimeView(this, (TextView) findViewById(R.id.tv_time));
}
}
More information about the Android
mailing list