0
public class Test extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Button b = new Button(this);
String id = Integer.toString(b.getId());
Toast.makeText(getApplicationContext(), id, 1).show();
}
}
爲什麼它返回-1?getID for button returns -1