Skip to content

Commit

Permalink
Release v2.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
amirisback committed Oct 30, 2023
1 parent 83faa62 commit 9cb9524
Show file tree
Hide file tree
Showing 31 changed files with 213 additions and 92 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
## Version Release
This Is Latest Release

$version_release = 2.5.0
$version_release = 2.5.1

What's New??

Expand Down Expand Up @@ -73,20 +73,20 @@ allprojects {

dependencies {
// library frogo-consume-api
implementation 'com.github.frogobox:frogo-consume-api:2.5.0'
implementation 'com.github.frogobox:frogo-consume-api:2.5.1'

// library frogo-consume-api for desktop
implementation 'com.github.frogobox.frogo-consume-api:core-api:2.5.0'
implementation 'com.github.frogobox.frogo-consume-api:core-api:2.5.1'
}

#### <Option 2> Kotlin DSL Gradle

dependencies {
// library frogo-consume-api
implementation("com.github.frogobox:frogo-consume-api:2.5.0")
implementation("com.github.frogobox:frogo-consume-api:2.5.1")

// library frogo-consume-api for desktop
implementation("com.github.frogobox.frogo-consume-api:core-api:2.5.0")
implementation("com.github.frogobox.frogo-consume-api:core-api:2.5.1")
}


Expand Down
39 changes: 20 additions & 19 deletions app/src/main/java/com/frogobox/appapi/mvvm/meal/MealActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import android.view.LayoutInflater
import android.view.ViewGroup
import com.bumptech.glide.Glide
import com.frogobox.appapi.databinding.ActivityMealBinding
import com.frogobox.appapi.databinding.ItemGridImageBinding
import com.frogobox.coreutil.meal.model.Meal
import com.frogobox.recycler.core.FrogoRecyclerNotifyListener
import com.frogobox.recycler.core.IFrogoBindingAdapter
import com.frogobox.sdk.ext.openDetailImageUri
import com.frogobox.sdk.ext.progressViewHandle
import com.frogobox.sdk.ext.showToast
import com.frogobox.sdk.view.FrogoBindActivity
import com.frogobox.ui.databinding.FrogoRvGridType2Binding
import org.koin.androidx.viewmodel.ext.android.viewModel

class MealActivity : FrogoBindActivity<ActivityMealBinding>() {
Expand Down Expand Up @@ -46,52 +47,52 @@ class MealActivity : FrogoBindActivity<ActivityMealBinding>() {
mealViewModel.getListMeals(this, "b")
}

private fun setupRv(data: List<com.frogobox.coreutil.meal.model.Meal>) {
private fun setupRv(data: List<Meal>) {

val adapterCallback = object : IFrogoBindingAdapter<com.frogobox.coreutil.meal.model.Meal, FrogoRvGridType2Binding> {
val adapterCallback = object : IFrogoBindingAdapter<Meal, ItemGridImageBinding> {

override fun setViewBinding(parent: ViewGroup): FrogoRvGridType2Binding {
return FrogoRvGridType2Binding.inflate(
override fun setViewBinding(parent: ViewGroup): ItemGridImageBinding {
return ItemGridImageBinding.inflate(
LayoutInflater.from(parent.context),
parent,
false
)
}

override fun setupInitComponent(
binding: FrogoRvGridType2Binding,
data: com.frogobox.coreutil.meal.model.Meal,
binding: ItemGridImageBinding,
data: Meal,
position: Int,
notifyListener: FrogoRecyclerNotifyListener<com.frogobox.coreutil.meal.model.Meal>
notifyListener: FrogoRecyclerNotifyListener<Meal>
) {
binding.apply {
Glide.with(root.context).load(data.strMealThumb).into(frogoRvGridType2IvPoster)
frogoRvGridType2TvTitle.text = data.strMeal
frogoRvGridType2TvSubtitle.text = data.strCategory
Glide.with(root.context).load(data.strMealThumb).into(ivIcon)
tvTitle.text = data.strMeal
tvSub.text = data.strCategory
}
}

override fun onItemClicked(
binding: FrogoRvGridType2Binding,
data: com.frogobox.coreutil.meal.model.Meal,
binding: ItemGridImageBinding,
data: Meal,
position: Int,
notifyListener: FrogoRecyclerNotifyListener<com.frogobox.coreutil.meal.model.Meal>
notifyListener: FrogoRecyclerNotifyListener<Meal>
) {
data.strMeal?.let { showToast(it) }
openDetailImageUri(data.strMealThumb ?: "")
}

override fun onItemLongClicked(
binding: FrogoRvGridType2Binding,
data: com.frogobox.coreutil.meal.model.Meal,
binding: ItemGridImageBinding,
data: Meal,
position: Int,
notifyListener: FrogoRecyclerNotifyListener<com.frogobox.coreutil.meal.model.Meal>
notifyListener: FrogoRecyclerNotifyListener<Meal>
) {
data.strMeal?.let { showToast(it) }
}

}

binding.frogoRv.injectorBinding<com.frogobox.coreutil.meal.model.Meal, FrogoRvGridType2Binding>()
binding.frogoRv.injectorBinding<Meal, ItemGridImageBinding>()
.addData(data)
.addCallback(adapterCallback)
.createLayoutGrid(2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.frogobox.appapi.databinding.FragmentTrendingChildBinding
import com.frogobox.coreutil.movie.MovieUrl
import com.frogobox.recycler.core.FrogoRecyclerNotifyListener
import com.frogobox.recycler.core.IFrogoBindingAdapter
import com.frogobox.sdk.ext.openDetailImageUri
import com.frogobox.sdk.ext.progressViewHandle
import com.frogobox.sdk.ext.showToast
import com.frogobox.sdk.view.FrogoBindFragment
Expand Down Expand Up @@ -60,6 +61,7 @@ class MovieDayFragment : FrogoBindFragment<FragmentTrendingChildBinding>() {
position: Int,
notifyListener: FrogoRecyclerNotifyListener<com.frogobox.coreutil.movie.model.TrendingMovie>
) {
requireActivity().openDetailImageUri("${MovieUrl.BASE_URL_IMAGE_ORIGNAL}${data.poster_path}")
}

override fun onItemLongClicked(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.frogobox.appapi.databinding.FragmentTrendingChildBinding
import com.frogobox.coreutil.movie.MovieUrl
import com.frogobox.recycler.core.FrogoRecyclerNotifyListener
import com.frogobox.recycler.core.IFrogoBindingAdapter
import com.frogobox.sdk.ext.openDetailImageUri
import com.frogobox.sdk.ext.progressViewHandle
import com.frogobox.sdk.ext.showToast
import com.frogobox.sdk.view.FrogoBindFragment
Expand Down Expand Up @@ -61,6 +62,7 @@ class MovieWeekFragment : FrogoBindFragment<FragmentTrendingChildBinding>() {
position: Int,
notifyListener: FrogoRecyclerNotifyListener<com.frogobox.coreutil.movie.model.TrendingMovie>
) {
requireActivity().openDetailImageUri("${MovieUrl.BASE_URL_IMAGE_ORIGNAL}${data.poster_path}")
}

override fun onItemLongClicked(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.frogobox.appapi.databinding.FragmentTrendingChildBinding
import com.frogobox.coreutil.movie.MovieUrl
import com.frogobox.recycler.core.FrogoRecyclerNotifyListener
import com.frogobox.recycler.core.IFrogoBindingAdapter
import com.frogobox.sdk.ext.openDetailImageUri
import com.frogobox.sdk.ext.progressViewHandle
import com.frogobox.sdk.ext.showToast
import com.frogobox.sdk.view.FrogoBindFragment
Expand Down Expand Up @@ -60,6 +61,7 @@ class PersonDayFragment : FrogoBindFragment<FragmentTrendingChildBinding>() {
position: Int,
notifyListener: FrogoRecyclerNotifyListener<com.frogobox.coreutil.movie.model.TrendingPerson>
) {
requireActivity().openDetailImageUri("${MovieUrl.BASE_URL_IMAGE_ORIGNAL}${data.profile_path}")
}

override fun onItemLongClicked(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.frogobox.appapi.databinding.FragmentTrendingChildBinding
import com.frogobox.coreutil.movie.MovieUrl
import com.frogobox.recycler.core.FrogoRecyclerNotifyListener
import com.frogobox.recycler.core.IFrogoBindingAdapter
import com.frogobox.sdk.ext.openDetailImageUri
import com.frogobox.sdk.ext.progressViewHandle
import com.frogobox.sdk.ext.showToast
import com.frogobox.sdk.view.FrogoBindFragment
Expand Down Expand Up @@ -64,6 +65,7 @@ class PersonWeekFragment : FrogoBindFragment<FragmentTrendingChildBinding>() {
position: Int,
notifyListener: FrogoRecyclerNotifyListener<com.frogobox.coreutil.movie.model.TrendingPerson>
) {
requireActivity().openDetailImageUri("${MovieUrl.BASE_URL_IMAGE_ORIGNAL}${data.profile_path}")
}

override fun setViewBinding(parent: ViewGroup): ContentItemBinding {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.frogobox.appapi.databinding.FragmentTrendingChildBinding
import com.frogobox.coreutil.movie.MovieUrl
import com.frogobox.recycler.core.FrogoRecyclerNotifyListener
import com.frogobox.recycler.core.IFrogoBindingAdapter
import com.frogobox.sdk.ext.openDetailImageUri
import com.frogobox.sdk.ext.progressViewHandle
import com.frogobox.sdk.ext.showToast
import com.frogobox.sdk.view.FrogoBindFragment
Expand Down Expand Up @@ -57,6 +58,7 @@ class TvDayFragment : FrogoBindFragment<FragmentTrendingChildBinding>() {
position: Int,
notifyListener: FrogoRecyclerNotifyListener<com.frogobox.coreutil.movie.model.TrendingTv>
) {
requireActivity().openDetailImageUri("${MovieUrl.BASE_URL_IMAGE_ORIGNAL}${data.poster_path}")
}

override fun onItemLongClicked(
Expand Down Expand Up @@ -85,7 +87,7 @@ class TvDayFragment : FrogoBindFragment<FragmentTrendingChildBinding>() {
tvTitle.text = data.name
tvOverview.text = data.overview
Glide.with(root.context)
.load("${com.frogobox.coreutil.movie.MovieUrl.BASE_URL_IMAGE_ORIGNAL}${data.poster_path}")
.load("${MovieUrl.BASE_URL_IMAGE_ORIGNAL}${data.poster_path}")
.into(ivPoster)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.frogobox.appapi.databinding.FragmentTrendingChildBinding
import com.frogobox.coreutil.movie.MovieUrl
import com.frogobox.recycler.core.FrogoRecyclerNotifyListener
import com.frogobox.recycler.core.IFrogoBindingAdapter
import com.frogobox.sdk.ext.openDetailImageUri
import com.frogobox.sdk.ext.progressViewHandle
import com.frogobox.sdk.ext.showToast
import com.frogobox.sdk.view.FrogoBindFragment
Expand Down Expand Up @@ -62,6 +63,7 @@ class TvWeekFragment : FrogoBindFragment<FragmentTrendingChildBinding>() {
position: Int,
notifyListener: FrogoRecyclerNotifyListener<com.frogobox.coreutil.movie.model.TrendingTv>
) {
requireActivity().openDetailImageUri("${MovieUrl.BASE_URL_IMAGE_ORIGNAL}${data.poster_path}")
}

override fun onItemLongClicked(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import android.view.LayoutInflater
import android.view.ViewGroup
import com.bumptech.glide.Glide
import com.frogobox.appapi.databinding.ActivityPixabayBinding
import com.frogobox.appapi.databinding.ItemGridImageBinding
import com.frogobox.coreutil.pixabay.model.PixabayImage
import com.frogobox.recycler.core.FrogoRecyclerNotifyListener
import com.frogobox.recycler.core.IFrogoBindingAdapter
import com.frogobox.sdk.ext.progressViewHandle
import com.frogobox.sdk.ext.showToast
import com.frogobox.sdk.view.FrogoBindActivity
import com.frogobox.ui.databinding.FrogoRvGridType1Binding
import org.koin.androidx.viewmodel.ext.android.viewModel

class PixabayActivity : FrogoBindActivity<ActivityPixabayBinding>() {
Expand Down Expand Up @@ -46,48 +46,49 @@ class PixabayActivity : FrogoBindActivity<ActivityPixabayBinding>() {
setupDetailActivity("Pixabay Api")
}

private fun setupRv(data: List<com.frogobox.coreutil.pixabay.model.PixabayImage>) {
private fun setupRv(data: List<PixabayImage>) {

val adapterCallback = object : IFrogoBindingAdapter<com.frogobox.coreutil.pixabay.model.PixabayImage, FrogoRvGridType1Binding> {
val adapterCallback = object : IFrogoBindingAdapter<PixabayImage, ItemGridImageBinding> {
override fun onItemClicked(
binding: FrogoRvGridType1Binding,
data: com.frogobox.coreutil.pixabay.model.PixabayImage,
binding: ItemGridImageBinding,
data: PixabayImage,
position: Int,
notifyListener: FrogoRecyclerNotifyListener<com.frogobox.coreutil.pixabay.model.PixabayImage>
notifyListener: FrogoRecyclerNotifyListener<PixabayImage>
) {
}

override fun onItemLongClicked(
binding: FrogoRvGridType1Binding,
data: com.frogobox.coreutil.pixabay.model.PixabayImage,
binding: ItemGridImageBinding,
data: PixabayImage,
position: Int,
notifyListener: FrogoRecyclerNotifyListener<com.frogobox.coreutil.pixabay.model.PixabayImage>
notifyListener: FrogoRecyclerNotifyListener<PixabayImage>
) {
}

override fun setViewBinding(parent: ViewGroup): FrogoRvGridType1Binding {
return FrogoRvGridType1Binding.inflate(
override fun setViewBinding(parent: ViewGroup): ItemGridImageBinding {
return ItemGridImageBinding.inflate(
LayoutInflater.from(parent.context),
parent,
false
)
}

override fun setupInitComponent(
binding: FrogoRvGridType1Binding,
data: com.frogobox.coreutil.pixabay.model.PixabayImage,
binding: ItemGridImageBinding,
data: PixabayImage,
position: Int,
notifyListener: FrogoRecyclerNotifyListener<com.frogobox.coreutil.pixabay.model.PixabayImage>
notifyListener: FrogoRecyclerNotifyListener<PixabayImage>
) {
val totalLikes = "${data.likes} likes"
binding.apply {
Glide.with(root.context).load(data.previewURL).into(frogoRvGridType1IvPoster)
frogoRvGridType1TvTitle.text = totalLikes
Glide.with(root.context).load(data.previewURL).into(ivIcon)
tvTitle.text = totalLikes
tvSub.text = data.user
}
}
}

binding.frogoRv.injectorBinding<com.frogobox.coreutil.pixabay.model.PixabayImage, FrogoRvGridType1Binding>()
binding.frogoRv.injectorBinding<PixabayImage, ItemGridImageBinding>()
.addData(data)
.addCallback(adapterCallback)
.createLayoutGrid(2)
Expand Down
24 changes: 24 additions & 0 deletions app/src/main/res/drawable/bg_card_16dp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
* Created by
* FrogoBox Inc License
* =========================================
*
* Copyright (C) .
* All rights reserved
*
* Name : Muhammad Faisal Amir
* E-mail : faisalamircs@gmail.com
* Github : github.com/amirisback
* LinkedIn : linkedin.com/in/faisalamircs
*
* FrogoBox Software Industries
*
-->

<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/bg_card_color" />
<corners android:radius="@dimen/frogo_dimen_16dp" />
</shape>
24 changes: 24 additions & 0 deletions app/src/main/res/drawable/bg_card_8dp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
* Created by
* FrogoBox Inc License
* =========================================
*
* Copyright (C) .
* All rights reserved
*
* Name : Muhammad Faisal Amir
* E-mail : faisalamircs@gmail.com
* Github : github.com/amirisback
* LinkedIn : linkedin.com/in/faisalamircs
*
* FrogoBox Software Industries
*
-->

<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/bg_card_color" />
<corners android:radius="@dimen/frogo_dimen_8dp" />
</shape>
1 change: 0 additions & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
android:id="@+id/rv_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/frogoColorWhite"
android:clipToPadding="false"
android:paddingBottom="@dimen/frogo_dimen_16dp">

Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/activity_meal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
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"
android:background="@color/frogoColorWhite">
android:layout_height="match_parent">

<com.frogobox.recycler.widget.FrogoRecyclerView
android:id="@+id/frogo_rv"
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/layout/activity_movie.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
android:id="@+id/bottom_nav_main_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/frogoColorWhite"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -19,7 +18,6 @@
android:id="@+id/framelayout_main_container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@color/frogoColorWhite"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
Expand Down
Loading

0 comments on commit 9cb9524

Please sign in to comment.