|
package com.hfk.yadd;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
public class CameraTransformationRotateXConfigActivity extends Activity {
public static final String TRANSFORMATION_ROTATEX = "ROTATEX";
public static final String ROTATEX_ANGLE = "ROTATEX_ANGLE";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.cameratransform_rotatex_config);
mTextAngle = (EditText)findViewById(R.id.editAngleX);
Bundle data = getIntent().getExtras();
if(data != null){
if(data.containsKey(ROTATEX_ANGLE)) {
mTextAngle.setText(Float.toString(data.getFloat(ROTATEX_ANGLE)));
}
}
}
@Override
public void onBackPressed() {
Intent result = new Intent();
Bundle b = new Bundle();
b.putString(CustomDrawableCameraTransformationConfigActivity.TRANSFORMATION_TYPE, TRANSFORMATION_ROTATEX);
b.putFloat(ROTATEX_ANGLE, Float.parseFloat(mTextAngle.getText().toString()));
result.putExtras(b);
setResult(Activity.RESULT_OK, result);
super.onBackPressed();
}
private EditText mTextAngle;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.