我已經創建了字符串庫,但是android字符串庫不能從屏幕開始顯示。它顯示。任何解決方案安卓字符串庫不能從屏幕開始顯示
感謝客棧提前。
private Context cont;
private String [] stringid=new String[]{"Index-Nifty","Positional calls","Intraday calls","InvestmentIdea","Optional calls","BTST-STBT calls"};
public TabGallary(Context c) {
cont = c;
}
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) {
TextView view = new TextView(cont);
//Fixing width & height for String to display
view.setLayoutParams(new Gallery.LayoutParams(125, 20));
view.setSoundEffectsEnabled(true);
view.setText(stringid[position]);
view.setSingleLine();
Intent intent = new Intent();
startActivity(intent);
return view;
}
private void startActivity(Intent intent) {
// TODO Auto-generated method stub
}
我剛剛刪除設置佈局? – Siten 2011-04-04 10:37:55
它不工作..它只是重疊字符串,並從大約中旬開始。 – Siten 2011-04-04 10:40:23
發佈您在主視圖中顯示圖庫的代碼部分 – pankajagarwal 2011-04-04 10:52:25