Android Open Source - PDF2ImageForEP Outline Adapter






From Project

Back to project page PDF2ImageForEP.

License

The source code is released under:

GNU General Public License

If you think the Android project PDF2ImageForEP 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.artifex.mupdf;
//www .  j  a  v  a 2 s  . c o m
import jp.co.muratec.pdf2image.R;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class OutlineAdapter extends BaseAdapter {
  private final OutlineItem    mItems[];
  private final LayoutInflater mInflater;
  public OutlineAdapter(LayoutInflater inflater, OutlineItem items[]) {
    mInflater = inflater;
    mItems    = items;
  }

  public int getCount() {
    return mItems.length;
  }

  public Object getItem(int arg0) {
    return null;
  }

  public long getItemId(int arg0) {
    return 0;
  }

  public View getView(int position, View convertView, ViewGroup parent) {
    View v;
    if (convertView == null) {
      v = mInflater.inflate(R.layout.outline_entry, null);
    } else {
      v = convertView;
    }
    int level = mItems[position].level;
    if (level > 8) level = 8;
    String space = "";
    for (int i=0; i<level;i++)
      space += "   ";
    ((TextView)v.findViewById(R.id.title)).setText(space+mItems[position].title);
    ((TextView)v.findViewById(R.id.page)).setText(String.valueOf(mItems[position].page+1));
    return v;
  }

}




Java Source Code List

com.artifex.mupdf.ChoosePDFActivity.java
com.artifex.mupdf.LinkInfo.java
com.artifex.mupdf.MuPDFActivity.java
com.artifex.mupdf.MuPDFCore.java
com.artifex.mupdf.MuPDFPageAdapter.java
com.artifex.mupdf.MuPDFPageView.java
com.artifex.mupdf.OutlineActivityData.java
com.artifex.mupdf.OutlineActivity.java
com.artifex.mupdf.OutlineAdapter.java
com.artifex.mupdf.OutlineItem.java
com.artifex.mupdf.PageView.java
com.artifex.mupdf.ReaderView.java
com.artifex.mupdf.SafeAsyncTask.java
com.artifex.mupdf.SearchTaskResult.java
jp.co.muratec.pdf2image.DeepRadioGroup.java
jp.co.muratec.pdf2image.FilerActivity.java
jp.co.muratec.pdf2image.LoadLibrary.java
jp.co.muratec.pdf2image.PDF2ImageActivity.java
jp.co.muratec.pdf2image.PDF2ImageService.java