在 textview 或者 toast 中显示参数的方法

我不能在一个 toast 或者 textfield 中显示 v1,v2,v3 或者 v4 的值,但是可以显示字符串。我调用这些值出错了吗?

testWheelValue(R.id.passw_1, v1);
            testWheelValue(R.id.passw_2, v2);
            testWheelValue(R.id.passw_3, v3);
            testWheelValue(R.id.passw_4, v4);
            testpins = v1 + v2 + v3 + v4;
            text.setText(testpins);
            // Toast.makeText(getBaseContext(), testpins,
            // Toast.LENGTH_SHORT).show();


private boolean testWheelValue(int id, int value) {
        return getWheel(id).getCurrentItem() == value;
    }

你把testpins输出一下看看,要是空的话你当然看不见
而且,testpins是个int型吧
转换为String再试试

String tmp = String.valueOf(i);//or
String tmp = Integer.toString(i);