I have two number pickers Numberpicker1 and Numberpicker2
Numberpicker 1 => numberpicker1.setminvalue(1) and numberpicker1.setmaxvalue(7)
Numberpicker 2 => numberpicker2.setminvalue(0) and numberpicker2.setmaxvalue(12)
The output is not showing displaying unfortunately stopped app gets crashed
pls help out.And even my onclick button code is not working error i am unable to rectify.i dont have much knowledge about coding pls correct my code and send here
public class MainActivity extends AppCompatActivity {
NumberPicker pick1,pick2;
Button btnsubmit;
@override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
pick1 = (NumberPicker)findViewById(R.id.picker1);
pick2 = (NumberPicker)findViewById(R.id.picker2);
pick1.setMinValue(1);
pick1.setMaxValue(7);
pick2.setMinValue(0);
pick2.setMaxValue(12);
btnsubmit.setOnClickListener(new View.OnClickListener() {
@override
public void onClick(View v)
{
try
{
}
catch (Exception e)
{
e.getMessage();
}
}
});
}
}
Numberpicker 1 => numberpicker1.setminvalue(1) and numberpicker1.setmaxvalue(7)
Numberpicker 2 => numberpicker2.setminvalue(0) and numberpicker2.setmaxvalue(12)
The output is not showing displaying unfortunately stopped app gets crashed
pls help out.And even my onclick button code is not working error i am unable to rectify.i dont have much knowledge about coding pls correct my code and send here
public class MainActivity extends AppCompatActivity {
NumberPicker pick1,pick2;
Button btnsubmit;
@override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
pick1 = (NumberPicker)findViewById(R.id.picker1);
pick2 = (NumberPicker)findViewById(R.id.picker2);
pick1.setMinValue(1);
pick1.setMaxValue(7);
pick2.setMinValue(0);
pick2.setMaxValue(12);
btnsubmit.setOnClickListener(new View.OnClickListener() {
@override
public void onClick(View v)
{
try
{
}
catch (Exception e)
{
e.getMessage();
}
}
});
}
}
from Android Forums at AndroidCentral.com - Ask a Question https://ift.tt/2NCyCWB
via IFTTT
Aucun commentaire:
Enregistrer un commentaire