Skip to content

Commit a9b7e9d

Browse files
Merge branch 'feature/home-formatting' into develop
2 parents 6204a30 + c842c3a commit a9b7e9d

23 files changed

Lines changed: 50 additions & 35 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<resources>
2-
<string name="app_name">PropertyFindAR</string>
2+
<string name="app_name">Property FindAR</string>
33
<string name="title_home">Home</string>
44
<string name="title_favorites">Favorites</string>
55
<string name="title_notification">Notification</string>

features/home/src/main/java/com/smarttoolfactory/home/adapter/PropertyListAdapter.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.smarttoolfactory.home.adapter
22

3+
import android.graphics.Color
34
import android.widget.ImageButton
45
import androidx.annotation.LayoutRes
56
import androidx.databinding.ViewDataBinding
@@ -57,12 +58,15 @@ class PropertyItemListAdapter(
5758
onLikeButtonClick(this)
5859

5960
// Set image source of like button
61+
val likeImageButton = (likeButton as? ImageButton)
6062
val imageResource = if (isFavorite) {
61-
R.drawable.ic_baseline_favorite_24
63+
likeImageButton?.setColorFilter(Color.rgb(244, 81, 30))
64+
R.drawable.ic_baseline_favorite_30
6265
} else {
63-
R.drawable.ic_baseline_favorite_border_24
66+
likeImageButton?.setColorFilter(Color.rgb(41, 182, 246))
67+
R.drawable.ic_baseline_favorite_border_30
6468
}
65-
(likeButton as? ImageButton)?.setImageResource(imageResource)
69+
likeImageButton?.setImageResource(imageResource)
6670
}
6771
}
6872
}

features/home/src/main/java/com/smarttoolfactory/home/di/HomeComponent.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ package com.smarttoolfactory.home.di
22

33
import androidx.fragment.app.Fragment
44
import com.smarttoolfactory.core.di.CoreModuleDependencies
5-
import com.smarttoolfactory.home.propertylist.PagedPropertyListFragment
6-
import com.smarttoolfactory.home.propertylist.PropertyListFlowFragment
7-
import com.smarttoolfactory.home.propertylist.PropertyListRxjava3Fragment
5+
import com.smarttoolfactory.home.propertylist.flow.PropertyListFlowFragment
6+
import com.smarttoolfactory.home.propertylist.paged.PagedPropertyListFragment
7+
import com.smarttoolfactory.home.propertylist.rxjava.PropertyListRxjava3Fragment
88
import dagger.BindsInstance
99
import dagger.Component
1010

features/home/src/main/java/com/smarttoolfactory/home/di/HomeModule.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ package com.smarttoolfactory.home.di
22

33
import androidx.fragment.app.Fragment
44
import androidx.lifecycle.ViewModelProvider
5-
import com.smarttoolfactory.home.viewmodel.PagedPropertyListViewModel
5+
import com.smarttoolfactory.home.propertylist.flow.PropertyListViewModelFlow
6+
import com.smarttoolfactory.home.propertylist.paged.PagedPropertyListViewModel
7+
import com.smarttoolfactory.home.propertylist.rxjava.PropertyListViewModelRxJava3
68
import com.smarttoolfactory.home.viewmodel.PagedPropertyListViewModelFactory
79
import com.smarttoolfactory.home.viewmodel.PropertyListFlowViewModelFactory
810
import com.smarttoolfactory.home.viewmodel.PropertyListRxJava3ViewModelFactory
9-
import com.smarttoolfactory.home.viewmodel.PropertyListViewModelFlow
10-
import com.smarttoolfactory.home.viewmodel.PropertyListViewModelRxJava3
1111
import dagger.Module
1212
import dagger.Provides
1313
import dagger.hilt.InstallIn

features/home/src/main/java/com/smarttoolfactory/home/viewmodel/AbstractPropertyListVM.kt renamed to features/home/src/main/java/com/smarttoolfactory/home/propertylist/AbstractPropertyListVM.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.smarttoolfactory.home.viewmodel
1+
package com.smarttoolfactory.home.propertylist
22

33
import androidx.lifecycle.LiveData
44
import androidx.lifecycle.ViewModel

features/home/src/main/java/com/smarttoolfactory/home/propertylist/PropertyListFlowFragment.kt renamed to features/home/src/main/java/com/smarttoolfactory/home/propertylist/flow/PropertyListFlowFragment.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.smarttoolfactory.home.propertylist
1+
package com.smarttoolfactory.home.propertylist.flow
22

33
import android.os.Bundle
44
import androidx.core.os.bundleOf
@@ -12,7 +12,6 @@ import com.smarttoolfactory.home.adapter.PropertyItemListAdapter
1212
import com.smarttoolfactory.home.databinding.FragmentPropertyListBinding
1313
import com.smarttoolfactory.home.di.DaggerHomeComponent
1414
import com.smarttoolfactory.home.viewmodel.HomeToolbarVM
15-
import com.smarttoolfactory.home.viewmodel.PropertyListViewModelFlow
1615
import dagger.hilt.android.EntryPointAccessors
1716
import javax.inject.Inject
1817

