代码实现List下载列表(安卓自定义控件,List列表)

自定义下载列表

 

点击跳转指定网址

 

 

package com.example.listfordownload2;

import android.app.Activity;
import android.os.Bundle;

public class MainActivity extends Activity 
{
	@Override
	protected void onCreate(Bundle savedInstanceState) 
	{
		super.onCreate(savedInstanceState);
		
		String[][] infos = new String[][]{
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "1百度百度百度百度百度百度", "一款流行的搜索引擎搜索引擎搜索引擎搜索引擎搜索引擎搜索引擎搜索引擎", "http://www.baidu.com/"},
			{"img/on.jpg", "img/img2.jpg", "img/img3.jpg", "2谷歌", "一款流行的搜索引擎", "http://www.google.com/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "3新浪网", "公众网站", "http://www.sina.com.cn/"},
			{"img/off.jpg", "img/img2.jpg", "img/img3.jpg", "4百度", "一款流行的搜索引擎", "http://www.baidu.com/"},
			{"img/img4.jpg", "img/img2.jpg", "img/img3.jpg", "5谷歌", "一款流行的搜索引擎", "http://www.google.com/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img4.jpg", "6新浪网", "公众网站", "http://www.sina.com.cn/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "7百度", "一款流行的搜索引擎", "http://www.baidu.com/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "8谷歌", "一款流行的搜索引擎", "http://www.google.com/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "9新浪网", "公众网站", "http://www.sina.com.cn/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "10谷歌", "一款流行的搜索引擎", "http://www.google.com/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "11新浪网", "公众网站", "http://www.sina.com.cn/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "12百度", "一款流行的搜索引擎", "http://www.baidu.com/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "13谷歌", "一款流行的搜索引擎", "http://www.google.com/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "14新浪网", "公众网站", "http://www.sina.com.cn/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "15百度", "一款流行的搜索引擎", "http://www.baidu.com/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "16谷歌", "一款流行的搜索引擎", "http://www.google.com/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "17新浪网", "公众网站", "http://www.sina.com.cn/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "18谷歌", "一款流行的搜索引擎", "http://www.google.com/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "19新浪网", "公众网站", "http://www.sina.com.cn/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "20百度", "一款流行的搜索引擎", "http://www.baidu.com/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "21新浪网", "公众网站", "http://www.sina.com.cn/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "22百度", "一款流行的搜索引擎", "http://www.baidu.com/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "23谷歌", "一款流行的搜索引擎", "http://www.google.com/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "24新浪网", "公众网站", "http://www.sina.com.cn/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "25百度", "一款流行的搜索引擎", "http://www.baidu.com/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "26谷歌", "一款流行的搜索引擎", "http://www.google.com/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "27新浪网", "公众网站", "http://www.sina.com.cn/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "28谷歌", "一款流行的搜索引擎", "http://www.google.com/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "29新浪网新浪网新浪网新浪网新浪网新浪网新浪网", "公众网站公众网站公众网站公众网站公众网站公众网站公众网站公众网站公众网站", "http://www.sina.com.cn/"},
			{"img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "30百度", "一款流行的搜索引擎", "http://www.baidu.com/"},
			
			//标准输入形式,前3个为图片完整路径,后3个为文本字符串(共6个参数
			{"img/on.jpg", "img/img2.jpg", "img/img3.jpg", "2谷歌", "一款流行的搜索引擎", "http://www.google.com/"},
			{},								//该行采用连续默认设置
			{"", " ", "   "}, 				//默认设置可用空串,或空格串表示,后面的若干位参数可省略,但前面的要求参数一一对应
			{"img/on.jpg", "", ""},			//该行仅第一个参数采用自定义设置,其他为默认
			{"", "", "img/off.jpg", ""},    //1、2、4、5、6均采用默认设置,后面的连续默认可不写(此处为参数5、6),4也可不写,3为指定的图像,1、2必须写,为了保持参数3的位置对应
		};
		

		//查看文件的字节数组
		//Src.getByteArray("img/img2.jpg");	//获取SD卡中的图片img2.jpg的字节数组,需在中断调试时进行查看
		
		//使用用DataInput.infos中的数据创建List视图
		setContentView(new getListView(this, infos).creat());
	}
}


//ListIteam iteams[];

获取按指定样式显示的listView
//private View setListView()
//{
	ListIteam iteam1 = new ListIteam("img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "百度", "一款流行的搜索引擎", "http://www.baidu.com/");
	ListIteam iteam2 = new ListIteam("img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "谷歌", "一款流行的搜索引擎", "http://www.google.com/");
	ListIteam iteam3 = new ListIteam("img/img1.jpg", "img/img2.jpg", "img/img3.jpg", "新浪网", "公众网站", "http://www.sina.com.cn/");
	
//	
//	
	//构建初始化数据
	ListIteam iteams[] = new ListIteam[]{
			iteam1,iteam2,iteam3,iteam1,iteam2,iteam3,iteam1,iteam2,iteam3,iteam1,iteam2,iteam3,
			iteam1,iteam2,iteam3,iteam1,iteam2,iteam3,iteam1,iteam2,iteam3,iteam1,iteam2,iteam3,
			iteam1,iteam2,iteam3,iteam1,iteam2,iteam3,iteam1,iteam2,iteam3,iteam1,iteam2,iteam3,
			iteam1,iteam2,iteam3,iteam1,iteam2,iteam3,iteam1,iteam2,iteam3,iteam1,iteam2,iteam3,
			iteam1,iteam2,iteam3,iteam1,iteam2,iteam3,iteam1,iteam2,iteam3,iteam1,iteam2,iteam3
	};
//	
//	//以iteams为数据源,按照list_iteam_layout进行布局,以列表的形式显示所有数据,返回列表视图
//	return new getListView(this, iteams).creat();
//}

 

package com.example.listfordownload2;

import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.net.Uri;
import android.text.TextUtils.TruncateAt;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;


///======================================================================
///构建按照<自定义的ListIteam显示样式>在列表中显示iteams中的数据,返回列表View
///使用用infos[][]中的数据创建List视图  
///new getListView(this, infos).creat(),即可返回创建好的list视图
///======================================================================
public class getListView 
{
	ListIteam iteams[];
	Context context;
	
	//在context的上下文环境中创建以<自定义的ListIteam显示样式>为布局方式的list列表显示iteams中的每一项
	getListView (Context context, ListIteam iteams[])
	{
		this.iteams = iteams;
		this.context = context;
	}
	
	//在context的上下文环境中创建以<自定义的ListIteam显示样式>为布局方式的list列表显示iteams中的每一项
	getListView (Context context, String[][] strInfos)
	{
		this.context = context;
		
		iteams = new ListIteam[strInfos.length];	//根据给定的strInfos信息构建等量的Iteam数组
		
		for(int i=0; i<strInfos.length; i++)		//为所有的iteams项赋值
		{
			String[] iteam = iteamCheck(strInfos[i]);//默认检验
			iteams[i] = new ListIteam(iteam[0], iteam[1], iteam[2], iteam[3], iteam[4], iteam[5]);
		}
	}	
	
	//对输入的数据进行简单检验,要求输入的数据依次连续
	private String[] iteamCheck(String[] Iteam)
	{
		//此处为默认设置
		String[] iteam = new String[]{"", "", "", "默认标题", "默认说明信息", "http://www.baidu.com/"};
		
		int i=0;
		for(i = 0; i < Iteam.length; i++)
		{
			if(i>=iteam.length) break;	//预防输入数据超长
			if(!Iteam[i].trim().equalsIgnoreCase(""))//默认设置可采用空串表示
				iteam[i] = Iteam[i];	//依次获取有效信息
		}
		
		return iteam;
	}
	
	//自动以构造函数中的参数构建一个list视图
	public View creat()
	{
		return creat(context, iteams);
	}
	
	//获取按指定样式显示的listView
	public View creat(Context context, ListIteam iteams[])
	{
		//将iteams中的数据项按照布局R.layout.list_iteam_layout进行显示
		ListIteamAdapter  adapter = new ListIteamAdapter(context, iteams);
		ListView list = new ListView(context);	//创建一个列表用于显示iteams中的所有项
		list.setAdapter(adapter);				//为列表添加显示数据
		
		//添加点击响应
		list.setOnItemClickListener(listenList);
      
		return list;
	}
	
	//list的事件响应
	OnItemClickListener listenList = new OnItemClickListener() 
	{  
	      @Override  
	      public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) 
	      {  
	    	  http(iteams[arg2].ur1);				//打开该列表项对应的网址
	      } 
	};
  
	//访问网页如: ur1 = "http://google.com"
	public void http(String ur1)
	{
		Uri uri = Uri.parse(ur1);  
    	Intent it = new Intent(Intent.ACTION_VIEW, uri);  
    	context.startActivity(it);
	}
}


///======================================================================
///定义该结构用于表示列表项的数据结构
///ListIteam
///======================================================================
final class ListIteam 
{
	//从SD卡的img/目录下获取图像文件, 如img1 = img/1.jpg;
	public String img1, img2, img3, Title, note, ur1, optype;
	
	ListIteam(){};
	ListIteam(String img1, String img2, String img3, String Title, String note, String ur1)
	{
		this.img1 = new String(img1); 
		this.img2 = new String(img2); 
		this.img3 = new String(img3);
		this.Title = new String(Title);
		this.note = new String(note);
		this.ur1 = new String(ur1);
	}
	
	//重新复制一个和自身相同的对象
	public ListIteam  copy()
	{
		return new ListIteam(img1, img2, img3, Title, note, ur1);
	}
}

///======================================================================
///让Iteams中的数据按照<自定义的ListIteam显示样式>进行显示
///ListIteamAdapter
///======================================================================
final class ListIteamAdapter  extends ArrayAdapter<ListIteam>
{
	Context context;
	
    public ListIteamAdapter(Context context, ListIteam[] Iteams) 
    {  
    	super(context, 0, Iteams); 				//调用数组适配器,进行初始化  
	
		this.context = context;
    }
    
    @Override
	public View getView(int position, View convertView, ViewGroup parent) 
	{
    	//修改视图中的信息
	    ListIteam iteam = getItem(position);   			//获取position个位置的列表项数据
	 
	    //从SD卡的img/目录下获取图像文件,转化为Bitmap
	  	Bitmap img1 = getSDcardBitmap(iteam.img1, 1); 	//若图片img1不存在,则采用默认图像1替代
	  	Bitmap img2 = getSDcardBitmap(iteam.img2, 2); 	//图片不存在采用默认图像2
	  	Bitmap img3 = getSDcardBitmap(iteam.img3, 3);	//图像不存在采用默认图像3
	  	
	  	//以自定义的方式创建新的view视图
	  	convertView = creatIteamView(img1, img2, img3, iteam.Title, iteam.note);

	    return convertView;   					//返回按给定数据显示视图
	} 
    
    //自定义的ListIteam显示样式
    public View creatIteamView(Bitmap Img1, Bitmap Img2, Bitmap Img3, String Title, String Note)
    {
    	RelativeLayout r1 = new RelativeLayout(context); 
    	r1.setBackgroundColor(0xff5F88F2);		//设置背景颜色
	    r1.setPadding(5, 2, 10, 2);				//左、上、右、下 分别保留一定像素距离
    	
    	ImageView img1 = new ImageView(context);  
    	img1.setImageBitmap(Img1); 
    	img1.setId(1);  
	      
	    RelativeLayout.LayoutParams lp1 = new RelativeLayout.LayoutParams
	    		(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);  
	    lp1.addRule(RelativeLayout.ALIGN_LEFT);  
	    lp1.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);
	    
	    // imag1 位于父 View 的左边,在父 View 中垂直居中  
	    r1.addView(img1, lp1);
	    
	    TextView title = new TextView(context);
	    title.setText(Title);
	    title.setTextColor(Color.WHITE);		//设置title的颜色
	    title.setTextSize(15);
	    title.setId(2);
	    
	    RelativeLayout.LayoutParams lp2 = new RelativeLayout.LayoutParams
	    		(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);  
	    lp2.addRule(RelativeLayout.ALIGN_TOP); 
	    lp2.addRule(RelativeLayout.RIGHT_OF, 1);
	    
	    // title 和父View顶部对齐,位于 ing1 的右方
	    r1.addView(title, lp2);  
	    
	    
	    TextView note = new TextView(context);
	    note.setText(Note);
	    note.setTextColor(Color.BLACK);
	    note.setTextSize(14);
	    note.setId(3);
	    
	    RelativeLayout.LayoutParams lp3 = new RelativeLayout.LayoutParams
	    		(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
	    lp3.addRule(RelativeLayout.RIGHT_OF, 1);
	    lp3.addRule(RelativeLayout.BELOW, 2); 
	    lp3.addRule(RelativeLayout.ALIGN_RIGHT, 4);
	    
	    //note位于imag1的右方、title的下方,且右边和img2对齐
	    r1.addView(note, lp3); 
	    
	    
    	ImageView img3 = new ImageView(context);  
    	img3.setImageBitmap(Img3); 
    	img3.setId(5);  
	      
	    RelativeLayout.LayoutParams lp5 = new RelativeLayout.LayoutParams
	    		(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);  
	    lp5.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);  
	    lp5.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);
	    
	    // imag3 位于父 View 的右边,在父 View 中垂直居中  
	    r1.addView(img3, lp5 );  
	    
	    
	    ImageView img2 = new ImageView(context);  
    	img2.setImageBitmap(Img2); 
    	img2.setId(4);  
	      
	    RelativeLayout.LayoutParams lp4 = new RelativeLayout.LayoutParams
	    		(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);  
	    lp4.addRule(RelativeLayout.ALIGN_TOP);  
	    lp4.addRule(RelativeLayout.LEFT_OF, 5);
	    
	    // imag2位于父 View 的顶部,在img3的左边  
	    r1.addView(img2, lp4 );  
	    
	    lp2.addRule(RelativeLayout.LEFT_OF , 4); //为title在增加一条限定,使它位于img2的左侧

	    title.setSingleLine(true);				//标题单行显示
	    title.setEllipsize(TruncateAt.MARQUEE);	//设置跑马灯效果
	    title.setSelected(true);
	    
	    
	    note.setSingleLine(true);				//说明文本单行显示
	    //note.setEllipsize(TruncateAt.MARQUEE);	//设置跑马灯效果
	    //note.setSelected(true);
	    
	    
	    return r1;		//返回生成的View布局
    }
	
	//从手机内存卡的指定目录中获取图像文件,转化为Bitmap (如file = "sc/img1.jpg")
	public Bitmap getSDcardBitmap(String file, int i) 
	{
		String SDroot = "/mnt/sdcard/";	//sd卡根目录
		String path = SDroot + file;
		
        try 
        {
        	//默认图像,使用字节数组中的数据进行默认图像的设置
        	if(file.equalsIgnoreCase("img1")) return Src.getImg(1);
        	else if(file.equalsIgnoreCase("img2"))  return Src.getImg(2);
        	else if(file.equalsIgnoreCase("img3"))  return Src.getImg(3);
        	
        	//获取指定图像
            FileInputStream finS = new FileInputStream(path);	//创建指定文件的输入流
            return BitmapFactory.decodeStream(finS);  			//把流转化为Bitmap图片      
        } 
        catch (FileNotFoundException e) 
        {
        	return Src.getImg(i);		//返回对应的默认图像
//            e.printStackTrace();
//            return null;
        }
	}

}	

///======================================================================
///此类从inputFile中读取数据,查看字节数组,以对应的字节数组设置默认图像
///======================================================================
final class Src
{
	//img为img1,img2,img3对应的字节数组,此数组为默认设置提供图像,修改此处实现默认图像的设置
	static byte[][] img = new byte[][]{
			{-1, -40, -1, -32, 0, 16, 74, 70, 73, 70, 0, 1, 1, 1, 0, 96, 0, 96, 0, 0, -1, -37, 0, 67, 0, 8, 6, 6, 7, 6, 5, 8, 7, 7, 7, 9, 9, 8, 10, 12, 20, 13, 12, 11, 11, 12, 25, 18, 19, 15, 20, 29, 26, 31, 30, 29, 26, 28, 28, 32, 36, 46, 39, 32, 34, 44, 35, 28, 28, 40, 55, 41, 44, 48, 49, 52, 52, 52, 31, 39, 57, 61, 56, 50, 60, 46, 51, 52, 50, -1, -37, 0, 67, 1, 9, 9, 9, 12, 11, 12, 24, 13, 13, 24, 50, 33, 28, 33, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, -1, -64, 0, 17, 8, 0, 52, 0, 51, 3, 1, 34, 0, 2, 17, 1, 3, 17, 1, -1, -60, 0, 31, 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, -1, -60, 0, -75, 16, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125, 1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34, 113, 20, 50, -127, -111, -95, 8, 35, 66, -79, -63, 21, 82, -47, -16, 36, 51, 98, 114, -126, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, -125, -124, -123, -122, -121, -120, -119, -118, -110, -109, -108, -107, -106, -105, -104, -103, -102, -94, -93, -92, -91, -90, -89, -88, -87, -86, -78, -77, -76, -75, -74, -73, -72, -71, -70, -62, -61, -60, -59, -58, -57, -56, -55, -54, -46, -45, -44, -43, -42, -41, -40, -39, -38, -31, -30, -29, -28, -27, -26, -25, -24, -23, -22, -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -1, -60, 0, 31, 1, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, -1, -60, 0, -75, 17, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119, 0, 1, 2, 3, 17, 4, 5, 33, 49, 6, 18, 65, 81, 7, 97, 113, 19, 34, 50, -127, 8, 20, 66, -111, -95, -79, -63, 9, 35, 51, 82, -16, 21, 98, 114, -47, 10, 22, 36, 52, -31, 37, -15, 23, 24, 25, 26, 38, 39, 40, 41, 42, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, -126, -125, -124, -123, -122, -121, -120, -119, -118, -110, -109, -108, -107, -106, -105, -104, -103, -102, -94, -93, -92, -91, -90, -89, -88, -87, -86, -78, -77, -76, -75, -74, -73, -72, -71, -70, -62, -61, -60, -59, -58, -57, -56, -55, -54, -46, -45, -44, -43, -42, -41, -40, -39, -38, -30, -29, -28, -27, -26, -25, -24, -23, -22, -14, -13, -12, -11, -10, -9, -8, -7, -6, -1, -38, 0, 12, 3, 1, 0, 2, 17, 3, 17, 0, 63, 0, -9, -70, -53, -44, -11, -21, 77, 50, 69, -128, -84, -73, 55, -114, -69, -110, -42, -35, 119, 72, 71, -87, -20, -93, -35, -120, 21, -53, 94, 107, -38, -105, -120, -75, 27, -115, 47, 76, -70, 22, 74, -105, 114, -38, 17, 23, 50, -30, 50, 3, -56, -51, -4, 11, -56, -64, 28, -110, 71, -52, 50, 113, -48, -24, -38, 118, -99, -90, 67, 45, -91, -116, -126, 73, 16, -127, 112, -51, 38, -7, 25, -15, -43, -49, 92, -111, -21, 92, -13, -82, -106, -120, -43, 83, -74, -28, 73, 123, -30, 75, -99, -82, -106, -70, 109, -94, 55, 32, 60, -113, 51, 1, -17, -115, -93, 63, 66, 127, 26, -93, 125, -89, 120, -82, -18, 127, 48, -22, -10, -85, 8, -23, 111, 110, -81, 0, 111, 92, -65, -52, -33, -107, 116, -3, 43, -49, -4, 111, -30, -72, -4, 45, -88, 75, 30, -97, 21, -84, 122, -100, -10, -62, -31, -26, -72, 86, 111, 49, 67, 109, 84, 80, 59, -16, -57, -110, 0, 3, -34, -79, 117, 101, 45, 11, -116, 117, -48, 125, -106, -67, -86, 120, 115, -59, 80, -40, -22, -106, -73, 113, 105, 87, -37, 81, 100, -72, -72, 107, -123, -118, 115, -64, -37, 43, 18, 74, -98, 56, 108, 16, 78, 112, 7, 95, 69, -81, 35, -16, 95, -60, 43, -97, 20, 106, -25, 67, -41, 45, 45, 101, -114, -23, 27, 97, 72, -56, 31, 42, -18, 42, -64, -109, -111, -128, 77, 119, 22, 90, -67, -98, -111, 118, -6, 109, -42, -95, 31, -39, -107, 60, -56, 37, -98, 81, -104, -41, -97, -111, -55, 63, -20, -79, 82, 121, 33, 88, 127, 14, 78, -76, 106, 63, -123, -118, -91, 55, -67, -114, -110, -118, 100, 50, -57, 60, 49, -51, 19, -121, -114, 69, 12, -116, -67, 24, 30, 65, 20, 87, 73, -127, -56, -8, 79, 73, -122, -41, 84, -15, 6, -96, -72, 103, -70, -44, 37, 1, -67, 20, 57, -56, -1, 0, -66, -53, -2, -98, -107, -59, 120, -85, -30, 85, -18, -99, -87, 92, -37, 104, -51, 105, 7, -39, -18, -92, -126, 72, 90, 2, 93, -54, -29, 50, 19, -9, 112, 91, 112, 0, 115, -58, 79, 90, -20, -20, -75, -69, 61, 22, -42, -6, 43, -87, 23, -50, 93, 74, 117, 17, 6, 27, -104, -55, 59, 50, -128, 15, 92, -121, 83, 92, -122, -79, -16, -58, -29, -60, 90, -59, -58, -89, 107, 50, -40, 11, -106, -13, 36, -122, 97, -72, -121, 32, 19, -54, -110, 58, -109, -111, -109, -50, 121, -59, 121, -19, 59, -74, -50, -40, -91, -68, -74, 55, -66, 30, -8, -46, 125, 127, 67, -66, 109, 68, 41, -71, -45, -16, 94, 80, 66, -119, 21, -73, 17, -41, -128, 126, 82, 61, 58, 86, 47, -120, 52, -69, 63, -119, 115, -39, 79, -89, 73, 37, -98, -87, 29, -82, -23, 99, -71, -119, -126, 8, -9, 12, 2, -40, -21, -106, 36, 99, 32, -13, -46, -90, -16, -18, -99, -31, -37, 59, 91, -33, 7, 47, -97, 113, 125, 120, -46, 69, 53, -44, -74, -32, 32, -111, 85, -64, -37, -109, -112, 6, -57, 32, -6, -125, -56, -56, -85, -13, -37, -21, 26, 77, -67, -42, -85, 113, 4, 118, 79, 105, 97, 44, 66, 84, 112, -30, 89, 24, -90, -35, -96, 12, -127, -107, -22, -61, -116, -114, 58, -44, 117, 26, 81, -43, -83, 31, 65, 60, 17, -16, -48, 120, 111, 80, 109, 75, 80, -70, -114, -26, -24, 41, 72, -106, 32, 66, -90, 70, 9, -55, -28, -100, 100, 126, 39, -81, 109, 79, 23, 105, 86, -48, -38, 89, 93, 91, -62, -94, -19, 47, -31, -14, -54, -62, 36, 99, -70, 65, -69, 11, -112, 51, -116, -98, -7, -63, 29, -13, 85, 124, 33, -83, 93, 69, 45, -4, 58, -51, -4, -110, -128, 26, 104, -26, -100, -96, 1, 17, -54, 62, 113, -115, -92, 30, 48, 71, 99, -55, -82, -118, -59, 70, -69, 121, 111, -87, -78, 56, -79, -73, -53, 90, 43, -87, 95, 53, -56, -57, -101, -125, -50, 0, 36, 47, -82, -30, 122, 96, -42, -108, -45, -108, -84, -116, -27, 38, -75, 101, -101, 11, -37, -111, 101, 24, -98, -42, -2, 105, 57, -53, -53, 20, 104, -57, -109, -43, 65, -64, -94, -75, 104, -82, -21, 28, -41, 60, -69, -60, -66, 31, -71, -48, -17, -25, -42, 52, -37, 105, -93, -75, 30, 92, 82, -78, -50, 36, -70, -72, 115, -64, 40, 91, 39, -110, 85, 72, -50, -29, -40, 12, 115, -67, -94, 120, -69, 77, 93, 42, 24, -11, 61, 82, -54, 27, -56, -44, 44, -119, 44, -62, 54, -50, 63, -70, -28, 55, -25, 93, 116, -42, -48, 92, 52, 45, 52, 75, 33, -123, -4, -56, -9, 12, -19, 108, 17, -111, -17, -126, 107, 59, -60, 58, 63, -10, -34, -103, -10, 96, -47, -122, 89, 4, -118, -78, -90, -8, -36, -116, -4, -82, 59, -125, -109, -18, 14, 15, 106, -58, -91, 43, -83, 13, 21, 77, -109, 60, -34, -15, 22, 93, 99, 83, -42, -84, 47, 32, -106, 27, 25, 99, -67, -102, -30, 9, 89, -99, -44, -73, 24, -38, 113, -14, -58, 36, 78, -92, 16, 121, 30, -102, -6, -121, -120, -18, 124, 79, -31, -115, 110, 77, 53, 45, -94, -79, 72, 36, -123, -123, -42, 68, -82, 74, 117, 80, 50, 48, 114, 0, -11, 32, -44, -2, 30, -126, -6, -33, 91, -43, -31, -68, 18, 43, 71, 111, 21, -78, 9, 110, 68, -64, 55, -17, 24, 34, -73, 12, -61, 14, 15, -51, -13, 124, -61, -74, 43, -88, 113, -31, -16, -42, -110, -49, 111, 103, 36, -24, -72, -118, 70, -124, 51, -89, -81, 56, -56, 53, -126, -94, -27, -77, -40, -46, 85, 18, -24, 98, -40, -8, 103, 70, 62, 49, -66, 2, -62, 17, 12, 54, 118, -78, 36, 8, -95, 98, -36, 90, 97, -72, -96, -31, -114, 17, 113, -100, -30, -69, 42, -26, -76, 0, 91, -60, 90, -93, 16, 65, 75, 75, 72, 88, 31, 81, -26, -73, -14, 113, 93, 45, 117, 82, 86, -119, -116, -37, 108, 40, -94, -118, -48, -128, -94, -118, 40, 3, 27, 80, -16, -82, -115, -86, 95, 11, -69, -37, 79, 53, -9, 7, 100, 103, 111, 45, -40, 12, 6, 100, -50, 9, 3, -116, -111, 85, 111, -4, 47, -90, 65, 101, 37, -51, -70, 79, 4, -42, -29, -49, -119, -110, -31, -56, 86, 79, -104, 124, -92, -107, -57, 24, 35, 29, 9, -94, -118, -119, 69, 89, -24, 92, 100, -18, -75, 44, -8, 98, 13, -70, 83, 93, -68, -113, 45, -59, -20, -122, 105, -99, -15, -110, -36, 40, 3, 0, 96, 0, -96, 86, -43, 20, 83, -121, -62, -123, 63, -119, -123, 20, 81, 84, 73, -1, -39},
			{-1, -40, -1, -32, 0, 16, 74, 70, 73, 70, 0, 1, 1, 1, 0, 96, 0, 96, 0, 0, -1, -37, 0, 67, 0, 8, 6, 6, 7, 6, 5, 8, 7, 7, 7, 9, 9, 8, 10, 12, 20, 13, 12, 11, 11, 12, 25, 18, 19, 15, 20, 29, 26, 31, 30, 29, 26, 28, 28, 32, 36, 46, 39, 32, 34, 44, 35, 28, 28, 40, 55, 41, 44, 48, 49, 52, 52, 52, 31, 39, 57, 61, 56, 50, 60, 46, 51, 52, 50, -1, -37, 0, 67, 1, 9, 9, 9, 12, 11, 12, 24, 13, 13, 24, 50, 33, 28, 33, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, -1, -64, 0, 17, 8, 0, 32, 0, -95, 3, 1, 34, 0, 2, 17, 1, 3, 17, 1, -1, -60, 0, 31, 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, -1, -60, 0, -75, 16, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125, 1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34, 113, 20, 50, -127, -111, -95, 8, 35, 66, -79, -63, 21, 82, -47, -16, 36, 51, 98, 114, -126, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, -125, -124, -123, -122, -121, -120, -119, -118, -110, -109, -108, -107, -106, -105, -104, -103, -102, -94, -93, -92, -91, -90, -89, -88, -87, -86, -78, -77, -76, -75, -74, -73, -72, -71, -70, -62, -61, -60, -59, -58, -57, -56, -55, -54, -46, -45, -44, -43, -42, -41, -40, -39, -38, -31, -30, -29, -28, -27, -26, -25, -24, -23, -22, -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -1, -60, 0, 31, 1, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, -1, -60, 0, -75, 17, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119, 0, 1, 2, 3, 17, 4, 5, 33, 49, 6, 18, 65, 81, 7, 97, 113, 19, 34, 50, -127, 8, 20, 66, -111, -95, -79, -63, 9, 35, 51, 82, -16, 21, 98, 114, -47, 10, 22, 36, 52, -31, 37, -15, 23, 24, 25, 26, 38, 39, 40, 41, 42, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, -126, -125, -124, -123, -122, -121, -120, -119, -118, -110, -109, -108, -107, -106, -105, -104, -103, -102, -94, -93, -92, -91, -90, -89, -88, -87, -86, -78, -77, -76, -75, -74, -73, -72, -71, -70, -62, -61, -60, -59, -58, -57, -56, -55, -54, -46, -45, -44, -43, -42, -41, -40, -39, -38, -30, -29, -28, -27, -26, -25, -24, -23, -22, -14, -13, -12, -11, -10, -9, -8, -7, -6, -1, -38, 0, 12, 3, 1, 0, 2, 17, 3, 17, 0, 63, 0, -7, -2, -70, 63, 2, 120, 97, -4, 93, -30, -5, 29, 43, -26, 22, -20, -34, 101, -53, -113, -32, -123, 121, 99, -7, 112, 61, -56, -82, -117, -31, -73, -124, 60, 43, -30, -43, -106, 13, 75, 81, -66, -113, 83, -120, -105, 91, 72, -74, 40, -106, 48, 58, -87, 32, -28, -11, -56, -81, 68, -46, 108, 52, 47, 12, -38, 95, 91, -8, 123, 77, -69, -74, -72, -69, 65, 4, -9, 55, 83, 6, 112, -128, -14, -96, 14, -103, -4, 63, 74, -58, -66, 34, 20, 99, 121, -77, -97, 19, -118, -91, -122, -113, 53, 71, 111, -44, -14, -65, -118, 62, 16, -121, -62, 62, 45, 120, -84, 23, -2, 37, 87, -120, 46, 44, -104, 54, -31, -80, -11, 93, -35, -16, 115, -8, 98, -72, -86, -6, 46, -2, -33, 70, -42, -76, 107, 125, 51, -60, 26, 116, -9, 80, 90, 72, -49, 109, 44, 19, 4, 120, -125, 117, 94, 122, -113, 111, -89, -91, 112, -65, 16, 60, 17, -32, -1, 0, 11, 104, -23, 113, 109, -88, 106, 81, -22, 87, 10, -83, 111, 97, 54, -57, 56, -49, 37, -16, 1, 81, -41, -15, -4, 106, 112, -8, -104, 87, -115, -30, -11, -22, -69, 17, -124, -58, 82, -60, -61, -102, 15, 94, -85, -79, -27, -43, -67, -32, -49, 13, -51, -30, -49, 21, -40, 104, -15, 100, 36, -46, 102, 103, 31, -14, -50, 33, -53, -73, -27, -97, -57, 21, -47, 124, 54, -16, -105, -122, 60, 93, 44, -74, -102, -90, -89, 121, 6, -92, -84, 90, 59, 104, -74, -88, -107, 49, -4, 44, 65, -55, 28, -28, 122, 115, -21, 94, -57, -31, -65, 11, 104, 30, 16, 123, -121, -47, -20, -18, 35, -72, -99, 60, -87, 39, -72, -104, 59, -19, -50, 72, 0, 12, 12, -41, 65, -42, 120, -81, -59, 79, 6, -61, -32, -17, 22, 121, 90, 122, -80, -46, -81, 35, 19, 90, 18, -59, -80, 58, 50, -28, -11, -63, -3, 8, -82, 26, -66, -84, -15, 6, -115, -93, -8, -94, -62, 43, 29, 102, -51, -25, -122, 25, 12, -112, -76, 82, -7, 111, 25, 35, 4, 3, -24, 125, 62, -107, -27, 31, 16, -68, 7, -32, -1, 0, 10, 105, 34, 120, 53, 45, 65, 53, 25, -128, 54, -42, 82, 20, 114, -36, -14, 91, 0, 16, -67, 121, -11, -23, 64, 30, 85, 91, 94, 19, -16, -12, -2, 42, -15, 69, -122, -115, 111, -112, 110, 36, 2, 71, 3, -3, 92, 99, -106, 111, -64, 3, 93, 23, -61, 127, 10, -8, 103, -59, -105, 82, -39, 106, -38, -99, -27, -74, -96, 14, -24, 96, -117, 106, -84, -55, -114, 112, -60, 31, -104, 115, -58, 58, 116, -17, 94, -53, -31, -65, 9, -8, 127, -62, 19, -49, 54, -111, 103, 112, -105, 82, -57, -28, -67, -59, -52, -63, -40, 46, 114, 64, 0, 96, 103, 2, -128, 60, 111, -30, -57, -126, -83, -4, 29, -30, 116, 26, 106, 48, -46, 47, 98, 18, -38, -110, -59, -74, -111, -61, -82, 79, 92, 30, 126, -116, 43, -126, -81, -85, 117, -19, 39, 72, -15, 54, -102, -102, 126, -79, 104, -9, 22, -15, 73, -26, -60, 98, -105, -53, 120, -37, 24, 56, 62, -121, -46, -68, -85, -57, -2, 1, -16, 119, -123, 116, 111, -75, 69, -87, 106, 49, 95, -52, -65, -24, -74, 82, 20, -112, -71, -49, 36, -32, 2, 20, 122, -48, 7, -109, -42, -73, -122, 116, 27, -113, 19, 120, -110, -61, 71, -75, -49, -103, 117, 40, 66, -40, -5, -117, -43, -104, -3, 0, 39, -16, -82, -113, -31, -57, -122, 60, 53, -30, -69, -23, 44, 53, -115, 78, -18, -42, -8, -100, -37, -61, 16, 80, -77, 46, 57, 1, -120, 63, 55, -74, 57, 29, 43, -39, -4, 57, -31, 15, 15, 120, 66, -22, 91, -115, 34, -50, -27, 111, 30, 51, 9, -72, -71, -104, 59, 42, -109, -50, 0, 24, 25, -59, 0, 121, 7, -59, -81, 3, -38, -8, 55, -60, 48, 54, -108, -81, -3, -111, 121, 16, 104, 11, 49, 109, -82, -68, 58, -109, -33, -100, 31, -8, 23, -75, 121, -11, 125, 95, -82, -23, 122, 79, -119, 52, -79, -90, -22, -10, -115, 113, 106, -110, 9, 99, -14, -27, -40, -15, -74, 49, -112, 125, -63, -81, 43, -15, -17, -61, -1, 0, 6, -8, 95, 68, 55, -87, -87, 106, 48, 94, -52, -89, -20, -106, 114, 20, -112, -56, -34, -8, 0, -123, 29, -49, -11, -96, 15, 36, -83, 47, 15, -24, -73, 62, 34, -15, 5, -114, -111, 104, 51, 53, -44, -94, 48, 127, -70, 59, -79, -10, 3, 39, -16, -82, -109, -31, -41, -122, -68, 55, -30, -99, 70, 77, 63, 89, -44, -18, -19, 47, 24, -125, 109, 28, 65, 66, -52, 59, -115, -57, 63, 55, -74, 57, -81, 105, -16, -17, -125, 124, 59, -32, -5, -23, 46, -76, -85, 59, -111, 122, 99, 104, -66, -47, 117, 56, 98, -86, 122, -32, 1, -128, 125, -24, 3, -55, 62, 45, -8, 14, -41, -63, -70, -51, -92, -70, 72, 115, -92, -34, 69, -120, -39, -104, -74, -39, 19, -121, 4, -5, -16, -33, -119, -12, -81, 59, -81, -84, 53, -67, 55, 75, -15, 22, -108, 116, -51, 94, -47, -82, 45, 4, -126, 84, 9, 38, -58, -115, -64, 35, 32, -3, 13, 121, 119, -114, 126, 30, -8, 47, -61, 58, 19, 95, -115, 71, 82, -74, -70, -107, 72, -75, -76, 118, 73, 12, -83, -7, 2, 23, -44, -25, -11, -96, 15, 32, -94, -118, 40, 2, 107, 91, -87, -20, -82, -94, -70, -75, -103, -31, -98, 38, 15, 28, -120, 112, -54, 71, 112, 107, -24, -39, 62, -39, 120, -42, 62, 100, 70, 91, -9, -78, -119, -82, 26, 52, -58, -7, 8, -28, -98, -62, -66, 111, -119, -107, 37, 70, 117, -36, -127, -127, 101, -50, 50, 61, 43, -72, -15, 63, -59, 77, 107, 93, 15, 109, 99, -1, 0, 18, -69, 2, 54, -7, 80, 49, 46, -61, -3, -89, -21, -8, 12, 10, -61, 17, 65, 87, -121, 35, 118, 57, 113, 120, 88, -30, -87, -5, 41, 59, 35, -41, -84, 96, -106, -37, 90, -74, -114, -26, -36, -85, -99, -63, 55, -116, -82, -20, 100, 16, 122, 30, -107, -13, -82, -73, 125, 127, -88, -21, 55, 119, 58, -100, -17, 61, -29, 72, 68, -114, -34, -96, -29, 30, -64, 122, 87, 69, -31, 127, -119, 58, -17, -122, -118, 67, -26, -3, -70, -59, 79, -4, 123, 92, -110, 113, -2, -21, 117, 95, -27, -19, 92, -34, -79, 123, 22, -91, -83, 95, 95, 67, 1, -126, 59, -103, -34, 85, -120, -74, -19, -127, -119, 56, -49, 126, -76, -80, -40, 120, -48, -117, -116, 94, -105, 22, 15, 9, 28, 44, 29, 56, 59, -85, -36, -83, 111, 113, 53, -83, -60, 119, 22, -14, -68, 83, 70, -63, -110, 68, 56, 101, 35, -95, 6, -66, -97, -45, -82, 47, -82, -12, -83, 49, -82, -127, -106, -10, 75, 72, -34, 119, 11, -115, -50, 64, 36, -102, -7, 117, 112, 24, 18, 50, 51, -56, -82, -17, -60, -65, 21, 53, -99, 106, 63, -78, 105, -32, 105, 86, 1, 66, 121, 112, 57, 50, 48, 3, 31, 51, -11, -4, 6, 43, -96, -21, 61, -46, 31, 54, 27, -40, -110, 84, -58, -29, -128, 72, -56, -49, 99, 95, 49, 120, -126, -9, 80, -44, 53, -5, -39, -11, 59, -121, -98, -13, -51, 100, -111, -37, -44, 28, 96, 14, -64, 99, -91, 109, -8, 99, -30, 54, -67, -31, -106, 88, -110, 111, -74, 89, 3, -51, -83, -63, 44, 7, -5, -89, -86, -2, 28, 123, 86, 14, -71, -88, 69, -85, 107, -73, -38, -116, 54, -1, 0, 103, -114, -22, 118, -108, 69, -69, 118, -51, -57, 56, -50, 6, 104, 2, -108, 51, 75, 111, 50, 77, 12, -115, 28, -79, -80, 100, 116, 56, 42, 71, 66, 15, -83, 125, 59, -92, 93, 95, -34, -24, 90, 68, -105, 123, -90, -66, -106, -50, 57, 38, 125, -72, 44, -60, 103, 38, -66, 95, -82, -13, -60, 63, 21, 53, -115, 86, -39, 108, 116, -59, 26, 85, -118, -58, -79, -19, -123, -13, 35, 0, 49, -53, -10, -6, 12, 126, 52, 1, -18, -111, 121, -80, -34, 66, -77, 70, 66, -77, 99, 61, 69, 124, -51, -30, -117, -35, 66, -1, 0, -60, -38, -124, -70, -99, -61, -49, 116, -77, -68, 108, -51, -37, 105, 32, 0, 59, 1, -114, -107, -85, -31, -97, -120, 122, -9, -122, 89, 99, -118, -29, -19, 86, 121, -53, 90, -36, -110, -53, -1, 0, 1, 61, 84, -3, 43, 27, -60, 58, -92, 90, -41, -120, 111, -75, 56, 109, -66, -52, -105, 82, -103, 68, 59, -9, 109, 39, -81, 56, 25, -26, -128, 51, -93, -111, -31, -107, 37, -119, -39, 36, 66, 25, 89, 78, 10, -111, -48, -125, 95, 77, 104, 87, -102, -123, -9, -122, -12, 105, -81, 25, -89, -67, -102, -47, 100, -106, 77, -72, 45, -98, -103, -4, 49, 95, 49, -41, 121, -82, 124, 84, -43, -17, -20, 97, -45, -76, -92, 26, 85, -108, 112, -84, 88, -123, -13, 43, -128, -96, 114, -3, -121, 29, 6, 40, 3, -35, 35, -13, 96, -69, -124, 77, 25, -38, 88, 12, -11, 21, -13, 95, -116, 47, 117, 11, -17, 22, 106, 79, -87, -36, 60, -41, 17, -36, 60, 89, 110, -118, -86, -60, 0, 7, 97, -114, -43, 119, -61, 95, 16, 117, -17, 12, -72, 88, 46, 77, -51, -95, 57, 107, 91, -110, 89, 15, -82, 59, -87, -6, 86, 95, -119, 53, 120, -11, -17, 17, 95, 106, -79, 91, 125, -103, 110, -92, -13, 60, -99, -5, -74, -110, 6, 121, -64, -49, 57, 52, 1, -104, -114, -47, -70, -70, 49, 87, 82, 10, -78, -100, 16, 125, 69, 125, 47, -31, -53, -35, 66, -1, 0, -62, -102, 44, -9, -50, -41, 23, -77, 91, 111, 121, 54, -14, -64, -97, -105, 63, -122, 57, -81, -103, -85, -68, -43, -66, 41, -22, -41, 58, 93, -74, -105, -92, 70, 52, -85, 72, 96, 72, 73, -119, -73, 74, -5, 84, 15, -67, -40, 113, -37, 31, 90, 0, -9, 53, -13, 96, -71, -117, -50, -116, -20, 44, 51, -36, 87, -50, 62, 56, -67, -44, 111, 124, 101, -86, 29, 74, 119, -102, 104, 110, 30, 37, -35, -47, 81, 88, -123, 0, 118, 24, -87, -68, 57, -29, -3, 127, -61, 82, -30, -34, -24, -36, 91, 22, -53, -37, 92, -110, -24, -34, -72, -18, -89, -36, 26, -49, -15, 62, -78, -98, 33, -15, 29, -26, -83, 29, -81, -39, 69, -53, 7, 48, -17, -33, -76, -19, 0, -13, -127, -44, -126, 127, 26, 0, -56, -94, -118, 40, 3, -1, -39},
			{-1, -40, -1, -32, 0, 16, 74, 70, 73, 70, 0, 1, 1, 1, 0, 96, 0, 96, 0, 0, -1, -37, 0, 67, 0, 8, 6, 6, 7, 6, 5, 8, 7, 7, 7, 9, 9, 8, 10, 12, 20, 13, 12, 11, 11, 12, 25, 18, 19, 15, 20, 29, 26, 31, 30, 29, 26, 28, 28, 32, 36, 46, 39, 32, 34, 44, 35, 28, 28, 40, 55, 41, 44, 48, 49, 52, 52, 52, 31, 39, 57, 61, 56, 50, 60, 46, 51, 52, 50, -1, -37, 0, 67, 1, 9, 9, 9, 12, 11, 12, 24, 13, 13, 24, 50, 33, 28, 33, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, -1, -64, 0, 17, 8, 0, 23, 0, 49, 3, 1, 34, 0, 2, 17, 1, 3, 17, 1, -1, -60, 0, 31, 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, -1, -60, 0, -75, 16, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125, 1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34, 113, 20, 50, -127, -111, -95, 8, 35, 66, -79, -63, 21, 82, -47, -16, 36, 51, 98, 114, -126, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, -125, -124, -123, -122, -121, -120, -119, -118, -110, -109, -108, -107, -106, -105, -104, -103, -102, -94, -93, -92, -91, -90, -89, -88, -87, -86, -78, -77, -76, -75, -74, -73, -72, -71, -70, -62, -61, -60, -59, -58, -57, -56, -55, -54, -46, -45, -44, -43, -42, -41, -40, -39, -38, -31, -30, -29, -28, -27, -26, -25, -24, -23, -22, -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -1, -60, 0, 31, 1, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, -1, -60, 0, -75, 17, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119, 0, 1, 2, 3, 17, 4, 5, 33, 49, 6, 18, 65, 81, 7, 97, 113, 19, 34, 50, -127, 8, 20, 66, -111, -95, -79, -63, 9, 35, 51, 82, -16, 21, 98, 114, -47, 10, 22, 36, 52, -31, 37, -15, 23, 24, 25, 26, 38, 39, 40, 41, 42, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, -126, -125, -124, -123, -122, -121, -120, -119, -118, -110, -109, -108, -107, -106, -105, -104, -103, -102, -94, -93, -92, -91, -90, -89, -88, -87, -86, -78, -77, -76, -75, -74, -73, -72, -71, -70, -62, -61, -60, -59, -58, -57, -56, -55, -54, -46, -45, -44, -43, -42, -41, -40, -39, -38, -30, -29, -28, -27, -26, -25, -24, -23, -22, -14, -13, -12, -11, -10, -9, -8, -7, -6, -1, -38, 0, 12, 3, 1, 0, 2, 17, 3, 17, 0, 63, 0, -10, -38, -59, -121, -60, -74, -77, -55, 18, -83, -67, -56, 18, -78, -88, 39, 103, 27, -120, 0, -97, -101, 61, -59, 92, -43, -81, -28, -45, 108, -2, -47, 29, -65, -100, 3, 97, -14, -59, 66, 46, 15, -52, 112, 15, 29, 59, 119, -82, 6, -34, -21, -20, -14, 66, -5, -112, -7, 38, 54, -28, -112, 14, -46, -89, -82, 56, -23, -23, 94, 94, 101, -113, -106, 30, -92, 33, 7, -66, -2, -121, 45, 90, -82, 13, 36, 122, 61, -51, -51, -67, -100, 13, 61, -44, -15, -63, 10, 99, 116, -110, -72, 85, 25, 56, 25, 39, -114, -90, -77, 101, -15, 79, -121, -30, -119, -28, 109, 107, 79, 42, -118, 88, -124, -72, 86, 56, 30, -128, 28, -109, -20, 57, -85, -10, 23, 18, -35, 89, 71, 60, -48, 24, 29, -63, 62, 89, 57, -64, -49, 29, -121, 81, -125, -45, -67, 100, -53, 21, -37, -8, -86, -10, 91, 75, -115, -110, 71, 101, 108, 124, -105, 3, -53, -101, -25, -97, -122, 56, 44, 59, -32, -81, 66, 114, 67, 99, 21, -21, 69, -87, 36, -47, -70, 119, 46, 92, -8, -125, 71, -77, 107, 117, -71, -43, 45, 34, 55, 10, 26, 45, -45, 40, 12, -92, 18, 27, 63, -35, 56, 56, 61, 51, -57, 82, 42, -59, -106, -93, 105, -88, 38, -5, 89, 119, -126, -119, 32, -54, -107, 37, 28, 101, 91, 4, 3, -126, 59, -6, -126, 58, -126, 7, 7, -30, -37, -90, -125, -59, -79, 3, 125, 31, -108, 49, -124, 23, -123, 12, 78, 99, 108, -110, -65, 105, -113, 105, -62, -116, 16, 20, 17, 41, -50, 78, 51, -73, -31, 4, -73, -126, 40, 32, 23, 44, -14, -83, -65, -108, -120, 46, -91, -107, 88, 71, -80, 60, -128, 51, 108, 85, 98, -56, 80, 0, 14, -58, 4, 112, -40, 90, 3, -85, -94, -118, 40, 1, 24, 18, -92, 12, 115, -22, 50, 43, 2, 31, 10, -37, -63, -86, 125, -83, 100, 67, 24, 59, -110, 3, 31, -54, -115, -22, 57, -4, -121, 111, -53, 5, 21, -100, -23, 66, -93, 78, 106, -10, -40, 78, 41, -18, 116, 3, 56, -25, -83, 48, 69, 24, -107, -91, 8, -94, 70, 80, -84, -32, 114, 64, -55, 0, -97, 65, -109, -7, -102, 40, -83, 6, 54, 123, 107, 123, -92, 9, 113, 4, 115, 32, -49, -53, 34, 6, 28, -126, -89, -81, -88, 36, 125, 9, 29, -24, -5, 53, -65, -38, -2, -43, -28, 71, -10, -99, -98, 95, -99, -80, 111, -39, -100, -19, -49, 92, 103, -100, 81, 69, 0, 75, 69, 20, 80, 7, -1, -39}
	};
	
