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
<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"> | |
<android.support.v7.widget.RecyclerView | |
android:id="@+id/apk_list_rv" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="8dp" |
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="wrap_content"> | |
<android.support.v7.widget.CardView | |
android:layout_width="match_parent" | |
android:layout_height="120dp" | |
android:layout_margin="8dp"> |
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
apply plugin: 'com.android.application' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
android { | |
compileSdkVersion 27 | |
defaultConfig { | |
applicationId "io.github.rajdeep1008.apkextractor" |
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"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="io.github.rajdeep1008.apkextractor"> | |
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" |
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? = "") |
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.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
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
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
@Module | |
public abstract class DemoActivityModule { | |
@Binds | |
@PerActivity | |
abstract DemoContract.Presenter providesPresenter(DemoPresenter demoPresenter); | |
@Binds | |
@PerActivity | |
abstract DemoContract.View providesView(DemoActivity demoActivity); | |
} |
OlderNewer