Button to add review from lookup screen
This commit is contained in:
parent
cd4d0b7cf5
commit
1beb277d3e
|
@ -5,6 +5,8 @@ import android.content.ClipData;
|
|||
import android.content.ClipDescription;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
|
@ -109,6 +111,13 @@ public class LookupNumberActivity extends AppCompatActivity {
|
|||
ReviewsActivity.startForNumber(this, getPureNumber());
|
||||
}
|
||||
|
||||
public void onAddReviewButtonClick(View view) {
|
||||
if (isWrongNumberInput()) return;
|
||||
|
||||
Uri uri = Uri.parse(YacbHolder.getWebService().getWebReviewsUrlPart() + getPureNumber());
|
||||
IntentHelper.startActivity(this, new Intent(Intent.ACTION_VIEW, uri));
|
||||
}
|
||||
|
||||
public void onClearNumberButtonClick(View view) {
|
||||
phoneNumberInput.setText("");
|
||||
clearOutput();
|
||||
|
|
|
@ -62,6 +62,12 @@
|
|||
android:onClick="onLoadReviewsButtonClick"
|
||||
android:text="@string/lookup_load_reviews" />
|
||||
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="onAddReviewButtonClick"
|
||||
android:text="@string/add_web_review" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/reviews_phone_number"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
Loading…
Reference in New Issue