gallery 显示文字
有时候想 向左向右设置文字的变化 不妨试试gallery
?
public Activity activity; private static LayoutInflater inflater=null; private String [] stringid=new String[]{"Index-Nifty","Positional calls","Intraday calls","InvestmentIdea","Optional calls","BTST-STBT calls"}; public TabGallary(Activity a) { activity = a; inflater = (LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE); } public int getCount(){ return stringid.length; } public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { View v; if (convertView == null) { LayoutInflater li = getLayoutInflater(); v = li.inflate(R.layout.demo, null); TextView tv1 = (TextView)v.findViewById(R.id.txt1_gvi); tv1.setText(stringid[position]); v.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // Call intent or perform ur activity; } }); } else { v= convertView; } return v; }?