diff --git a/app/src/main/java/dummydomain/yetanothercallblocker/LookupNumberActivity.java b/app/src/main/java/dummydomain/yetanothercallblocker/LookupNumberActivity.java index fa7e2e6..b991a4f 100644 --- a/app/src/main/java/dummydomain/yetanothercallblocker/LookupNumberActivity.java +++ b/app/src/main/java/dummydomain/yetanothercallblocker/LookupNumberActivity.java @@ -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(); diff --git a/app/src/main/res/layout/activity_lookup_number.xml b/app/src/main/res/layout/activity_lookup_number.xml index 2391ed3..54faaa9 100644 --- a/app/src/main/res/layout/activity_lookup_number.xml +++ b/app/src/main/res/layout/activity_lookup_number.xml @@ -62,6 +62,12 @@ android:onClick="onLoadReviewsButtonClick" android:text="@string/lookup_load_reviews" /> +