	//从字节数组创建图像
	public static Bitmap getImg(int i)
	{
		return BitmapFactory.decodeByteArray(img[i-1], 0, img[i-1].length);
	}
	
	
	//此函数用于中断查看资源文件inputFile转化为字节数组后的内容
	public  static  byte[] getByteArray(String inputFile)
	{
		byte[] buffer = null;
		String SDroot = "/mnt/sdcard/";		//sd卡根目录
		String path = SDroot + inputFile;	//如 inputFile = img/img1.jpg
		
        try 
        {
            FileInputStream finS = new FileInputStream(path);	//创建指定文件的输入流
            try 
            {
				buffer = readStream(finS);						//把输入流转化成字节数组
			} 
            catch (Exception e) 
			{
				e.printStackTrace();
			}
        } 
        catch (FileNotFoundException e) 
        {
             e.printStackTrace();
        }
        
        //此处中断,在buffer中查看inputFile转换成的字节数组
        return buffer;
	}
	
	//此函数将输入流内容解析成字节数组 
	public static  byte[] readStream(InputStream inStream) throws Exception 
	{  
		byte[] buffer = new byte[65536];  
		int len = -1;  
		ByteArrayOutputStream outStream = new ByteArrayOutputStream();  
		while ((len = inStream.read(buffer)) != -1) 
		{  
			outStream.write(buffer, 0, len);  
		}  
		byte[] data = outStream.toByteArray();  
		outStream.close();  
		inStream.close();  
		return data;  
	} 
}

 

打包下载
http://download.csdn.net/detail/scimence/9054701


附录:

安卓 ListView列表

https://blog.csdn.net/scimence/article/details/83385369

 

 

 

打包下载
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值