Posts

Showing posts with the label android-number-picker

Android Studio dialog doesn't work

Android Studio dialog doesn't work I am trying to create multi question dialog. It seems that everything is working fine expect that I cannot get result of numberpicker + I have leaking window in the end This is my code: final Context context = this; int currentshape, goalshape=9,qnumber=1,gender,age; // 0 = lean , 1 = fat , 2 = skinny fat || 0 = shredded , 1 = powerlifter, 2 = bodybuiler. int height,weight; Boolean flag=false,flag2=false,flag3=false; int year; Button current, goals; // buttons public static final String PREFS_NAME = "MyApp_Settings"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.question1); current = new Button[3]; goals = new Button[3]; current[0] = (Button) findViewById(R.id.btnLean); current[1] = (Button) findViewById(R.id.btnFat); current[2] = (Button) findViewById(R.id.btnSkinnyFat); for (int i = 0; i < 3; i++) current[i].setOnCli...