This file contains hidden or 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 BasePresenterActivity<T extends BasePresenter> extends BaseActivity implements BasePresenterView { | |
private T presenter; | |
protected T getPresenter(){ | |
return presenter; | |
} | |
@Inject | |
public void setPresenter(T presenter){ | |
this.presenter = presenter; |
This file contains hidden or 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 class MyExtendingClass extends MyClass<String>{ | |
} |
This file contains hidden or 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
@Component(modules = MyModule.class) | |
public interface MyComponent { | |
public void inject(MyExtendingClass myExtendingClass); | |
} |
This file contains hidden or 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 class UtilityWrapper { | |
@Inject | |
Lazy<StringFormatter> lazyStringFormatter; | |
@Inject | |
Lazy<Scheduler> lazyMainScheduler; | |
public StringFormatter getStringFormatter() { | |
return lazyStringFormatter.get(); |
This file contains hidden or 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 class BasePresenter<T extends BasePresenterView> { | |
private T presenterView; | |
private UtilityWrapper utilityWrapper; | |
public BasePresenter() { | |
utilityWrapper = new UtilityWrapper(); | |
DaggerActivityComponent.builder() | |
.baseComponent(PSAApplication.getBaseComponent()) | |
.build() |
This file contains hidden or 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
@Component(modules = MyModule.class) | |
public interface MyComponent { | |
public void inject(MyClass<String> myClass); | |
} |
This file contains hidden or 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
@Module | |
public class MyModule { | |
@Named("MyObject") | |
@Provides | |
Object providesMyObject(){ | |
return null; | |
} | |
} |
This file contains hidden or 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
@Component(modules = MyModule.class) | |
public interface MyComponent { | |
public void inject(MyClass myClass); | |
} |
This file contains hidden or 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 class MyClass <T extends String> { | |
@Inject | |
@Named("MyObject")Object object; | |
} |
This file contains hidden or 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
<android.support.design.widget.AppBarLayout | |
android:id="@+id/appbar" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content"> | |
<SomeView | |
android:id="@+id/epoints_header" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
app:layout_scrollFlags="enterAlways|scroll" |