Search in sources :

Example 1 with InfoApp

use of com.clear.helpers.InfoApp in project AndroidCleaner by ReguloSarmiento.

the class ApplicationAdapter method getView.

@Override
public View getView(final int position, View convertView, ViewGroup parent) {
    View view = convertView;
    if (null == view) {
        LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        view = layoutInflater.inflate(R.layout.list_app_item, null);
    }
    final InfoApp data = appsList.get(position);
    if (null != data) {
        TextView appName = (TextView) view.findViewById(R.id.app_name);
        TextView fecha = (TextView) view.findViewById(R.id.fechaInstalled);
        TextView espacio = (TextView) view.findViewById(R.id.espaciOcupado);
        ImageView iconview = (ImageView) view.findViewById(R.id.app_icon);
        final CheckBox check = (CheckBox) view.findViewById(R.id.check);
        check.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {

            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                data.setSelected(buttonView.isChecked());
            }
        });
        appName.setText(data.getAppname());
        fecha.setText(data.getFechaInstalled());
        espacio.setText(data.getEspacioOcupadoCacheCodigo());
        iconview.setImageDrawable(data.getIcon());
        check.setChecked(data.isSelected());
    }
    return view;
}
Also used : CheckBox(android.widget.CheckBox) LayoutInflater(android.view.LayoutInflater) TextView(android.widget.TextView) ImageView(android.widget.ImageView) TextView(android.widget.TextView) ImageView(android.widget.ImageView) View(android.view.View) CompoundButton(android.widget.CompoundButton) InfoApp(com.clear.helpers.InfoApp)

Example 2 with InfoApp

use of com.clear.helpers.InfoApp in project AndroidCleaner by ReguloSarmiento.

the class AdapterCacheApp method getView.

@Override
public View getView(final int position, View convertView, ViewGroup parent) {
    View view = convertView;
    if (null == view) {
        LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        view = layoutInflater.inflate(R.layout.list_cache_item, null);
    }
    final InfoApp data = appsList.get(position);
    if (null != data) {
        TextView appName = (TextView) view.findViewById(R.id.app_name);
        TextView infoSize = (TextView) view.findViewById(R.id.info_size);
        ImageView iconview = (ImageView) view.findViewById(R.id.app_icon);
        appName.setText(data.getAppname());
        infoSize.setText("Cache: " + data.getCacheApp() + " | " + " Storage: " + data.getInstallSize() + " | " + " Total: " + data.getTotal());
        iconview.setImageDrawable(data.getIcon());
    }
    return view;
}
Also used : LayoutInflater(android.view.LayoutInflater) TextView(android.widget.TextView) ImageView(android.widget.ImageView) TextView(android.widget.TextView) ImageView(android.widget.ImageView) View(android.view.View) InfoApp(com.clear.helpers.InfoApp)

Example 3 with InfoApp

use of com.clear.helpers.InfoApp in project AndroidCleaner by ReguloSarmiento.

the class ListAppActivity method iniciarHilo.

public void iniciarHilo() {
    apps = new ArrayList<InfoApp>();
    app = new InfoAplicaciones(this, getPackageManager().getInstalledPackages(0));
    app.setHandler(handler);
    app.start();
}
Also used : InfoAplicaciones(com.clear.helpers.InfoAplicaciones) InfoApp(com.clear.helpers.InfoApp)

Example 4 with InfoApp

use of com.clear.helpers.InfoApp in project AndroidCleaner by ReguloSarmiento.

the class CacheActivity method iniciarHilo.

public void iniciarHilo() {
    appsList = new ArrayList<InfoApp>();
    app = new InfoCache(this, getPackageManager().getInstalledPackages(0));
    app.setHandler(handler);
    app.start();
}
Also used : InfoCache(com.clear.helpers.InfoCache) InfoApp(com.clear.helpers.InfoApp)

Aggregations

InfoApp (com.clear.helpers.InfoApp)4 LayoutInflater (android.view.LayoutInflater)2 View (android.view.View)2 ImageView (android.widget.ImageView)2 TextView (android.widget.TextView)2 CheckBox (android.widget.CheckBox)1 CompoundButton (android.widget.CompoundButton)1 InfoAplicaciones (com.clear.helpers.InfoAplicaciones)1 InfoCache (com.clear.helpers.InfoCache)1