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
#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 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 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 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 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 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 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 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 |
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 ApkListAdapter(var apkList: ArrayList<Apk>, val context: Context) : RecyclerView.Adapter<ApkListAdapter.ApkListViewHolder>() { | |
var mItemClickListener: OnContextItemClickListener? = null | |
init { | |
mItemClickListener = context as MainActivity | |
} | |
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ApkListViewHolder { | |
return ApkListViewHolder(LayoutInflater.from(context).inflate(R.layout.layout_apk_item, parent, false), context, apkList) |
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 io.github.rajdeep1008.models | |
import android.content.pm.ApplicationInfo | |
data class Apk(val appInfo: ApplicationInfo, | |
val appName: String, | |
val packageName: String? = "", | |
val version: String? = "") |