-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '6/06_step2_residential_bottom_sheet' into 6/07_step3_se…
…arch_company
- Loading branch information
Showing
127 changed files
with
3,459 additions
and
411 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions
29
app/src/main/java/com/ftw/hometerview/adapter/SpacingItemDecoration.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.ftw.hometerview.adapter | ||
|
||
import android.content.Context | ||
import android.graphics.Rect | ||
import android.view.View | ||
import androidx.annotation.DimenRes | ||
import androidx.recyclerview.widget.RecyclerView | ||
import com.ftw.hometerview.R | ||
|
||
class SpacingItemDecoration( | ||
context: Context, | ||
@DimenRes private val spacingResId: Int = R.dimen.dp_size_16 | ||
) : RecyclerView.ItemDecoration() { | ||
|
||
private val dividerHeight: Int = context.resources.getDimensionPixelSize(spacingResId) | ||
|
||
override fun getItemOffsets( | ||
outRect: Rect, | ||
view: View, | ||
parent: RecyclerView, | ||
state: RecyclerView.State | ||
) { | ||
outRect.set(0, 0, 0, dividerHeight) | ||
|
||
if (parent.getChildAdapterPosition(view) == 0) { | ||
outRect.top = dividerHeight | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
app/src/main/java/com/ftw/hometerview/di/ui/MapFragmentViewModelModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.ftw.hometerview.di.ui | ||
|
||
import com.ftw.domain.usecase.map.GetBuildingMarkerUseCase | ||
import com.ftw.domain.usecase.map.GetMarkerUseCase | ||
import com.ftw.hometerview.dispatcher.Dispatcher | ||
import com.ftw.hometerview.ui.main.map.MapViewModel | ||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.android.components.FragmentComponent | ||
import dagger.hilt.android.scopes.FragmentScoped | ||
|
||
@Module | ||
@InstallIn(FragmentComponent::class) | ||
class MapFragmentViewModelModule { | ||
|
||
@Provides | ||
@FragmentScoped | ||
fun provideMapViewModel( | ||
dispatcher: Dispatcher, | ||
getMarkerUseCase: GetMarkerUseCase, | ||
getBuildingMarkerUseCase: GetBuildingMarkerUseCase | ||
): MapViewModel { | ||
return MapViewModel( | ||
dispatcher, | ||
getMarkerUseCase, | ||
getBuildingMarkerUseCase | ||
) | ||
} | ||
|
||
} |
28 changes: 28 additions & 0 deletions
28
app/src/main/java/com/ftw/hometerview/di/usecase/FavoriteUseCaseModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.ftw.hometerview.di.usecase | ||
|
||
import com.ftw.domain.usecase.favorite.GetFavoriteBuildingsUseCase | ||
import com.ftw.domain.usecase.favorite.GetFavoriteBuildingsUseCaseImpl | ||
import com.ftw.domain.usecase.favorite.GetFavoriteReviewsUseCase | ||
import com.ftw.domain.usecase.favorite.GetFavoriteReviewsUseCaseImpl | ||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.components.SingletonComponent | ||
import javax.inject.Singleton | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
class FavoriteUseCaseModule { | ||
@Provides | ||
@Singleton | ||
fun provideGetFavoriteReviewsUseCase(): GetFavoriteReviewsUseCase { | ||
return GetFavoriteReviewsUseCaseImpl() | ||
} | ||
|
||
@Provides | ||
@Singleton | ||
fun provideGetFavoriteBuildingsUseCase(): GetFavoriteBuildingsUseCase { | ||
return GetFavoriteBuildingsUseCaseImpl() | ||
} | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
app/src/main/java/com/ftw/hometerview/di/usecase/MapUseCaseModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.ftw.hometerview.di.usecase | ||
|
||
import com.ftw.domain.usecase.map.GetBuildingMarkerUseCase | ||
import com.ftw.domain.usecase.map.GetBuildingMarkerUseCaseImpl | ||
import com.ftw.domain.usecase.map.GetMarkerUseCase | ||
import com.ftw.domain.usecase.map.GetMarkerUseCaseImpl | ||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.components.SingletonComponent | ||
import javax.inject.Singleton | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
class MapUseCaseModule { | ||
@Provides | ||
@Singleton | ||
fun provideGetMarkerUseCase(): GetMarkerUseCase { | ||
return GetMarkerUseCaseImpl() | ||
} | ||
@Provides | ||
@Singleton | ||
fun provideGetBuildingMarkerUseCase(): GetBuildingMarkerUseCase { | ||
return GetBuildingMarkerUseCaseImpl() | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
app/src/main/java/com/ftw/hometerview/di/usecase/SearchAddressBuildingUseCaseModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.ftw.hometerview.di.usecase | ||
|
||
import com.ftw.domain.usecase.searchaddressbuilding.GetSearchAddressBuildingUseCase | ||
import com.ftw.domain.usecase.searchaddressbuilding.GetSearchAddressBuildingUseCaseImpl | ||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.components.SingletonComponent | ||
import javax.inject.Singleton | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
class SearchAddressBuildingUseCaseModule { | ||
@Provides | ||
@Singleton | ||
fun provideGetSearchAddressBuildingUseCase(): GetSearchAddressBuildingUseCase { | ||
return GetSearchAddressBuildingUseCaseImpl() | ||
} | ||
} |
Oops, something went wrong.