features/home/src/main/java/com/smarttoolfactory/home/viewmodel/PropertyListViewModelFlow.kt renamed to features/home/src/main/java/com/smarttoolfactory/home/propertylist/flow/PropertyListViewModelFlow.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.smarttoolfactory.home.viewmodel
1+
package com.smarttoolfactory.home.propertylist.flow
22

33
import androidx.hilt.lifecycle.ViewModelInject
44
import androidx.lifecycle.LiveData
@@ -10,6 +10,7 @@ import com.smarttoolfactory.core.viewstate.ViewState
1010
import com.smarttoolfactory.domain.ORDER_BY_NONE
1111
import com.smarttoolfactory.domain.model.PropertyItem
1212
import com.smarttoolfactory.domain.usecase.GetPropertiesUseCaseFlow
13+
import com.smarttoolfactory.home.propertylist.AbstractPropertyListVM
1314
import kotlinx.coroutines.CoroutineScope
1415
import kotlinx.coroutines.flow.launchIn
1516
import kotlinx.coroutines.flow.onEach

features/home/src/main/java/com/smarttoolfactory/home/propertylist/PagedPropertyListFragment.kt renamed to features/home/src/main/java/com/smarttoolfactory/home/propertylist/paged/PagedPropertyListFragment.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
package com.smarttoolfactory.home.propertylist
1+
package com.smarttoolfactory.home.propertylist.paged
22

33
import android.os.Bundle
4-
import android.widget.Toast
54
import androidx.core.os.bundleOf
65
import androidx.fragment.app.activityViewModels
76
import androidx.recyclerview.widget.LinearLayoutManager
@@ -14,7 +13,6 @@ import com.smarttoolfactory.home.adapter.PropertyItemListAdapter
1413
import com.smarttoolfactory.home.databinding.FragmentPropertyListPagedBinding
1514
import com.smarttoolfactory.home.di.DaggerHomeComponent
1615
import com.smarttoolfactory.home.viewmodel.HomeToolbarVM
17-
import com.smarttoolfactory.home.viewmodel.PagedPropertyListViewModel
1816
import dagger.hilt.android.EntryPointAccessors
1917
import javax.inject.Inject
2018

@@ -143,6 +141,5 @@ class PagedPropertyListFragment :
143141

144142
override fun onScrollToBottom() {
145143
viewModel.getPropertyList()
146-
Toast.makeText(requireContext(), "BOTTOM SCROLL", Toast.LENGTH_SHORT).show()
147144
}
148145
}

features/home/src/main/java/com/smarttoolfactory/home/viewmodel/PagedPropertyListViewModel.kt renamed to features/home/src/main/java/com/smarttoolfactory/home/propertylist/paged/PagedPropertyListViewModel.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.smarttoolfactory.home.viewmodel
1+
package com.smarttoolfactory.home.propertylist.paged
22

33
import androidx.hilt.lifecycle.ViewModelInject
44
import androidx.lifecycle.LiveData
@@ -10,6 +10,7 @@ import com.smarttoolfactory.core.viewstate.ViewState
1010
import com.smarttoolfactory.domain.ORDER_BY_NONE
1111
import com.smarttoolfactory.domain.model.PropertyItem
1212
import com.smarttoolfactory.domain.usecase.GetPropertiesUseCasePaged
13+
import com.smarttoolfactory.home.propertylist.AbstractPropertyListVM
1314
import kotlinx.coroutines.CoroutineScope
1415
import kotlinx.coroutines.flow.launchIn
1516
import kotlinx.coroutines.flow.onEach

features/home/src/main/java/com/smarttoolfactory/home/propertylist/PropertyListRxjava3Fragment.kt renamed to features/home/src/main/java/com/smarttoolfactory/home/propertylist/rxjava/PropertyListRxjava3Fragment.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.smarttoolfactory.home.propertylist
1+
package com.smarttoolfactory.home.propertylist.rxjava
22

33
import android.os.Bundle
44
import androidx.core.os.bundleOf
@@ -12,7 +12,6 @@ import com.smarttoolfactory.home.adapter.PropertyItemListAdapter
1212
import com.smarttoolfactory.home.databinding.FragmentPropertyListBinding
1313
import com.smarttoolfactory.home.di.DaggerHomeComponent
1414
import com.smarttoolfactory.home.viewmodel.HomeToolbarVM
15-
import com.smarttoolfactory.home.viewmodel.PropertyListViewModelRxJava3
1615
import dagger.hilt.android.EntryPointAccessors
1716
import javax.inject.Inject
1817

0 commit comments

Comments
 (0)