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
// jsoup HTML parser library @ https://jsoup.org/ | |
implementation 'org.jsoup:jsoup:1.11.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
<uses-permission android:name="android.permission.INTERNET" /> |
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
private class Content extends AsyncTask<Void, Void, Void> { | |
@Override | |
protected void onPreExecute() { | |
super.onPreExecute(); | |
} | |
@Override | |
protected Void doInBackground(Void... voids) { | |
return 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
private class Content extends AsyncTask<Void, Void, Void> { | |
@Override | |
protected void onPreExecute() { | |
super.onPreExecute(); | |
progressDialog = new ProgressDialog(MainActivity.this); | |
progressDialog.show(); | |
} | |
@Override |
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
... | |
ext { | |
daggerVersion = '2.14.1' | |
} | |
dependencies { | |
... | |
//Dependency Injection | |
implementation "com.google.dagger:dagger:$daggerVersion" |
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 BaseActivity<T extends ViewModel> extends DaggerAppCompatActivity { | |
private T viewModel; | |
/** | |
* | |
* @return view model instance | |
*/ | |
public abstract T getViewModel(); |
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 BaseFragment<T extends ViewModel> extends DaggerFragment { | |
private T viewModel; | |
/** | |
* | |
* @return view model instance | |
*/ | |
public abstract T getViewModel(); |
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
@Module | |
public abstract class ActivityBuilder { | |
@ContributesAndroidInjector(modules = LoginActivityModule.class) | |
abstract LoginActivity contributeLoginActivity(); | |
@ContributesAndroidInjector(modules = { | |
MainActivityModule.class, | |
CategoryFragmentProvider.class, | |
ProfileFragmentProvider.class, |
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
@Singleton | |
@Component(modules = {AndroidSupportInjectionModule.class, | |
HorizonAppModule.class, | |
FirebaseModule.class, | |
NetworkModule.class, | |
ActivityBuilder.class}) | |
public interface HorizonMainComponent extends AndroidInjector<HorizonMainApplication> { | |
@Component.Builder | |
abstract class Builder extends AndroidInjector.Builder<HorizonMainApplication> {} |
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
@Module | |
public class HorizonAppModule { | |
@Singleton | |
@Provides | |
Context provideContext(HorizonMainApplication application){ | |
return application; | |
} | |
@Singleton |
OlderNewer