Android Open Source - FMdroid Storage Item Holder






From Project

Back to project page FMdroid.

License

The source code is released under:

Apache License

If you think the Android project FMdroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.doodeec.filemanager.FileManagement;
/*from  w ww.  j  a  va  2s.  co m*/
import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.doodeec.filemanager.R;
import com.doodeec.filemanager.UIComponents.CheckableItem;

/**
 * Created by Dusan Doodeec Bartos on 3.10.2014.
 * <p/>
 * Storage Holder for Folder Fragment Adapter
 */
public class StorageItemHolder {

    private CheckableItem mView;
    private ImageView mItemIcon;
    private TextView mItemName;

    public StorageItemHolder(View view) {
        mView = (CheckableItem) view;
        mItemName = (TextView) view.findViewById(R.id.storage_item_name);
        mItemIcon = (ImageView) view.findViewById(R.id.storage_item_icon);

        if (mItemName == null || mItemIcon == null) {
            throw new AssertionError("Views should not be null");
        }
    }

    public void setSelected(boolean isSelected) {
        mView.setChecked(isSelected);
    }

    public void setName(String name) {
        mItemName.setText(name);
    }

    public void setIcon(Drawable icon) {
        mItemIcon.setImageDrawable(icon);
    }
}




Java Source Code List

com.doodeec.filemanager.BaseActivity.java
com.doodeec.filemanager.PickerActivity.java
com.doodeec.filemanager.SettingsActivity.java
com.doodeec.filemanager.FileManagement.FolderManipulationInterface.java
com.doodeec.filemanager.FileManagement.StorageItemHolder.java
com.doodeec.filemanager.FileManagement.StorageManager.java
com.doodeec.filemanager.FileManagement.Model.StorageItem.java
com.doodeec.filemanager.UIComponents.CheckableItem.java
com.doodeec.filemanager.UIComponents.FolderAdapter.java
com.doodeec.filemanager.UIComponents.FolderFragment.java
com.doodeec.filemanager.UIComponents.SlidingFrameLayout.java