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
<!--Color--> | |
<style name="ThemeOverlay.Color" parent="AppTheme"> | |
<!--Customization goes here--> | |
</style> | |
<!--Shape--> | |
<style name="ThemeOverlay.ShapeSize" parent=""> | |
<item name="shapeAppearanceSmallComponent">@style/ShapeAppearanceComponent.RoundCorner</item> | |
<item name="shapeAppearanceMediumComponent">@style/ShapeAppearanceComponent.CutCorner</item> | |
<item name="shapeAppearanceLargeComponent">@style/ShapeAppearanceComponent.CutCorner</item> |
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
<!--Theme 4: Typography Theme--> | |
<style name="AppTheme.Typography" parent="AppTheme"> | |
<item name="textAppearanceHeadline4">@style/TextAppearance.Typography.Headline4</item> | |
<item name="textAppearanceHeadline5">@style/TextAppearance.Typography.Headline5</item> | |
<item name="textAppearanceHeadline6">@style/TextAppearance.Typography.Headline6</item> | |
<item name="textAppearanceBody1">@style/TextAppearance.Typography.Body1</item> | |
<item name="textAppearanceBody2">@style/TextAppearance.Typography.Body2</item> | |
</style> | |
... |
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
<style name="AppTheme.Shape" parent="Theme.MaterialComponents.Light.NoActionBar"> | |
... | |
<!--Global Style--> | |
<item name="shapeAppearanceSmallComponent">@style/ShapeAppearance.SmallComponent.Cut</item> | |
</style> | |
... | |
... | |
<style name="ShapeAppearance.SmallComponent.Cut" parent="ShapeAppearance.MaterialComponents.SmallComponent"> | |
<item name="cornerFamily">cut</item> | |
<item name="cornerSize">4dp</item> |
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
class UserViewModel(application: Application) : AndroidViewModel(application) { | |
val usersLiveData: MediatorLiveData<List<User>> | |
private var usersListApi: EasyApiCall<Envelop<List<User>>>? = null | |
val loadingStateLiveData: MutableLiveData<STATE> = MutableLiveData() | |
init { | |
// initialize live data | |
usersLiveData = MediatorLiveData() | |
// set by default null | |
usersLiveData.value = null |
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
package com.hlabexamples.commonmvp.impl; | |
import android.support.annotation.NonNull; | |
import android.util.Log; | |
import com.google.android.gms.auth.api.signin.GoogleSignInAccount; | |
import com.google.firebase.auth.AuthCredential; | |
import com.google.firebase.auth.FirebaseAuth; | |
import com.google.firebase.auth.FirebaseUser; | |
import com.google.firebase.auth.GoogleAuthProvider; |
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
public abstract class BaseBindingActivity<T extends ViewDataBinding> extends AppCompatActivity { | |
public PreferenceUtils preferences; | |
T binding; | |
protected abstract int attachView(); | |
protected abstract void initView(); | |
protected abstract void initToolbar(); |
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
package com.hlabexamples.commonmvp.base.mvp.callback; | |
/** | |
* Created by H.T. on 01/12/17. | |
*/ | |
public interface IFirebaseCallbackListener<T> { | |
void childAdded(T trip); |
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
package com.hlabexamples.commonmvp.base.mvp.callback; | |
/** | |
* Created by H.T. on 01/12/17. | |
*/ | |
public interface ICallbackListener<T> { | |
void onSuccess(T data); | |
void onFailure(Throwable t); |
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
package com.hlabexamples.commonmvp.base.mvp.presenter; | |
import com.hlabexamples.commonmvp.base.mvp.view.BaseView; | |
/** | |
* Created by H.T. on 01/12/17. | |
*/ | |
public interface BasePresenter<T extends BaseView> { | |
void attachView(T view); |
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
package com.hlabexamples.commonmvp.base.mvp.view; | |
/** | |
* Created by H.T. on 01/12/17. | |
*/ | |
public interface BaseView extends ILoadingView { | |
void initPresenter(); |