t*****e 发帖数: 102 | 1 protected void setPasscodeGridView(int layoutId, View view) {
if(mPasscodeGV==null) { initUI(view); }
PasscodeGridAdapter adapter = new PasscodeGridAdapter(getActivity(),
numbers, layoutId);
mPasscodeGV.setAdapter(adapter);
mPasscodeGV.setOnItemClickListener(new AdapterView.OnItemClickListener()
{
@Override
public void onItemClick(AdapterView> parent, View view,
int position, long id) {
if (holdButtonPress)
return;
if (!numbers[position].equals("-1") && !numbers[position].equals
("-2")) {
passcode += numbers[position];
setPasscodeButton();
Now someone tells me that Using an adapter to populate the button grid seems
overly complex and can we just use a static layout with 10 buttons. So how
can I change it? Thank you. |
|