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
| <template format="4" | |
| revision="1" | |
| name="MVP Template Activity" | |
| description="Creates a new MVP classes - Presenter, View, Contract and Dagger Module."> | |
| <category value="Other"/> | |
| <parameter id="className" | |
| name="Functionality Name" | |
| type="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
| package io.github.rajdeep1008.templatedemo; | |
| import android.content.Context; | |
| import android.support.v7.widget.RecyclerView; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import java.util.List; |
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
| #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end | |
| import android.content.Context; | |
| import android.support.v7.widget.RecyclerView; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import java.util.List; | |
| #parse("File Header.java") |
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
| import android.support.v7.app.AppCompatActivity; | |
| import android.os.Bundle; | |
| public class EmptyActivity extends AppCompatActivity { | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.activity_main2); | |
| } |
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 DemoPresenter extends DemoBasePresenter<DemoContract.View> implements DemoContract.Presenter { | |
| @Inject | |
| public DemoPresenter(DemoContract.View view) { | |
| super(view); | |
| } | |
| @Override | |
| public void unSubscribe() { |
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 interface DemoContract { | |
| interface View extends DemoBaseContract.ActivityView { | |
| } | |
| interface Presenter extends DemoBaseContract.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
| @Module | |
| public abstract class DemoActivityModule { | |
| @Binds | |
| @PerActivity | |
| abstract DemoContract.Presenter providesPresenter(DemoPresenter demoPresenter); | |
| @Binds | |
| @PerActivity | |
| abstract DemoContract.View providesView(DemoActivity demoActivity); | |
| } |
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 DemoActivity extends DemoBaseActivity<DemoContract.Presenter> implements DemoContract.View { | |
| @Override | |
| public void onCreate(@Nullable Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.activity_demo); | |
| } | |
| } |
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
| package io.github.rajdeep1008.apkextractor | |
| class MainActivity : AppCompatActivity(), ApkListAdapter.OnContextItemClickListener { | |
| private lateinit var progressBar: ProgressBar | |
| private val apkList = ArrayList<Apk>() | |
| private lateinit var contextItemPackageName: String | |
| private lateinit var mAdapter: ApkListAdapter | |
| private lateinit var mLinearLayoutManager: LinearLayoutManager |
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
| package io.github.rajdeep1008.extras | |
| class Utilities { | |
| companion object { | |
| val STORAGE_PERMISSION_CODE = 1008 | |
| fun checkPermission(activity: AppCompatActivity): Boolean { | |
| var permissionGranted = false |