Add about activity
This commit is contained in:
parent
388e8d0c2f
commit
f13731f91e
22 changed files with 2280 additions and 9 deletions
40
app/src/main/res/layout/activity_about.xml
Normal file
40
app/src/main/res/layout/activity_about.xml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context="org.schabi.newpipe.about.AboutActivity">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/appbar_padding_top"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay">
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
<android.support.design.widget.TabLayout
|
||||
android:id="@+id/tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
95
app/src/main/res/layout/fragment_about.xml
Normal file
95
app/src/main/res/layout/fragment_about.xml
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
<android.support.v4.widget.NestedScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="org.schabi.newpipe.about.AboutActivity$AboutFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:srcCompat="@mipmap/ic_launcher" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/app_name"
|
||||
android:textAppearance="@android:style/TextAppearance.Large" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:textAppearance="@android:style/TextAppearance.Medium"
|
||||
tools:text="0.9.9" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/app_description" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_contribution"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp"
|
||||
android:text="@string/contribution_title"
|
||||
android:textAppearance="@android:style/TextAppearance.Medium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/contribution_encouragement" />
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/github_link"
|
||||
style="@style/Base.Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:text="@string/view_on_github" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_license_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp"
|
||||
android:text="@string/app_license_title"
|
||||
android:textAppearance="@android:style/TextAppearance.Medium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/app_license"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/app_license" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/app_read_license"
|
||||
style="@style/Base.Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:text="@string/read_full_license" />
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
29
app/src/main/res/layout/fragment_licenses.xml
Normal file
29
app/src/main/res/layout/fragment_licenses.xml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="20dp"
|
||||
android:text="@string/title_licenses"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/software_components"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
27
app/src/main/res/layout/item_software_component.xml
Normal file
27
app/src/main/res/layout/item_software_component.xml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:orientation="vertical"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp"
|
||||
android:textAppearance="@android:style/TextAppearance.Medium"
|
||||
tools:text="Software Name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/copyright"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/name"
|
||||
android:paddingBottom="10dp"
|
||||
tools:text="@string/copyright" />
|
||||
</RelativeLayout>
|
||||
|
|
@ -12,4 +12,7 @@
|
|||
android:title="@string/settings"
|
||||
app:showAsAction="never"/>
|
||||
|
||||
<item android:id="@+id/action_about"
|
||||
android:orderInCategory="1000"
|
||||
android:title="@string/action_about" />
|
||||
</menu>
|
||||
16
app/src/main/res/menu/menu_about.xml
Normal file
16
app/src/main/res/menu/menu_about.xml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="org.schabi.newpipe.about.AboutActivity">
|
||||
|
||||
<item android:id="@+id/action_show_downloads"
|
||||
android:orderInCategory="980"
|
||||
android:title="@string/downloads"
|
||||
app:showAsAction="never"/>
|
||||
|
||||
<item android:id="@+id/action_settings"
|
||||
android:orderInCategory="990"
|
||||
android:title="@string/settings"
|
||||
app:showAsAction="never"/>
|
||||
|
||||
</menu>
|
||||
10
app/src/main/res/menu/software_component.xml
Normal file
10
app/src/main/res/menu/software_component.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/action_website"
|
||||
android:title="@string/action_open_website" />
|
||||
<item
|
||||
android:id="@+id/action_show_license"
|
||||
android:title="@string/read_full_license">
|
||||
</item>
|
||||
</menu>
|
||||
|
|
@ -20,6 +20,7 @@
|
|||
<dimen name="video_item_search_duration_horizontal_padding">5sp</dimen>
|
||||
<dimen name="video_item_search_duration_margin">2sp</dimen>
|
||||
<dimen name="video_item_detail_description_to_details_margin">4dp</dimen>
|
||||
<dimen name="software_component_item_padding">8dp</dimen>
|
||||
<!-- Miscellaneous -->
|
||||
<dimen name="popup_default_width">180dp</dimen>
|
||||
<dimen name="popup_minimum_width">120dp</dimen>
|
||||
|
|
@ -46,5 +47,9 @@
|
|||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="app_bar_height">180dp</dimen>
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
<dimen name="text_margin">16dp</dimen>
|
||||
<dimen name="appbar_padding_top">8dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -190,4 +190,23 @@
|
|||
|
||||
<!-- End of GigaGet's Strings -->
|
||||
|
||||
<!-- About -->
|
||||
<string name="title_activity_about">About NewPipe</string>
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="action_about">About</string>
|
||||
<string name="title_licenses">Third-party Licenses</string>
|
||||
<string name="copyright" formatted="true">© %1$s by %2$s under %3$s</string>
|
||||
<string name="error_unable_to_load_license">Could not load license</string>
|
||||
<string name="action_open_website">Open website</string>
|
||||
<string name="tab_about">About</string>
|
||||
<string name="tab_contributors">Contributors</string>
|
||||
<string name="tab_licenses">Licenses</string>
|
||||
<string name="github_url">https://github.com/TeamNewPipe/NewPipe</string>
|
||||
<string name="app_description">A free lightweight Youtube frontend for Android.</string>
|
||||
<string name="app_license" translatable="false">NewPipe is Free Software: You can use, study share and improve it at your will. Specifically you can redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</string>
|
||||
<string name="view_on_github">View on Github</string>
|
||||
<string name="app_license_title">NewPipe\'s License</string>
|
||||
<string name="contribution_encouragement">Whether you have ideas, translation, design changes, code cleaning, or real heavy code changes, help is always welcome. The more is done the better it gets!</string>
|
||||
<string name="read_full_license">Read license</string>
|
||||
<string name="contribution_title">Contribution</string>
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue