git initial commit with version v1.0.0
This commit is contained in:
parent
dcc9b4d8f7
commit
cfc732712b
138 changed files with 14786 additions and 84 deletions
29
app/src/main/res/animator/card_elevation_animator.xml
Normal file
29
app/src/main/res/animator/card_elevation_animator.xml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2020 Halcyon Mobile
|
||||
~ https://www.halcyonmobile.com
|
||||
~ All rights reserved.
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:state_enabled="true"
|
||||
android:state_pressed="true">
|
||||
<set>
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="translationZ"
|
||||
android:valueTo="8dp"
|
||||
android:valueType="floatType"/>
|
||||
</set>
|
||||
</item>
|
||||
<item>
|
||||
<set>
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="translationZ"
|
||||
android:valueTo="0"
|
||||
android:valueType="floatType"/>
|
||||
</set>
|
||||
</item>
|
||||
</selector>
|
||||
5
app/src/main/res/color/outline_stroke_color.xml
Normal file
5
app/src/main/res/color/outline_stroke_color.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="?attr/colorPrimary" android:state_enabled="true"/>
|
||||
<item android:color="?attr/colorOnSurface"/>
|
||||
</selector>
|
||||
17
app/src/main/res/drawable-v24/ic_launcher_foreground.xml
Normal file
17
app/src/main/res/drawable-v24/ic_launcher_foreground.xml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillAlpha="0.9"
|
||||
android:fillColor="@color/purple_500"
|
||||
android:pathData="M10.3,5 l2,0 l0,8 l-5,0 l4.5,5 l4,-4, l-5,0" />
|
||||
<path
|
||||
android:fillColor="@color/purple_200"
|
||||
android:fillAlpha="0.9"
|
||||
android:pathData="M11.8,5 l2,0 l0,8 l-5,0 l3.5,5 l4.5,-5, l-5,0" />
|
||||
<path
|
||||
android:fillColor="@color/close_to_white"
|
||||
android:pathData="M11,5.3 l2,0 l0,8 l-5,0 l4,4 l4,-4, l-5,0" />
|
||||
</vector>
|
||||
15
app/src/main/res/drawable/ic_download.xml
Normal file
15
app/src/main/res/drawable/ic_download.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,4c-4.41,0 -8,3.59 -8,8s3.59,8 8,8s8,-3.59 8,-8S16.41,4 12,4zM12,16l-4,-4h3l0,-4h2l0,4h3L12,16z"
|
||||
android:strokeAlpha="0.3"
|
||||
android:fillAlpha="0.3"/>
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,4c4.41,0 8,3.59 8,8s-3.59,8 -8,8s-8,-3.59 -8,-8S7.59,4 12,4M12,2C6.48,2 2,6.48 2,12c0,5.52 4.48,10 10,10c5.52,0 10,-4.48 10,-10C22,6.48 17.52,2 12,2L12,2zM13,12l0,-4h-2l0,4H8l4,4l4,-4H13z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
10
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="@color/close_to_black"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_round_refresh.xml
Normal file
10
app/src/main/res/drawable/ic_round_refresh.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M17.65,6.35c-1.63,-1.63 -3.94,-2.57 -6.48,-2.31 -3.67,0.37 -6.69,3.35 -7.1,7.02C3.52,15.91 7.27,20 12,20c3.19,0 5.93,-1.87 7.21,-4.56 0.32,-0.67 -0.16,-1.44 -0.9,-1.44 -0.37,0 -0.72,0.2 -0.88,0.53 -1.13,2.43 -3.84,3.97 -6.8,3.31 -2.22,-0.49 -4.01,-2.3 -4.48,-4.52C5.31,9.44 8.26,6 12,6c1.66,0 3.14,0.69 4.22,1.78l-1.51,1.51c-0.63,0.63 -0.19,1.71 0.7,1.71H19c0.55,0 1,-0.45 1,-1V6.41c0,-0.89 -1.08,-1.34 -1.71,-0.71l-0.64,0.65z"/>
|
||||
</vector>
|
||||
15
app/src/main/res/drawable/ic_twotone_help.xml
Normal file
15
app/src/main/res/drawable/ic_twotone_help.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,4c-4.41,0 -8,3.59 -8,8s3.59,8 8,8 8,-3.59 8,-8 -3.59,-8 -8,-8zM13,18h-2v-2h2v2zM13,15h-2c0,-3.25 3,-3 3,-5 0,-1.1 -0.9,-2 -2,-2s-2,0.9 -2,2L8,10c0,-2.21 1.79,-4 4,-4s4,1.79 4,4c0,2.5 -3,2.75 -3,5z"
|
||||
android:strokeAlpha="0.3"
|
||||
android:fillAlpha="0.3"/>
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M11,16h2v2h-2zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM12,6c-2.21,0 -4,1.79 -4,4h2c0,-1.1 0.9,-2 2,-2s2,0.9 2,2c0,2 -3,1.75 -3,5h2c0,-2.25 3,-2.5 3,-5 0,-2.21 -1.79,-4 -4,-4z"/>
|
||||
</vector>
|
||||
15
app/src/main/res/drawable/ic_twotone_image.xml
Normal file
15
app/src/main/res/drawable/ic_twotone_image.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorOnSurface">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M5,19h14L19,5L5,5v14zM9,13.14l2.14,2.58 3,-3.87L18,17L6,17l3,-3.86z"
|
||||
android:strokeAlpha="0.3"
|
||||
android:fillAlpha="0.3"/>
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,3L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM19,19L5,19L5,5h14v14zM14.14,11.86l-3,3.86L9,13.14 6,17h12z"/>
|
||||
</vector>
|
||||
52
app/src/main/res/layout/activity_main.xml
Normal file
52
app/src/main/res/layout/activity_main.xml
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.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:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.main.MainActivity">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fragment_holder"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottom_navigation"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/snack_bar_anchor"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/download_fab"
|
||||
app:layout_constraintEnd_toStartOf="@id/download_fab"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/download_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottom_navigation"
|
||||
android:layout_margin="@dimen/activity_horizontal_margin"
|
||||
android:contentDescription="@string/start_download"
|
||||
android:scaleX="0"
|
||||
android:scaleY="0"
|
||||
app:srcCompat="@drawable/ic_round_refresh"
|
||||
app:tint="?attr/colorOnSecondary" />
|
||||
|
||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
android:id="@+id/bottom_navigation"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:menu="@menu/main_navigation" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
135
app/src/main/res/layout/fragment_help.xml
Normal file
135
app/src/main/res/layout/fragment_help.xml
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/default_padding"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/default_padding"
|
||||
app:cardCornerRadius="@dimen/card_corner_radius"
|
||||
app:cardElevation="@dimen/card_elevation">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_margin="@dimen/default_padding"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/how_to_use_in_app"
|
||||
android:textAppearance="?attr/textAppearanceSubtitle1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/default_padding"
|
||||
android:text="@string/how_to_use_in_app_description" />
|
||||
|
||||
<com.pierfrancescosoffritti.androidyoutubeplayer.core.player.views.YouTubePlayerView
|
||||
android:id="@+id/in_app_youtube_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/default_padding"
|
||||
app:autoPlay="false"
|
||||
app:showFullScreenButton="false"
|
||||
app:enableAutomaticInitialization="true"
|
||||
app:handleNetworkEvents="true"
|
||||
app:videoId="NXv3JpmwA8Y" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/default_padding"
|
||||
app:cardCornerRadius="@dimen/card_corner_radius"
|
||||
app:cardElevation="@dimen/card_elevation">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_margin="@dimen/default_padding"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/how_to_use_from_tiktok"
|
||||
android:textAppearance="?attr/textAppearanceSubtitle1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/default_padding"
|
||||
android:text="@string/how_to_use_from_tiktok_description" />
|
||||
|
||||
<com.pierfrancescosoffritti.androidyoutubeplayer.core.player.views.YouTubePlayerView
|
||||
android:id="@+id/in_tiktok_youtube_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/default_padding"
|
||||
app:autoPlay="false"
|
||||
app:showFullScreenButton="false"
|
||||
app:enableAutomaticInitialization="true"
|
||||
app:handleNetworkEvents="true"
|
||||
app:videoId="jxaxffE8c4c" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/default_padding"
|
||||
app:cardCornerRadius="@dimen/card_corner_radius"
|
||||
app:cardElevation="@dimen/card_elevation">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_margin="@dimen/default_padding"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/additional_information"
|
||||
android:textAppearance="?attr/textAppearanceSubtitle1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/default_padding"
|
||||
android:text="@string/error_handling" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/default_padding"
|
||||
android:text="@string/captcha_handling" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/repository_link_view"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/default_padding"
|
||||
android:text="@string/link_to_repository" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
96
app/src/main/res/layout/fragment_queue.xml
Normal file
96
app/src/main/res/layout/fragment_queue.xml
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.motion.widget.MotionLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutDescription="@xml/queue_motion_description">
|
||||
|
||||
<View
|
||||
android:id="@+id/toolbar_background"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="?attr/colorSurface"
|
||||
android:elevation="@dimen/default_toolbar_elevation"
|
||||
app:layout_constraintBottom_toBottomOf="@id/toolbar_bottom_space"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Space
|
||||
android:id="@+id/toolbar_top_space"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/medium_padding"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||
android:text="@string/copy_the_link_from_tiktok_here_to_download_it"
|
||||
android:textAppearance="?attr/textAppearanceSubtitle1"
|
||||
android:translationZ="@dimen/default_toolbar_elevation"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/toolbar_top_space" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/download_url_input_layout"
|
||||
android:theme="@style/Theme.TikTokDownloader.TextInputLayout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_padding"
|
||||
android:imeOptions="actionSend"
|
||||
android:hint="@string/tik_tok_link"
|
||||
android:translationZ="@dimen/default_toolbar_elevation"
|
||||
app:layout_constraintEnd_toEndOf="@id/title"
|
||||
app:layout_constraintStart_toStartOf="@id/title"
|
||||
app:layout_constraintTop_toBottomOf="@id/title">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/download_url_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textUri"
|
||||
android:singleLine="true" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/save_cta"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_padding"
|
||||
android:enabled="false"
|
||||
android:text="@string/start"
|
||||
android:translationZ="@dimen/default_toolbar_elevation"
|
||||
app:layout_constraintEnd_toEndOf="@id/download_url_input_layout"
|
||||
app:layout_constraintTop_toBottomOf="@id/download_url_input_layout" />
|
||||
|
||||
<Space
|
||||
android:id="@+id/toolbar_bottom_space"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/medium_padding"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/save_cta" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="?attr/colorSurface"
|
||||
android:paddingBottom="@dimen/fab_padding"
|
||||
android:clipToPadding="false"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/activity_horizontal_margin"
|
||||
android:paddingEnd="@dimen/activity_horizontal_margin"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/toolbar_background" />
|
||||
|
||||
</androidx.constraintlayout.motion.widget.MotionLayout>
|
||||
72
app/src/main/res/layout/item_downloaded.xml
Normal file
72
app/src/main/res/layout/item_downloaded.xml
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<androidx.cardview.widget.CardView 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:layout_marginTop="@dimen/default_padding"
|
||||
android:stateListAnimator="@animator/card_elevation_animator"
|
||||
app:cardCornerRadius="@dimen/card_corner_radius"
|
||||
app:cardElevation="@dimen/card_elevation">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:padding="@dimen/medium_padding">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/thumbnail"
|
||||
android:layout_width="@dimen/image_indicator"
|
||||
android:layout_height="@dimen/image_indicator"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_twotone_image"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/url"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/medium_padding"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:layout_marginBottom="@dimen/medium_padding"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
|
||||
app:layout_constraintBottom_toTopOf="@id/status"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginEnd="@dimen/medium_padding"
|
||||
app:layout_constraintStart_toEndOf="@id/thumbnail"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="https://www.vm.tiktok.com/DSFAasGFD" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_padding"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle2"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/url"
|
||||
app:layout_constraintTop_toBottomOf="@id/url"
|
||||
tools:text="Pending" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
android:layout_marginTop="@dimen/medium_padding"
|
||||
app:layout_constraintEnd_toEndOf="@id/url"
|
||||
app:layout_constraintStart_toStartOf="@id/url"
|
||||
app:layout_constraintTop_toBottomOf="@id/url" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
14
app/src/main/res/menu/main_navigation.xml
Normal file
14
app/src/main/res/menu/main_navigation.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:id="@+id/queue_menu_item"
|
||||
android:icon="@drawable/ic_download"
|
||||
android:title="@string/queue" />
|
||||
|
||||
<item
|
||||
android:id="@+id/help_menu_item"
|
||||
android:icon="@drawable/ic_twotone_help"
|
||||
android:title="@string/help" />
|
||||
|
||||
</menu>
|
||||
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 821 B |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
20
app/src/main/res/values-night/themes.xml
Normal file
20
app/src/main/res/values-night/themes.xml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.TikTokDownloader">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_200</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/black</item>
|
||||
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorSurface</item>
|
||||
<item name="android:windowLightStatusBar">false</item>
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorSurface">@color/close_to_black</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.TikTokDownloader.TextInputLayout" parent="ThemeOverlay.MaterialComponents">
|
||||
<item name="colorOnSurface">@color/close_to_white</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
10
app/src/main/res/values/colors.xml
Normal file
10
app/src/main/res/values/colors.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="purple_200">#FFBB86FC</color>
|
||||
<color name="purple_500">#FF6200EE</color>
|
||||
<color name="purple_700">#FF3700B3</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="close_to_black">#FF0F0F0F</color>
|
||||
<color name="close_to_white">#FFF0F0F0</color>
|
||||
</resources>
|
||||
11
app/src/main/res/values/dimens.xml
Normal file
11
app/src/main/res/values/dimens.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="activity_horizontal_margin">24dp</dimen>
|
||||
<dimen name="default_padding">16dp</dimen>
|
||||
<dimen name="medium_padding">8dp</dimen>
|
||||
<dimen name="card_elevation">2dp</dimen>
|
||||
<dimen name="card_corner_radius">4dp</dimen>
|
||||
<dimen name="default_toolbar_elevation">4dp</dimen>
|
||||
<dimen name="image_indicator">64dp</dimen>
|
||||
<dimen name="fab_padding">88dp</dimen>
|
||||
</resources>
|
||||
45
app/src/main/res/values/strings.xml
Normal file
45
app/src/main/res/values/strings.xml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<resources>
|
||||
<string name="app_name">TikTokDownloader</string>
|
||||
|
||||
<string name="tik_tok_downloader_started">TikTok Downloader Started</string>
|
||||
<string name="tik_tok_downloader_processing">Downloading: %s</string>
|
||||
<string name="tik_tok_downloader_notification_channel">Downloader Progress</string>
|
||||
|
||||
<string name="queue">Queue</string>
|
||||
<string name="help">Help</string>
|
||||
|
||||
<string name="copy_the_link_from_tiktok_here_to_download_it">Copy link here from TikTok to download it</string>
|
||||
<string name="start_download">Start Download</string>
|
||||
<string name="start">Start</string>
|
||||
|
||||
<string name="status_pending">Pending</string>
|
||||
<string name="status_finished">Downloaded</string>
|
||||
|
||||
<string name="network_error">Network Error</string>
|
||||
<string name="parsing_error">Parsing Error</string>
|
||||
<string name="storage_error">Failed to Store Video</string>
|
||||
<string name="unexpected_error">Unexpected Error</string>
|
||||
<string name="permission_request">Permission Needed</string>
|
||||
<string name="permission_rationale">External Storage permission is needed in order to save the video to your device</string>
|
||||
<string name="ok">OK</string>
|
||||
<string name="cant_operate_without_permission">Can\'t operate without external storage permission</string>
|
||||
<string name="captcha_error">Captcha seems necessary, try later!</string>
|
||||
<string name="tik_tok_link">TikTok Link</string>
|
||||
<string name="how_to_use_in_app">How To Use In App</string>
|
||||
<string name="how_to_use_in_app_description">- Open Queue Screen.
|
||||
\n- Copy the link from TikTok into the input field.
|
||||
\n- Press start.
|
||||
\n- If error happens retry with the refresh button.
|
||||
\n\n<b>Note</b>: Clicking on video will open the Gallery app.</string>
|
||||
<string name="how_to_use_from_tiktok">How To Use From TikTok</string>
|
||||
<string name="how_to_use_from_tiktok_description">- In TikTok press share.
|
||||
\n- Select Other.
|
||||
\n- Select TikTok Downloader.
|
||||
\n- You receive a notification about the state of download.
|
||||
\n- If you need to retry, open the App.
|
||||
</string>
|
||||
<string name="additional_information">Additional Information</string>
|
||||
<string name="error_handling">The download may fail for various reasons. In such case on the Queue screen you will see a refresh icon. Pressing that will retry the download.</string>
|
||||
<string name="captcha_handling">It\'s possible if you try to download too many videos at the same time <b>captcha</b> will be triggered. Since we don\'t want to overload the server, in such case you will need to wait a couple hours to properly retry the download. If that still doesn\'t work you may need to verify a captcha on the same network.</string>
|
||||
<string name="link_to_repository">This is an open source project. You can see the repository clicking <u>here.</u></string>
|
||||
</resources>
|
||||
41
app/src/main/res/values/themes.xml
Normal file
41
app/src/main/res/values/themes.xml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<style name="Theme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/purple_500</item>
|
||||
<item name="colorSecondaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnSecondary">@color/white</item>
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="materialButtonOutlinedStyle">@style/OutlineButtonStyle</item>
|
||||
</style>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.TikTokDownloader">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_500</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorSurface</item>
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorSurface">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="NoDisplayTheme" parent="Theme.TikTokDownloader">
|
||||
<item name="android:windowBackground">@null</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowAnimationStyle">@null</item>
|
||||
<item name="android:windowDisablePreview">true</item>
|
||||
<item name="android:windowNoDisplay">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.TikTokDownloader.TextInputLayout" parent="ThemeOverlay.MaterialComponents">
|
||||
<item name="colorOnSurface">@color/black</item>
|
||||
</style>
|
||||
|
||||
<style name="OutlineButtonStyle" parent="Widget.MaterialComponents.Button.OutlinedButton">
|
||||
<item name="strokeColor">@color/outline_stroke_color</item>
|
||||
<item name="android:textColor">@color/outline_stroke_color</item>
|
||||
</style>
|
||||
</resources>
|
||||
180
app/src/main/res/xml/queue_motion_description.xml
Normal file
180
app/src/main/res/xml/queue_motion_description.xml
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:motion="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<Transition
|
||||
motion:constraintSetEnd="@+id/end"
|
||||
motion:constraintSetStart="@+id/start"
|
||||
motion:motionInterpolator="easeInOut">
|
||||
<OnSwipe
|
||||
motion:dragDirection="dragUp"
|
||||
motion:touchAnchorId="@+id/recycler" />
|
||||
|
||||
<KeyFrameSet>
|
||||
<KeyAttribute
|
||||
android:alpha="0"
|
||||
motion:framePosition="40"
|
||||
motion:motionTarget="@id/title" />
|
||||
<KeyAttribute
|
||||
android:translationX="@dimen/default_padding"
|
||||
motion:framePosition="40"
|
||||
motion:motionTarget="@id/save_cta" />
|
||||
<KeyPosition
|
||||
motion:framePosition="40"
|
||||
motion:motionTarget="@id/save_cta"
|
||||
motion:percentY="0.2" />
|
||||
<KeyPosition
|
||||
motion:framePosition="50"
|
||||
motion:motionTarget="@id/toolbar_background"
|
||||
motion:percentHeight="0.2"
|
||||
motion:percentY="0.2" />
|
||||
<KeyPosition
|
||||
motion:framePosition="50"
|
||||
motion:motionTarget="@id/recycler"
|
||||
motion:percentY="0.2" />
|
||||
<KeyPosition
|
||||
motion:framePosition="70"
|
||||
motion:motionTarget="@id/download_url_input_layout"
|
||||
motion:percentWidth="1"
|
||||
motion:percentX="1" />
|
||||
</KeyFrameSet>
|
||||
</Transition>
|
||||
|
||||
<ConstraintSet android:id="@id/start">
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/toolbar_background"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:elevation="@dimen/default_toolbar_elevation"
|
||||
motion:layout_constraintBottom_toBottomOf="@id/toolbar_bottom_space"
|
||||
motion:layout_constraintEnd_toEndOf="parent"
|
||||
motion:layout_constraintStart_toStartOf="parent"
|
||||
motion:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/toolbar_top_space"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/medium_padding"
|
||||
motion:layout_constraintStart_toStartOf="parent"
|
||||
motion:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||
android:alpha="1"
|
||||
android:translationZ="@dimen/default_toolbar_elevation"
|
||||
motion:layout_constraintEnd_toEndOf="parent"
|
||||
motion:layout_constraintStart_toStartOf="parent"
|
||||
motion:layout_constraintTop_toBottomOf="@id/toolbar_top_space" />
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/download_url_input_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_padding"
|
||||
android:translationZ="@dimen/default_toolbar_elevation"
|
||||
motion:layout_constraintEnd_toEndOf="@id/title"
|
||||
motion:layout_constraintStart_toStartOf="@id/title"
|
||||
motion:layout_constraintTop_toBottomOf="@id/title" />
|
||||
|
||||
<Constraint
|
||||
android:id="@id/save_cta"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_padding"
|
||||
android:translationZ="@dimen/default_toolbar_elevation"
|
||||
motion:layout_constraintEnd_toEndOf="@id/download_url_input_layout"
|
||||
motion:layout_constraintTop_toBottomOf="@id/download_url_input_layout"
|
||||
motion:pathMotionArc="startHorizontal" />
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/toolbar_bottom_space"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/medium_padding"
|
||||
motion:layout_constraintStart_toStartOf="parent"
|
||||
motion:layout_constraintTop_toBottomOf="@id/save_cta" />
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/recycler"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
motion:layout_constraintEnd_toEndOf="parent"
|
||||
motion:layout_constraintBottom_toBottomOf="parent"
|
||||
motion:layout_constraintStart_toStartOf="parent"
|
||||
motion:layout_constraintTop_toBottomOf="@id/toolbar_background" />
|
||||
|
||||
</ConstraintSet>
|
||||
<ConstraintSet android:id="@+id/end">
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/toolbar_background"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:elevation="@dimen/default_toolbar_elevation"
|
||||
motion:layout_constraintBottom_toBottomOf="@id/toolbar_bottom_space"
|
||||
motion:layout_constraintEnd_toEndOf="parent"
|
||||
motion:layout_constraintStart_toStartOf="parent"
|
||||
motion:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/toolbar_top_space"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/medium_padding"
|
||||
motion:layout_constraintStart_toStartOf="parent"
|
||||
motion:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||
android:alpha="0"
|
||||
android:translationZ="@dimen/default_toolbar_elevation"
|
||||
motion:layout_constraintBottom_toTopOf="parent"
|
||||
motion:layout_constraintEnd_toEndOf="parent"
|
||||
motion:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/download_url_input_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_padding"
|
||||
android:layout_marginEnd="@dimen/medium_padding"
|
||||
android:translationZ="@dimen/default_toolbar_elevation"
|
||||
motion:layout_constraintEnd_toStartOf="@id/save_cta"
|
||||
motion:layout_constraintStart_toStartOf="@id/title"
|
||||
motion:layout_constraintTop_toBottomOf="@id/toolbar_top_space" />
|
||||
|
||||
<Constraint
|
||||
android:id="@id/save_cta"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_padding"
|
||||
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||
android:translationZ="@dimen/default_toolbar_elevation"
|
||||
motion:layout_constraintEnd_toEndOf="parent"
|
||||
motion:layout_constraintTop_toBottomOf="@id/download_url_input_layout"
|
||||
motion:layout_constraintTop_toTopOf="@id/download_url_input_layout" />
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/toolbar_bottom_space"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/default_padding"
|
||||
motion:layout_constraintStart_toStartOf="parent"
|
||||
motion:layout_constraintTop_toBottomOf="@id/download_url_input_layout" />
|
||||
|
||||
<Constraint
|
||||
android:id="@+id/recycler"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
motion:layout_constraintEnd_toEndOf="parent"
|
||||
motion:layout_constraintBottom_toBottomOf="parent"
|
||||
motion:layout_constraintStart_toStartOf="parent"
|
||||
motion:layout_constraintTop_toBottomOf="@id/toolbar_background" />
|
||||
</ConstraintSet>
|
||||
</MotionScene>
|
||||
Loading…
Add table
Add a link
Reference in a new issue