Skip to content

Commit

Permalink
Merge pull request #120 from jakepurple13/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jakepurple13 authored Jul 8, 2021
2 parents 541c50f + c94e442 commit c34bfa7
Show file tree
Hide file tree
Showing 56 changed files with 1,711 additions and 322 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ local.properties
/animeworld/google-services.json
/mangaworld/google-services.json
/novelworld/google-services.json
/animeworldtv/google-services.json
6 changes: 3 additions & 3 deletions UIViews/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ dependencies {

implementation 'com.facebook.shimmer:shimmer:0.5.0'

implementation 'com.github.bumptech.glide:glide:4.12.0'
kapt 'com.github.bumptech.glide:compiler:4.12.0'
implementation("com.github.bumptech.glide:recyclerview-integration:4.12.0") {
implementation glide
kapt glideCompiler
implementation("com.github.bumptech.glide:recyclerview-integration:$glideVersion") {
// Excludes the support library because it's already included by Glide.
transitive = false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class ChapterAdapter(
binding.swatch = swatchInfo
binding.executePendingBindings()
binding.readChapterButton.setOnClickListener { binding.chapterListCard.performClick() }
binding.markedReadButton.setOnClickListener { binding.readChapter.performClick() }
binding.uploadedInfo2.setOnClickListener { binding.chapterListCard.performClick() }
//binding.markedReadButton.setOnClickListener { binding.readChapter.performClick() }
//binding.uploadedInfo2.setOnClickListener { binding.chapterListCard.performClick() }
binding.chapterListCard.setOnClickListener {
genericInfo.chapterOnClick(chapterModel, dataList, context)
binding.readChapter.isChecked = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class DetailsFragment : Fragment() {
BooleanArray(adapter.itemCount) { i -> checked.any { it1 -> it1.url == adapter[i].url } }
) { _, i, _ ->
(binding.infoChapterList.findViewHolderForAdapterPosition(i) as? ChapterAdapter.ChapterHolder)
?.binding?.markedReadButton?.performClick()
?.binding?.readChapter?.performClick()
}
.setPositiveButton(R.string.done) { d, _ -> d.dismiss() }
.show()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fun collapsingToolbarColors(view: CollapsingToolbarLayout, swatchInfo: SwatchInf

@BindingAdapter("titleColor")
fun titleColor(view: TextView, swatchInfo: SwatchInfo?) {
swatchInfo?.titleColor?.let { view.setTextColor(it) }
swatchInfo?.bodyColor?.let { view.setTextColor(it) }
}

@BindingAdapter("bodyColor")
Expand Down Expand Up @@ -97,6 +97,7 @@ fun buttonTint(view: CheckBox, swatchInfo: SwatchInfo?) {
fun startButtonColor(view: MaterialButton, swatchInfo: SwatchInfo?) {
swatchInfo?.bodyColor?.let { view.iconTint = ColorStateList.valueOf(it) }
swatchInfo?.bodyColor?.let { view.setTextColor(it) }
swatchInfo?.bodyColor?.let { view.strokeColor = ColorStateList.valueOf(it) }
}

@BindingAdapter("uploadedText")
Expand Down
196 changes: 71 additions & 125 deletions UIViews/src/main/res/layout/chapter_item.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layout 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:showIn="@layout/details_fragment">
xmlns:tools="http://schemas.android.com/tools">

<data>

Expand All @@ -15,148 +14,95 @@
type="com.programmersbox.models.SwatchInfo" />
</data>

<com.guanaj.easyswipemenulibrary.EasySwipeMenuLayout
android:id="@+id/swipeMenu"
<com.google.android.material.card.MaterialCardView
android:id="@+id/chapterListCard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
app:canRightSwipe="true"
app:contentView="@id/chapterListCard"
app:rightMenuView="@id/chapterOptions">
android:layout_marginVertical="5dp"
app:cardBackgroundColor="@{swatch.rgb}"
app:cardCornerRadius="0dp"
tools:cardBackgroundColor="@sample/sample_colors">

<LinearLayout
android:id="@+id/chapterOptions"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginHorizontal="5dp"
android:orientation="horizontal">
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">

<com.google.android.material.button.MaterialButton
android:id="@+id/readChapterButton"
style="@style/Widget.App.Button.OutlinedButton.IconOnly"
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/readChapter"
style="@style/TextAppearance.MaterialComponents.Body1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginHorizontal="5dp"
app:icon="@drawable/ic_baseline_play_arrow_24"
app:iconGravity="textTop"
app:iconTint="?android:textColorPrimary"
android:drawableTint="#ffffff"
android:text="@string/read"
android:textColor="?android:textColorPrimary"
app:optionTint="@{swatch}"
app:strokeColor="#ffffff" />

<com.google.android.material.button.MaterialButton
android:id="@+id/downloadChapterButton"
style="@style/Widget.App.Button.OutlinedButton.IconOnly"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:text="@{chapter.name}"
app:checkedButtonTint="@{swatch}"
app:layout_constrainedWidth="true"
app:titleColor="@{swatch}"
tools:checked="true"
tools:checkedButtonTint="@sample/sample_colors"
tools:text="@tools:sample/full_names"
tools:textColor="@sample/sample_colors" />

<TextView
android:id="@+id/uploadedInfo"
style="@style/TextAppearance.MaterialComponents.Subtitle2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
app:bodyColor="@{swatch}"
android:layout_gravity="end"
android:layout_marginHorizontal="5dp"
app:icon="@drawable/ic_baseline_download_24"
app:iconGravity="textTop"
app:iconTint="?android:textColorPrimary"
android:drawableTint="#ffffff"
android:text="@string/download_chapter"
android:textColor="?android:textColorPrimary"
app:optionTint="@{swatch}"
app:strokeColor="#ffffff" />

<com.google.android.material.button.MaterialButton
android:id="@+id/markedReadButton"
style="@style/Widget.App.Button.OutlinedButton.IconOnly"
android:layout_width="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:uploadedText="@{chapter}"
tools:text="@tools:sample/date/mmddyy"
tools:textColor="@sample/sample_colors" />

<LinearLayout
android:id="@+id/chapterOptions"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginHorizontal="5dp"
app:icon="@drawable/ic_baseline_done_24"
app:iconTint="?android:textColorPrimary"
android:drawableTint="#ffffff"
app:iconGravity="textTop"
android:text="@string/markAs"
android:textColor="?android:textColorPrimary"
app:optionTint="@{swatch}"
app:strokeColor="#ffffff" />

</LinearLayout>

<com.google.android.material.card.MaterialCardView
android:id="@+id/chapterListCard"
app:cardBackgroundColor="@{swatch.rgb}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:cardBackgroundColor="@sample/sample_colors">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp">

<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/readChapter"
style="@style/TextAppearance.MaterialComponents.Body1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:text="@{chapter.name}"
app:checkedButtonTint="@{swatch}"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/uploadedInfo2"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:titleColor="@{swatch}"
tools:checked="true"
tools:checkedButtonTint="@sample/sample_colors"
tools:text="@tools:sample/full_names"
tools:textColor="@sample/sample_colors" />
android:orientation="horizontal"
android:weightSum="2">

<com.google.android.material.button.MaterialButton
android:id="@+id/uploadedInfo2"
style="@style/Widget.App.Button.Borderless.IconOnly"
android:layout_width="wrap_content"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:id="@+id/readChapterButton"
style="@style/Widget.App.Button.OutlinedButton.IconOnly"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginHorizontal="5dp"
app:iconTint="?android:textColorPrimary"
app:icon="@drawable/action_chapter"
app:iconGravity="textTop"
android:layout_weight="1"
android:drawableTint="#ffffff"
android:text="@string/read"
android:textColor="?android:textColorPrimary"
app:icon="@drawable/ic_baseline_play_arrow_24"
app:iconGravity="textTop"
app:iconTint="?android:textColorPrimary"
app:startButtonColor="@{swatch}"
app:uploadedText="@{chapter}" />
app:strokeColor="#ffffff" />

<TextView
android:id="@+id/uploadedInfo"
style="@style/TextAppearance.MaterialComponents.Subtitle2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:bodyColor="@{swatch}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:uploadedText="@{chapter}"
tools:text="@tools:sample/date/mmddyy"
tools:textColor="@sample/sample_colors" />

<ImageView
android:id="@+id/startReading"
<com.google.android.material.button.MaterialButton
android:id="@+id/downloadChapterButton"
style="@style/Widget.App.Button.OutlinedButton.IconOnly"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone"
android:src="@drawable/action_chapter"
app:layout_constraintBottom_toTopOf="@id/uploadedInfo"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/uploadedInfo"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription"
tools:tint="@sample/sample_colors" />
android:layout_height="match_parent"
android:layout_marginHorizontal="5dp"
android:layout_weight="1"
android:drawableTint="#ffffff"
android:text="@string/download_chapter"
android:textColor="?android:textColorPrimary"
app:icon="@drawable/ic_baseline_download_24"
app:iconGravity="textTop"
app:iconTint="?android:textColorPrimary"
app:startButtonColor="@{swatch}"
app:strokeColor="#ffffff" />

</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>

</com.google.android.material.card.MaterialCardView>
</LinearLayout>

</com.guanaj.easyswipemenulibrary.EasySwipeMenuLayout>
</com.google.android.material.card.MaterialCardView>

</layout>
1 change: 1 addition & 0 deletions UIViews/src/main/res/layout/details_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_marginVertical="5dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/chapter_item" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ enum class Sources(private val api: ApiService) : ApiService by api {

YTS(Yts),

VIDSTREAMING(Vidstreaming),

PUTLOCKERTV(PutlockerTV), PUTLOCKERANIME(PutlockerAnime), PUTLOCKERCARTOONS(PutlockerCartoons), PUTLOCKERMOVIES(PutlockerMovies),

ANIMEKISA_SUBBED(AnimeKisaSubbed), ANIMEKISA_DUBBED(AnimeKisaDubbed), ANIMEKISA_MOVIES(AnimeKisaMovies),

WCO_DUBBED(WcoDubbed), WCO_SUBBED(WcoSubbed), WCO_CARTOON(WcoCartoon), WCO_MOVIES(WcoMovies), WCO_OVA(WcoOva),
Expand Down
Loading

0 comments on commit c34bfa7

Please sign in to comment.