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
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context="com.example.princess.jsoup.MainActivity"> | |
<ImageView | |
android:id="@+id/image" | |
android:layout_width="wrap_content" |
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
public class HorizonMainApplication extends DaggerApplication { | |
private static HorizonMainApplication instance; | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
} | |
public static synchronized HorizonMainApplication getInstance() { |
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, |
OlderNewer