Text Report

public void onClick(View v) {

if (v.getId()==R.id.btnReportFormSubmit) {

progressDialog = ProgressDialog.show(ReportFormActivity.this, "Submitting Report", "Please wait...", true);

Handler handler = new Handler(); handler.postDelayed(this, 1000);

else if (v.getId()==R.id.btnReportFormCancel) {

reportform.xml

<TextView android:id="@+id/labelReport"

android:layout_width="wrap_content" android:layout_height="wrap_content"

android:paddingTop="10dp" android:text="Your Report:"/>

<EditText android:id="@+id/entryReport"

android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@android:drawable/ editbox_background"

ReportFormActivity.java

String reportTitle =

((TextView)findViewById(R.id.entryTitle)).getText().toStrin g();

String reportText = ((TextView)findViewById(R.id.entryReport)).getText().toStri ng();

boolean reportAccepted = Reporter.submitTextReport(reportTitle, reportText);

Was this article helpful?

0 0

Post a comment