am working in android. Am using NumberPicker
which i got from here i want the input value taken from the NumberPicker
should be displayed in the TextView
which i have written in different class
.. how can i do this.. please help.. here is a code..
public class home_try extends Activity {
private NumberPicker numberpicker;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.dummy1);
final Dialog textDialog = new Dialog(this);
Button setpoint= (Button) findViewById(R.id.button2);
setpoint.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
textDialog.getWindow().setFlags(
WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
textDialog.getWindow().setLayout(300, 200);
textDialog.setTitle("Set Temperature");
LayoutInflater li = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View myView = li.inflate(R.layout.main, null);
textDialog.setContentView(myView);
textDialog.show();
}
});
Button set=(Button) findViewById(R.id.button1);
set.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
setContentView(R.layout.dummy1);
}
});
}