阅读更多 android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:configChanges="orientation|keyboardHidden"

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

package Pbi.PbiMC.utils;

import java.util.List;

import Pbi.PbiMC.R;
import Pbi.PbiMC.bean.VideoBean;
import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

public class ListAdapter extends BaseAdapter {

private class GridHolder {
ImageView appImage;
TextView appName;
}

private Context context;

private List items;
private LayoutInflater mInflater;

public ListAdapter(Context c) {
super();
this.context = c;
}

public void setList(List items) {
if (null==this.items) {
this.items = items;
}
mInflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}

public int getCount() {
return items.size();
}

@Override
public Object getItem(int index) {

return items.get(index);
}

@Override
public long getItemId(int index) {
return index;
}

@Override
public View getView(int index, View convertView, ViewGroup parent) {
GridHolder holder;
if (convertView == null) {  
convertView = mInflater.inflate(R.layout.item_row, null);  
holder = new GridHolder();
holder.appName = (TextView)convertView.findViewById(R.id.item_list_text);
holder.appImage = (ImageView) convertView.findViewById(R.id.item_list_icon);
convertView.setTag(holder);  

}else{
holder = (GridHolder) convertView.getTag();  
}
VideoBean info = (VideoBean) items.get(index);
if (info != null) {
Log.e("PbiMC", "  img  : " + info.get_img());
if (null!=info.get_img()) {
holder.appImage.setImageBitmap(info.get_img());
}
holder.appName.setText(info.get_name());
}
return convertView;
}
}




lists = (ListView) this.findViewById(R.id.itemListView);
adapter = new ListAdapter(this);
adapter.setList(db.selectDirectSeed());
lists.setAdapter(adapter);


<?xml version="1.0" encoding="utf-8"?>
android:orientation="horizontal" android:layout_width="fill_parent"
android:layout_height="fill_parent">

android:layout_width="50dip" android:layout_height="50dip"
android:src="@drawable/item_img" />

android:layout_width="wrap_content" android:layout_height="43px"
android:layout_marginLeft="15px" android:textSize="30px"
android:layout_marginTop="16px" android:textColor="@drawable/white"
android:layout_marginBottom="16px" />



new AlertDialog.Builder(PbiP2SProject.this)
        .setTitle(R.string.Message)
       
        .setMessage(R.string.ExitMsg)
       
        .setPositiveButton(R.string.ok,
new DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog, int i) {
                    finish();
// TODO Auto-generated method stub

}
})
.setNegativeButton( R.string.cancel ,
        new DialogInterface.OnClickListener()
                    {
           
            public void onClick(DialogInterface dialog, int i)
            {
           }
            })
.show();

更多相关文章

  1. 阅读代码:Spark 与 Flink 中的 RPC 实现
  2. 京东秒杀区
  3. Nodejs 源码阅读指南
  4. 论文阅读: 基于SLAM的使用GPS和鱼眼相机第Integrity Monitoring
  5. 【论文解读】UniLM:一种既能阅读又能自动生成的预训练模型
  6. 工具需用好,阅读源码没烦恼
  7. M 365 开发篇:SharePoint Framework 1.12将扩展更多的Teams
  8. Spark源码阅读的正确打开方式
  9. 陈丹琦博士论文翻译:神经阅读理解与超越(Neural Reading Comprehen

随机推荐

  1. rk3288 Android(安卓)5.1root方法
  2. Android中的文件存储
  3. android studio3.1.4更新3.2.1版本问题汇
  4. Android控件 -- 设置组件所占比例
  5. ym——Android如何支持多种屏幕
  6. android之银行卡手机号码自动补齐空格
  7. Android 使用ExoPlayer视频播放 (一)
  8. Android Service简介(系列1)
  9. android annotation配置及简单使用
  10. Android数据适配-ExpandableListView