// ------------------------------------------------------------------- @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.longlatalt_dialog); getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); mEditLong = (EditText) findViewById(R.id.edit_long); mEditLat = (EditText) findViewById(R.id.edit_lat); mEditAlt = (EditText) findViewById(R.id.edit_alt); mWGS84 = (CheckBox) findViewById(R.id.edit_wgs84); mKeyboard = new MyKeyboard( mContext, (KeyboardView) findViewById(R.id.keyboardview), R.xml.my_keyboard, -1); if (TopoDroidSetting.mKeyboard) { int flag = MyKeyboard.FLAG_POINT_DEGREE; MyKeyboard.registerEditText(mKeyboard, mEditLong, flag); MyKeyboard.registerEditText(mKeyboard, mEditLat, flag); MyKeyboard.registerEditText(mKeyboard, mEditAlt, MyKeyboard.FLAG_POINT); } else { mKeyboard.hide(); mEditLong.setInputType(TopoDroidConst.NUMBER_DECIMAL_SIGNED); mEditLat.setInputType(TopoDroidConst.NUMBER_DECIMAL_SIGNED); mEditAlt.setInputType(TopoDroidConst.NUMBER_DECIMAL); } if (mParent.mHasLocation) { mEditLong.setText(FixedInfo.double2string(mParent.mLongitude)); mEditLat.setText(FixedInfo.double2string(mParent.mLatitude)); mEditAlt.setText(Integer.toString((int) (mParent.mAltitude))); } mWGS84.setChecked(true); mBtnNS = (Button) findViewById(R.id.button_NS); mBtnNS.setOnClickListener(this); mBtnEW = (Button) findViewById(R.id.button_EW); mBtnEW.setOnClickListener(this); mBtnOK = (Button) findViewById(R.id.button_ok); mBtnOK.setOnClickListener(this); // mBtnCancel = (Button) findViewById(R.id.button_cancel); // mBtnCancel.setOnClickListener( this ); setTitle(R.string.title_coord); }