-
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 pull request #26 from Entreco/feature/5-view-stats
Feature/5 view stats
- Loading branch information
Showing
288 changed files
with
12,126 additions
and
2,203 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
20 changes: 20 additions & 0 deletions
20
...corecard/app/src/main/java/nl/entreco/dartsscorecard/base/widget/MaxHeightRecyclerView.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,20 @@ | ||
package nl.entreco.dartsscorecard.base.widget | ||
|
||
import android.content.Context | ||
import android.support.v7.widget.RecyclerView | ||
import android.util.AttributeSet | ||
|
||
/** | ||
* Created by entreco on 14/01/2018. | ||
*/ | ||
class MaxHeightRecyclerView @JvmOverloads constructor( | ||
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 | ||
) : RecyclerView(context, attrs, defStyleAttr) { | ||
|
||
var maxHeight: Int = 400 | ||
|
||
override fun onMeasure(widthSpec: Int, heightSpec: Int) { | ||
val height = MeasureSpec.makeMeasureSpec(maxHeight, MeasureSpec.AT_MOST) | ||
super.onMeasure(widthSpec, height) | ||
} | ||
} |
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
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
28 changes: 28 additions & 0 deletions
28
...artsScorecard/app/src/main/java/nl/entreco/dartsscorecard/di/viewmodel/db/MetaDbModule.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 nl.entreco.dartsscorecard.di.viewmodel.db | ||
|
||
import dagger.Module | ||
import dagger.Provides | ||
import nl.entreco.dartsscorecard.di.viewmodel.ActivityScope | ||
import nl.entreco.data.db.DscDatabase | ||
import nl.entreco.data.db.meta.LocalMetaRepository | ||
import nl.entreco.data.db.meta.MetaMapper | ||
import nl.entreco.domain.repository.MetaRepository | ||
|
||
/** | ||
* Created by entreco on 16/01/2018. | ||
*/ | ||
@Module | ||
class MetaDbModule { | ||
|
||
@Provides | ||
@ActivityScope | ||
fun provideMetaMapper(): MetaMapper { | ||
return MetaMapper() | ||
} | ||
|
||
@Provides | ||
@ActivityScope | ||
fun provideMetaRepository(db: DscDatabase, mapper: MetaMapper): MetaRepository { | ||
return LocalMetaRepository(db, mapper) | ||
} | ||
} |
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
28 changes: 28 additions & 0 deletions
28
...artsScorecard/app/src/main/java/nl/entreco/dartsscorecard/di/viewmodel/db/StatDbModule.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 nl.entreco.dartsscorecard.di.viewmodel.db | ||
|
||
import dagger.Module | ||
import dagger.Provides | ||
import nl.entreco.dartsscorecard.di.viewmodel.ActivityScope | ||
import nl.entreco.data.db.DscDatabase | ||
import nl.entreco.data.db.stats.LocalStatRepository | ||
import nl.entreco.data.db.stats.StatMapper | ||
import nl.entreco.domain.repository.StatRepository | ||
|
||
/** | ||
* Created by entreco on 16/01/2018. | ||
*/ | ||
@Module | ||
class StatDbModule { | ||
|
||
@Provides | ||
@ActivityScope | ||
fun provideStatMapper(): StatMapper { | ||
return StatMapper() | ||
} | ||
|
||
@Provides | ||
@ActivityScope | ||
fun provideStatRepository(db: DscDatabase, mapper: StatMapper): StatRepository { | ||
return LocalStatRepository(db, mapper) | ||
} | ||
} |
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
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
Oops, something went wrong.