Back to project page permission-explorer.
The source code is released under:
Copyright (C) 2012 Rui Gon?alves and Daniel Cibr?o Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),...
If you think the Android project permission-explorer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package pt.up.fe.ssin.pexplorer.app; /*from w w w. j a v a 2 s .co m*/ import java.util.List; import pt.up.fe.ssin.pexplorer.R; import pt.up.fe.ssin.pexplorer.data.PermissionCatalog; import pt.up.fe.ssin.pexplorer.utils.ui.SimpleObjectAdapter; import android.content.Context; import android.content.pm.ApplicationInfo; import android.view.View; import android.widget.ImageView; import android.widget.TextView; public class ApplicationListAdapter extends SimpleObjectAdapter<ApplicationInfo> { private PermissionCatalog catalog; public ApplicationListAdapter(Context context, List<ApplicationInfo> objects) { super(context, R.layout.app_row, objects); catalog = PermissionCatalog.getInstance(context); } @Override public View getView(View inflatedView, ApplicationInfo app) { TextView tv = (TextView) inflatedView.findViewById(R.id.app_name); tv.setText(app.loadLabel(catalog.getPackageManager())); ImageView iv = (ImageView) inflatedView.findViewById(R.id.app_icon); iv.setImageDrawable(app.loadIcon(catalog.getPackageManager())); tv = (TextView) inflatedView.findViewById(R.id.app_package); tv.setText(app.packageName); return inflatedView; } }