package com.sabirjan.android;

import java.util.ArrayList;
import java.util.List;

import com.sabirjan.CaoZuoTXT.ReadTXT;
import com.sabirjan.Dialog.Custom_WaitDialog;
import com.sabirjan.DrawUyghurWord.ConvertUL;
import com.sabirjan.Kanun.GetUyghursent;
import com.sabirjan.android.R;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.graphics.Typeface;
import android.os.Bundle;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;
import android.os.Message;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.view.View.OnKeyListener;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.AbsListView.OnScrollListener;
import android.widget.AdapterView.OnItemClickListener;

public class Qita_ListShowActivity extends Activity {
    /** Called when the activity is first created. */
	
	public static final int MSG_UPDATE_LIST = 18;  
    
    private ListView mApps;  
    private Context mContext;  
    private List<String> mAppList;  
    private Custom_WaitDialog  dialog;  
    private ArrayAdapter mAdapter;  
    private boolean mIsLoaded = false;  
    String []str;
    ArrayList<String>  myListItems ;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); //
        setContentView(R.layout.qita_main);
        
		getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.title);//
        mApps = (ListView)findViewById(R.id.myListView);
       
        mContext = this;  
        mAppList = new ArrayList<String>();  
        
   	 int resID = R.layout.qita_item;
     mAdapter = new ArrayAdapter<String>(Qita_ListShowActivity.this, resID,
        		mAppList);
	  mApps.setAdapter(mAdapter);
	  str=new String[]{"分配单位类型码","民族代码","入学类型码","国别代码","高等院校代码","技术职务代码","论文类型代码","论文选题来源代码"
         		,"性别",	"学科门类及本、硕专业名称代码","学历代码","学习方式代码","政治面貌代码"
         	   };
         	   for(int i=0;i<str.length;i++)
         	   {
      //   		str[i]=clsUyghurWord.GetULUyghurWord(str[i]);
         	   	mAppList.add(str[i]);
         	   mAdapter.notifyDataSetChanged();
              
         	   }
         	    
        // 设置正在处理窗口  
	  //Thread thread =  new Thread(null, loadMoreListItems);
     // thread.start();
       mApps.setOnItemClickListener(new OnItemClickListener() {

			@Override
			public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
					long arg3) 
			{
			
					Intent in=new Intent();
					in.setClass(Qita_ListShowActivity.this, Qita_Activity.class);
					in.putExtra("Url",String.valueOf(arg2));
					startActivity(in);
				}
          });
     
        

       

    }
    
   
    @Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		// TODO Auto-generated method stub
    	if(keyCode==KeyEvent.KEYCODE_BACK)
    	{
    		this.finish();
    		return true;
    	}
		return super.onKeyDown(keyCode, event);
	}

}