Android如何在Textview中显示数组中的值

时间:2015-02-20 12:54:56

标签: android arraylist textview

[923332099903,24975924,923332122440,57375]

我在ArrayList中得到上述值,现在我想在textview或radiobutton中显示值,如下例所示:

923332099903

923332122440

我的活动是:

private ArrayList<String> AssociatedArray = new ArrayList<String>();
private ArrayList<String> AssociatedArrayIndexes = new ArrayList<String>();

@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
     requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
     setContentView(R.layout.change_number);
     getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.window_title);

     AssociatedArray = getIntent().getStringArrayListExtra("AssociatedArray"); 


}

1 个答案:

答案 0 :(得分:0)

使用自定义视图创建自己的列表视图(即它包含单选按钮),并将数组列表传递给适配器。