在我的应用程序中,我使用了一个警报框..在这个警报框中,我给出了另一个显示布局..使用setView()
方法..我有一个问题。如何在我的活动中使用布局元素ID?如何使用其他布局ID?
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.volume, null);
builder.setTitle("Volume");
builder.setView(layout);
builder.setPositiveButton("OK", null);
builder.setNegativeButton("Cancel", null);
AlertDialog alert1 = builder.create();
alert1.show();
阐述您的问题... – waqaslam 2012-03-16 12:50:34
海,在我的应用程序使用量控制搜索条。这应该出现在一个buuton点击。所以我使用警报box.that警报框有一个卷布局..我problam是我没有使用seekbar id .. – Palaniraja 2012-03-16 14:08:41
然后我想你应该在xml布局中指定一个ID到你的seekbar以便稍后参考它在代码 – waqaslam 2012-03-16 14:13:23