Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fdroid] inform user of tracking #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.net.Uri;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
Expand Down Expand Up @@ -401,12 +402,22 @@ public void onClick(DialogInterface dialog, int which) {
}
};

DialogInterface.OnClickListener openExternalDialogListener = new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent openLinkExternalIntent = new Intent(Intent.ACTION_VIEW);
openLinkExternalIntent.setData(Uri.parse(WebRegisterActivity.REGISTER_URL));
startActivity(openLinkExternalIntent);
}
};

AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this,
RaraHelper.getThemeMaterialDialog(this));
dialogBuilder.setTitle(R.string.create_nation)
.setMessage(R.string.create_nation_redirect)
.setPositiveButton(R.string.create_continue, dialogListener)
.setNegativeButton(R.string.explore_negative, null)
.setNeutralButton(R.string.open_in_browser, openExternalDialogListener)
.show();
}

Expand Down
3 changes: 2 additions & 1 deletion Stately/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
<string name="password">Password</string>
<string name="log_in">Log In</string>
<string name="create_nation">Create New Nation</string>
<string name="create_nation_redirect">To create a new nation, you\'ll be redirected to the NationStates website.</string>
<string name="create_nation_redirect">To create a new nation, you\'ll be redirected to the NationStates website.\nThis website uses Google Analytics.</string>
<string name="open_in_browser">Open in browser</string>
<string name="create_continue">Continue</string>
<string name="create_finish">Type in your nation name and password to get started.</string>
<string name="create_error">Something went wrong with the create a new nation process. Please try again on the NationStates website (nationstates.net).</string>
Expand Down