forked from organicmaps/organicmaps
Use new stings for ratings.
This commit is contained in:
parent
6477c0c76c
commit
5b4f319352
4 changed files with 22 additions and 10 deletions
|
@ -13,7 +13,7 @@
|
|||
android:layout_marginRight="@dimen/margin_medium_and_half"
|
||||
android:layout_marginTop="@dimen/margin_medium_and_half"
|
||||
android:fontFamily="@string/robotoMedium"
|
||||
android:text="Do you like maps.me?"
|
||||
android:text="@string/rating_do_like_maps"
|
||||
android:textColor="@color/text_black_title"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"/>
|
||||
|
@ -26,7 +26,7 @@
|
|||
android:layout_marginLeft="@dimen/margin_medium_and_half"
|
||||
android:layout_marginRight="@dimen/margin_medium_and_half"
|
||||
android:fontFamily="@string/robotoRegular"
|
||||
android:text="Please, tap a star to rate our app"
|
||||
android:text="@string/rating_tap_star"
|
||||
android:textColor="@color/text_black_subtitle"
|
||||
android:textSize="14sp"/>
|
||||
|
||||
|
@ -60,7 +60,7 @@
|
|||
android:fontFamily="@string/robotoRegular"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="@dimen/margin_medium"
|
||||
android:text="Send feedback"
|
||||
android:text="@string/rating_send_feedback"
|
||||
android:textColor="@color/text_black_title"
|
||||
android:visibility="gone"/>
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:padding="@dimen/margin_medium"
|
||||
android:src="@drawable/ic_direction"/>
|
||||
android:src="@drawable/ic_launcher"/>
|
||||
|
||||
<TextView
|
||||
style="@style/MwmText"
|
||||
|
@ -18,7 +18,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:padding="@dimen/margin_small"
|
||||
android:text="Enjoy app?"/>
|
||||
android:text="@string/rating_do_like_maps"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -7,7 +7,6 @@ import android.os.Bundle;
|
|||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
||||
import com.google.android.gms.plus.PlusOneButton;
|
||||
import com.mapswithme.maps.R;
|
||||
|
@ -34,9 +33,7 @@ public class GooglePlusDialogFragment extends DialogFragment
|
|||
final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
final LayoutInflater inflater = getActivity().getLayoutInflater();
|
||||
|
||||
final View root = inflater.inflate(R.layout.fragment_google_plus_dialog, null);
|
||||
builder.
|
||||
setView(root).
|
||||
builder.setView(inflater.inflate(R.layout.fragment_google_plus_dialog, null)).
|
||||
setNegativeButton(getString(R.string.remind_me_later), new DialogInterface.OnClickListener()
|
||||
{
|
||||
@Override
|
||||
|
|
|
@ -4,10 +4,13 @@ import android.app.AlertDialog;
|
|||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.text.format.DateUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
@ -15,6 +18,7 @@ import android.widget.RatingBar;
|
|||
import android.widget.TextView;
|
||||
|
||||
import com.mapswithme.maps.BuildConfig;
|
||||
import com.mapswithme.maps.MWMApplication;
|
||||
import com.mapswithme.maps.R;
|
||||
import com.mapswithme.util.Constants;
|
||||
import com.mapswithme.util.UiUtils;
|
||||
|
@ -101,8 +105,19 @@ public class RateStoreDialogFragment extends DialogFragment implements View.OnCl
|
|||
case R.id.btn__explain_bad_rating:
|
||||
dismiss();
|
||||
final Intent intent = new Intent(Intent.ACTION_SENDTO);
|
||||
final PackageInfo info;
|
||||
long installTime = 0;
|
||||
try
|
||||
{
|
||||
info = MWMApplication.get().getPackageManager().getPackageInfo(BuildConfig.APPLICATION_ID, 0);
|
||||
installTime = info.firstInstallTime;
|
||||
} catch (PackageManager.NameNotFoundException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
intent.setData(Utils.buildMailUri(Constants.Url.MAIL_MAPSME_RATING, "Rating : " + mRating,
|
||||
"Android version:" + Build.VERSION.SDK_INT + "\n" + "App version: " + BuildConfig.APPLICATION_ID + " " + BuildConfig.VERSION_NAME + "\n"));
|
||||
"OS : " + Build.VERSION.SDK_INT + "\n" + "Version : " + BuildConfig.APPLICATION_ID + " " + BuildConfig.VERSION_NAME + "\n" +
|
||||
getString(R.string.rating_user_since) + " " + DateUtils.formatDateTime(getActivity(), installTime, 0)));
|
||||
try
|
||||
{
|
||||
startActivity(intent);
|
||||
|
|
Loading…
Add table
Reference in a new issue