-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
204 changed files
with
4,855 additions
and
2,929 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
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,4 @@ | ||
-keepclassmembers class com.github.anrimian.musicplayer.lite.di.LiteComponents { | ||
public void init(android.content.Context); | ||
public getLiteAppComponent(); | ||
} |
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
14 changes: 7 additions & 7 deletions
14
app/lite/src/main/java/com/github/anrimian/musicplayer/lite/LiteApp.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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
package com.github.anrimian.musicplayer.lite; | ||
package com.github.anrimian.musicplayer.lite | ||
|
||
import com.github.anrimian.musicplayer.App; | ||
import com.github.anrimian.musicplayer.lite.di.LiteComponents; | ||
import android.content.Context | ||
import com.github.anrimian.musicplayer.App | ||
import com.github.anrimian.musicplayer.lite.di.LiteComponents | ||
|
||
public class LiteApp extends App { | ||
class LiteApp : App() { | ||
|
||
@Override | ||
protected void initComponents() { | ||
LiteComponents.init(getApplicationContext()); | ||
override fun initComponents(appContext: Context) { | ||
LiteComponents.init(appContext) | ||
} | ||
|
||
} |
40 changes: 15 additions & 25 deletions
40
app/lite/src/main/java/com/github/anrimian/musicplayer/lite/di/LiteComponents.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 |
---|---|---|
@@ -1,34 +1,24 @@ | ||
package com.github.anrimian.musicplayer.lite.di; | ||
package com.github.anrimian.musicplayer.lite.di | ||
|
||
import android.content.Context; | ||
import android.content.Context | ||
import com.github.anrimian.musicplayer.di.Components | ||
import com.github.anrimian.musicplayer.di.app.AppModule | ||
import com.github.anrimian.musicplayer.lite.di.app.DaggerLiteAppComponent | ||
import com.github.anrimian.musicplayer.lite.di.app.LiteAppComponent | ||
|
||
import com.github.anrimian.musicplayer.di.Components; | ||
import com.github.anrimian.musicplayer.di.app.AppModule; | ||
import com.github.anrimian.musicplayer.lite.di.app.DaggerLiteAppComponent; | ||
import com.github.anrimian.musicplayer.lite.di.app.LiteAppComponent; | ||
object LiteComponents { | ||
|
||
public class LiteComponents { | ||
private lateinit var liteAppComponent: LiteAppComponent | ||
|
||
private static LiteComponents instance; | ||
|
||
private final LiteAppComponent liteAppComponent; | ||
|
||
public static void init(Context appContext) { | ||
instance = new LiteComponents(appContext); | ||
} | ||
|
||
private static LiteComponents getInstance() { | ||
if (instance == null) { | ||
throw new IllegalStateException("components must be initialized first"); | ||
} | ||
return instance; | ||
fun init(appContext: Context) { | ||
liteAppComponent = DaggerLiteAppComponent.builder() | ||
.appModule(AppModule(appContext)) | ||
.build() | ||
Components.init(liteAppComponent) | ||
} | ||
|
||
private LiteComponents(Context appContext) { | ||
liteAppComponent = DaggerLiteAppComponent.builder() | ||
.appModule(new AppModule(appContext)) | ||
.build(); | ||
Components.init(liteAppComponent); | ||
fun getLiteAppComponent(): LiteAppComponent { | ||
return liteAppComponent | ||
} | ||
|
||
} |
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
13 changes: 13 additions & 0 deletions
13
app/lite/src/main/java/com/github/anrimian/musicplayer/lite/ui/ActionStateBinderImpl.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,13 @@ | ||
package com.github.anrimian.musicplayer.lite.ui | ||
|
||
import com.github.anrimian.musicplayer.domain.interactors.player.ActionState | ||
import com.github.anrimian.musicplayer.ui.common.toolbar.AdvancedToolbar | ||
import com.github.anrimian.musicplayer.ui.player_screen.view.ActionStateBinder | ||
|
||
class ActionStateBinderImpl: ActionStateBinder { | ||
|
||
override fun bind(toolbar: AdvancedToolbar, actionState: ActionState) { | ||
toolbar.setNavigationButtonHintIcon(-1) | ||
} | ||
|
||
} |
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.