Android Open Source - UltraExplorer Ultra Base Adapter






From Project

Back to project page UltraExplorer.

License

The source code is released under:

GNU General Public License

If you think the Android project UltraExplorer 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.mirrorlabs.filebrowser;
/*from  www  . j av  a 2s. c  om*/
import java.io.File;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import com.mirrorlabs.filebrowser.FilebrowserULTRAActivity.Fonts;


import android.content.Context;

import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;



class ViewHolder {
    public TextView name=null;
    public TextView info=null;
    public CheckBox select=null;
    public ImageView image=null;
    public LinearLayout rowlayout;
  
    ViewHolder(View row){
      name = (TextView)row.findViewById(R.id.label);
      name.setTypeface(Fonts.ICS);
      info = (TextView)row.findViewById(R.id.info);
     info.setTypeface(Fonts.ICS);
      
      image = (ImageView)row.findViewById(R.id.icon);
      select=(CheckBox)row.findViewById(R.id.select_icon);
      
      
    }
    void populateFrom(String s)
    {
    name.setText(s);
    }
  }

class ViewHolderGrid {
    public TextView name=null;
    public TextView info=null;
    public CheckBox select=null;
    public ImageView image=null;
  
    ViewHolderGrid(View row){
      name = (TextView)row.findViewById(R.id.label_grid);
      name.setTypeface(Fonts.SONY);
      image = (ImageView)row.findViewById(R.id.icon_grid);
      select=(CheckBox)row.findViewById(R.id.select_icon_grid);
      
    }
    void populateFrom(String s)
    {
    name.setText(s);
    }
  }


public class UltraBaseAdapter extends BaseAdapter {
  ViewHolderGrid holderGrid;
  ViewHolder holderList;
  // viewmode 
  public static final int VIEWMODE_LIST = 0;
  public static final int VIEWMODE_ICON = 1;

  private Context mcontext = null;
  private List<File> mfiles = null;

  private int mViewMode = VIEWMODE_ICON;

  public UltraBaseAdapter(Context context, List<File> files) {
    mcontext = context;
    mfiles = files;
  }

  @Override
  public int getCount() {
    int msize = 0;

    if(mfiles != null)
      msize = mfiles.size();

    return msize;
  }

  @Override
  public File getItem(int position) {

    if((position >= 0) && (position < this.getCount()))
      return mfiles.get(position);  

    return null;
  }

  @Override
  public long getItemId(int position) {

    return position;
  }


  @Override
  public void notifyDataSetChanged() {

    super.notifyDataSetChanged();

  }

  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
    
    switch (mViewMode) {
    case VIEWMODE_LIST:
    {
      
    }
    break;
    case VIEWMODE_ICON:
    {
      

      
    }
    break;
    default:
      break;
    }

    return convertView;
  }

  

  
   

}




Java Source Code List

com.android.gestures.CreateGestureActivity.java
com.android.gestures.GestureBuilderActivity.java
com.android.gestures.GestureMonitorActivity.java
com.markupartist.android.widget.ActionBar.java
com.markupartist.android.widget.ScrollingTextView.java
com.mirrorlabs.customcheckboxwidget.DontPressWithParentCheckBox.java
com.mirrorlabs.customtoast.Toaster.java
com.mirrorlabs.filebrowser.BackupManager.java
com.mirrorlabs.filebrowser.BaseActivity.java
com.mirrorlabs.filebrowser.BitmapManager.java
com.mirrorlabs.filebrowser.BookmarksProvider.java
com.mirrorlabs.filebrowser.CMDProcessor.java
com.mirrorlabs.filebrowser.CompressManager.java
com.mirrorlabs.filebrowser.DesEncrypter.java
com.mirrorlabs.filebrowser.DrawableManager.java
com.mirrorlabs.filebrowser.DrawableThreadLoader.java
com.mirrorlabs.filebrowser.DuplicatesManager.java
com.mirrorlabs.filebrowser.ExtractManager.java
com.mirrorlabs.filebrowser.FileUtils.java
com.mirrorlabs.filebrowser.FilebrowserULTRAActivity.java
com.mirrorlabs.filebrowser.ImageThreadLoader.java
com.mirrorlabs.filebrowser.LinuxShell.java
com.mirrorlabs.filebrowser.MimeTypes.java
com.mirrorlabs.filebrowser.MyApplication.java
com.mirrorlabs.filebrowser.PDFViewer.java
com.mirrorlabs.filebrowser.PreferenceActivity.java
com.mirrorlabs.filebrowser.ProcessManager.java
com.mirrorlabs.filebrowser.RootUtils.java
com.mirrorlabs.filebrowser.SearchFilesDialog.java
com.mirrorlabs.filebrowser.SearchFilesWidget.java
com.mirrorlabs.filebrowser.UltraBaseAdapter.java
com.mirrorlabs.imageviewer.EclairMotionEvent.java
com.mirrorlabs.imageviewer.ExpandImage.java
com.mirrorlabs.imageviewer.TouchImageView.java
com.mirrorlabs.imageviewer.WrapMotionEvent.java
com.mirrorlabs.menupopup.MenuItem.java
com.mirrorlabs.menupopup.PopupMenu.java
com.mirrorlabs.musicplayer.DBHelper.java
com.mirrorlabs.musicplayer.PlayerActivity.java
com.mirrorlabs.quickaction3D.ActionItem.java
com.mirrorlabs.quickaction3D.PopupWindows.java
com.mirrorlabs.quickaction3D.QuickAction.java
com.mirrorlabs.quickaction.ActionItem.java
com.mirrorlabs.quickaction.PopupWindows.java
com.mirrorlabs.quickaction.QuickAction.java
com.mirrorlabs.ui.widgets.ClickableSlidingDrawer.java
com.mirrorlabs.ui.widgets.DropDownMenu.java
com.mirrorlabs.ui.widgets.IcsListPopupWindow.java
com.mirrorlabs.ui.widgets.JavaYoutubeDownloader.java
com.mirrorlabs.ui.widgets.Panel.java
com.mirrorlabs.ui.widgets.ScrollPager.java
com.mirrorlabs.ui.widgets.SlidingFrameLayout.java
com.mirrorlabs.widgets.ExampleAppWidgetProvider1.java
com.mirrorlabs.widgets.ExampleAppWidgetProvider.java
com.mirrorlabs.widgets.UpdateWidgetService1.java
com.mirrorlabs.widgets.UpdateWidgetService.java
org.zeroxlab.widget.AnimationLayout.java
org.zeroxlab.widget.MyHorizontalScrollView.java