Browse Source

Added download fragment

master
CookieGamesOfficial 4 months ago
parent
commit
56a3f64dda
  1. 48
      app/src/main/res/layout/fragment_home.xml
  2. 31
      app/src/main/res/values/strings.xml
  3. 8
      gradle.properties

48
app/src/main/res/layout/fragment_home.xml

@ -8,17 +8,6 @@
tools:context="com.cookiejarapps.smartcookieweb_ytdl.MainActivity"
tools:showPaths="true">
<ImageView
android:id="@+id/demo_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:padding="32dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/example" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/video_list"
android:layout_width="0dp"
@ -33,14 +22,28 @@
<TextView
android:id="@+id/start_text"
android:textAlignment="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="20dp"
android:layout_marginTop="8dp"
android:text="@string/app_successful"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
app:layout_constraintTop_toBottomOf="@id/demo_image" />
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="10dp" />
<TextView
android:id="@+id/error_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="8dp"
android:text="@string/invalid_url"
android:textAlignment="center"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/urlEditText" />
<TextView
android:id="@+id/loading_text"
@ -68,4 +71,21 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/urlEditText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="51dp"
android:layout_marginEnd="16dp"
android:imeOptions="actionGo"
android:imeActionId="373"
android:imeActionLabel="Some Label"
android:ems="10"
android:hint="@string/url"
android:inputType="textUri"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/start_text" />
</androidx.constraintlayout.widget.ConstraintLayout>

31
app/src/main/res/values/strings.xml

@ -1,5 +1,28 @@
<resources>
<string name="app_name">SmartCookieWeb-ytdl</string>
<string name="app_required">SmartCookieWeb doesn\'t appear to be installed on your device. This app requires SmartCookieWeb to function.</string>
<string name="app_successful">Open SmartCookieWeb and navigate to a video page to download.</string>
</resources>
<string name="app_name" translatable="false">VideoDL</string>
<string name="youtubedl" translatable="false">youtube-dl</string>
<string name="startup_error">youtube-dl could not be started</string>
<string name="placeholder">None</string>
<string name="app_successful">Enter an URL below, or navigate to an URL in SmartCookieWeb.</string>
<string name="data">Getting video data…</string>
<string name="video">Video</string>
<string name="downloads">Downloads</string>
<string name="watch">Watch</string>
<string name="settings">Settings</string>
<string name="delete_download">Remove this download from list?</string>
<string name="url">URL</string>
<string name="app_not_found">No app found on device for opening this content</string>
<string name="download_location_title">Download location</string>
<string name="action_choose_folder">Choose folder</string>
<string name="download_already_running">A download is already running</string>
<string name="download_queued">Download queued</string>
<string name="invalid_download_location">Invalid download location</string>
<string name="choose_download_location_title">Choose directory</string>
<string name="invalid_url">Invalid url</string>
<string name="download_start">Starting download</string>
<string name="downloading">Downloading…</string>
<string name="copyright_warning">Using a copyrighted work without permission is copyright infringement and may be illegal in the country you live in. CookieJarApps is not responsible for any copyright infringements.</string>
<string name="copyright">Copyright</string>
<string name="cancel">Cancel</string>
<string name="accept">Accept</string>
</resources>

8
gradle.properties

@ -6,16 +6,18 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
kotlin.code.style=official
# ndk abi filters
ABI_FILTERS=x86;x86_64;armeabi-v7a;arm64-v8a
Loading…
Cancel
Save