Downloading extensions from Github Repo. (#1101)
Downloading extensions from Github Repo.
This commit is contained in:
26
app/src/main/res/drawable/button_bg_transparent.xml
Normal file
26
app/src/main/res/drawable/button_bg_transparent.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_activated="true" android:color="@color/md_white_1000">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="2dp" />
|
||||
<solid android:color="@color/colorAccentLight" />
|
||||
<padding android:left="8dp" android:right="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_enabled="false" android:color="@color/textColorHintLight">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="2dp" />
|
||||
<solid android:color="@android:color/transparent" />
|
||||
<stroke android:color="@color/textColorHintLight" android:width="1dp"/>
|
||||
<padding android:left="8dp" android:right="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:color="@color/colorAccentLight">
|
||||
<shape android:shape="rectangle" android:color="@color/colorAccentLight">
|
||||
<corners android:radius="2dp" />
|
||||
<solid android:color="@android:color/transparent" />
|
||||
<stroke android:color="@color/colorAccentLight" android:width="1dp"/>
|
||||
<padding android:left="8dp" android:right="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
9
app/src/main/res/drawable/ic_extension_black_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_extension_black_24dp.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M20.5,11H19V7c0,-1.1 -0.9,-2 -2,-2h-4V3.5C13,2.12 11.88,1 10.5,1S8,2.12 8,3.5V5H4c-1.1,0 -1.99,0.9 -1.99,2v3.8H3.5c1.49,0 2.7,1.21 2.7,2.7s-1.21,2.7 -2.7,2.7H2V20c0,1.1 0.9,2 2,2h3.8v-1.5c0,-1.49 1.21,-2.7 2.7,-2.7 1.49,0 2.7,1.21 2.7,2.7V22H17c1.1,0 2,-0.9 2,-2v-4h1.5c1.38,0 2.5,-1.12 2.5,-2.5S21.88,11 20.5,11z"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/ic_no_settings.xml
Normal file
9
app/src/main/res/drawable/ic_no_settings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M9.165,11.554C9.124,11.767 9.103,11.984 9.103,12.201 9.102,13.233 9.57,14.21 10.374,14.857 11.179,15.504 12.234,15.751 13.242,15.528ZM20.732,17.246L15.89,12.537C15.902,12.426 15.907,12.315 15.907,12.203 15.908,11.3 15.55,10.434 14.912,9.796 14.273,9.158 13.408,8.799 12.505,8.799c-0.142,0 -0.285,0.009 -0.426,0.026L8.866,5.698C9.157,5.523 9.462,5.372 9.778,5.247L10.137,2.671C10.175,2.432 10.381,2.256 10.623,2.256l3.881,0c0.24,-0.001 0.445,0.171 0.486,0.407L15.348,5.247c0.588,0.242 1.14,0.563 1.641,0.953l2.415,-0.972c0.221,-0.089 0.474,-0.001 0.593,0.206l1.94,3.365c0.118,0.209 0.065,0.473 -0.123,0.621L19.775,11.005c0.041,0.322 0.063,0.647 0.067,0.972 -0.004,0.313 -0.026,0.625 -0.067,0.935L21.814,14.534c0.186,0.15 0.235,0.413 0.116,0.621zM3.432,3.191L10.468,10.048 15.763,15.201 21.066,20.355 19.627,21.744 16.126,18.332c-0.251,0.142 -0.51,0.267 -0.778,0.374l-0.359,2.576c-0.041,0.236 -0.246,0.408 -0.486,0.407L10.623,21.689c-0.24,0.001 -0.445,-0.171 -0.486,-0.407L9.778,18.706C9.189,18.464 8.637,18.14 8.139,17.743L5.722,18.725C5.5,18.809 5.251,18.722 5.129,18.519L3.189,15.154C3.066,14.948 3.116,14.682 3.305,14.534l2.056,-1.615c-0.043,-0.31 -0.066,-0.622 -0.069,-0.935 0.004,-0.325 0.027,-0.65 0.069,-0.972l-2.056,-1.585C3.112,9.278 3.062,9.007 3.189,8.799l1.122,-1.961L2,4.58Z"/>
|
||||
</vector>
|
||||
24
app/src/main/res/layout/extension_card_header.xml
Normal file
24
app/src/main/res/layout/extension_card_header.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
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="wrap_content">
|
||||
|
||||
<android.support.constraint.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
style="@style/TextAppearance.Regular.SubHeading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingLeft="@dimen/material_component_text_fields_padding_above_and_below_label"
|
||||
android:paddingTop="8dp"
|
||||
tools:text="Title"/>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
</FrameLayout>
|
||||
87
app/src/main/res/layout/extension_card_item.xml
Normal file
87
app/src/main/res/layout/extension_card_item.xml
Normal file
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
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="wrap_content">
|
||||
|
||||
<android.support.constraint.ConstraintLayout
|
||||
android:id="@+id/card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:background="?attr/selectable_list_drawable">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@mipmap/ic_launcher_round"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ext_title"
|
||||
style="@style/TextAppearance.Regular"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.Regular.SubHeading"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintStart_toEndOf="@id/image"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/lang"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="Batoto"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lang"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintStart_toEndOf="@id/image"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ext_title"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
tools:text="English"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/version"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/lang"
|
||||
app:layout_constraintLeft_toRightOf="@id/lang"
|
||||
android:layout_marginLeft="4dp"
|
||||
tools:text="Version" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/ext_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:background="@drawable/button_bg_transparent"
|
||||
android:textColor="@drawable/button_bg_transparent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Details"/>
|
||||
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
15
app/src/main/res/layout/extension_controller.xml
Normal file
15
app/src/main/res/layout/extension_controller.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
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:id="@+id/ext_swipe_refresh">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/ext_recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:listitem="@layout/extension_card_header"/>
|
||||
|
||||
</android.support.v4.widget.SwipeRefreshLayout>
|
||||
104
app/src/main/res/layout/extension_detail_controller.xml
Normal file
104
app/src/main/res/layout/extension_detail_controller.xml
Normal file
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout 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">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/extension_icon"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/extension_title"
|
||||
app:layout_constraintBottom_toBottomOf="@id/extension_pkg"
|
||||
android:src="@mipmap/ic_launcher"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/extension_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
style="@style/TextAppearance.Regular.SubHeading"
|
||||
app:layout_constraintLeft_toRightOf="@id/extension_icon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Tachiyomi: Extension"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/extension_version"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toBottomOf="@id/extension_title"
|
||||
app:layout_constraintLeft_toLeftOf="@id/extension_title"
|
||||
tools:text="Version: 1.0.0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/extension_lang"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toBottomOf="@id/extension_version"
|
||||
app:layout_constraintLeft_toLeftOf="@id/extension_title"
|
||||
tools:text="Language: English" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/extension_pkg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="16dp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="middle"
|
||||
app:layout_constraintTop_toBottomOf="@id/extension_lang"
|
||||
app:layout_constraintLeft_toLeftOf="@id/extension_title"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
tools:text="eu.kanade.tachiyomi.extension.en.myext"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/extension_uninstall_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/ext_uninstall"
|
||||
style="@style/Theme.Widget.Button.Colored"
|
||||
app:layout_constraintLeft_toLeftOf="@id/guideline"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/extension_pkg" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/extension_prefs_recycler"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/extension_uninstall_button"/>
|
||||
|
||||
<eu.kanade.tachiyomi.widget.EmptyView
|
||||
android:id="@+id/extension_prefs_empty_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone"
|
||||
android:gravity="center"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/extension_uninstall_button"/>
|
||||
|
||||
<android.support.constraint.Guideline
|
||||
android:id="@+id/guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
@@ -19,6 +19,10 @@
|
||||
android:id="@+id/nav_drawer_catalogues"
|
||||
android:icon="@drawable/ic_explore_black_24dp"
|
||||
android:title="@string/label_catalogues" />
|
||||
<item
|
||||
android:id="@+id/nav_drawer_extensions"
|
||||
android:icon="@drawable/ic_extension_black_24dp"
|
||||
android:title="@string/label_extensions"/>
|
||||
<item
|
||||
android:id="@+id/nav_drawer_downloads"
|
||||
android:icon="@drawable/ic_file_download_black_24dp"
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
<string name="label_selected">Selected: %1$d</string>
|
||||
<string name="label_backup">Backup</string>
|
||||
<string name="label_migration">Source migration</string>
|
||||
<string name="label_extensions">Extensions</string>
|
||||
<string name="label_extension_info">Extension info</string>
|
||||
|
||||
|
||||
<!-- Actions -->
|
||||
<string name="action_settings">Settings</string>
|
||||
@@ -144,6 +147,26 @@
|
||||
<string name="default_category">Default category</string>
|
||||
<string name="default_category_summary">Always ask</string>
|
||||
|
||||
<!-- Extension section -->
|
||||
<string name="all_lang">All</string>
|
||||
<string name="ext_details">Details</string>
|
||||
<string name="ext_update">Update</string>
|
||||
<string name="ext_install">Install</string>
|
||||
<string name="ext_pending">Pending</string>
|
||||
<string name="ext_downloading">Downloading</string>
|
||||
<string name="ext_installing">Installing</string>
|
||||
<string name="ext_installed">Installed</string>
|
||||
<string name="ext_trust">Trust</string>
|
||||
<string name="ext_untrusted">Untrusted</string>
|
||||
<string name="ext_uninstall">Uninstall</string>
|
||||
<string name="ext_preferences">Preferences</string>
|
||||
<string name="ext_available">Available</string>
|
||||
<string name="untrusted_extension">Untrusted extension</string>
|
||||
<string name="untrusted_extension_message">This extension was signed with an untrusted certificate and it wasn\'t activated.\n\nA malicious extension could read any login credentials stored in Tachiyomi or execute arbitrary code.\n\nBy trusting this certificate you accept these risks.</string>
|
||||
<string name="ext_version_info">Version: %1$s</string>
|
||||
<string name="ext_language_info">Language: %1$s</string>
|
||||
<string name="ext_empty_preferences">There are no preferences to edit for this extension</string>
|
||||
|
||||
<!-- Reader section -->
|
||||
<string name="pref_fullscreen">Fullscreen</string>
|
||||
<string name="pref_lock_orientation">Lock orientation</string>
|
||||
|
||||
Reference in New Issue
Block a user