Skip to content

Commit

Permalink
Merge pull request #1086 from Automattic/release/2.8-merge-2.7.1-hotfix
Browse files Browse the repository at this point in the history
Merge 2.7.1 hotfix in 2.8.0 with conflict resolution
  • Loading branch information
theck13 authored Jul 1, 2020
2 parents fb85f74 + 38fc206 commit 27bc829
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Simplenote/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ android {
} else {
versionName "2.8-rc-1"
}
versionCode 107
versionCode 109
minSdkVersion 23
targetSdkVersion 29

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class AboutFragment extends Fragment implements SpeedListener {
private static final String SIMPLENOTE_TWITTER_HANDLE = "simplenoteapp";
private static final String TWITTER_PROFILE_URL = "https://twitter.com/#!/";
private static final String TWITTER_APP_URI = "twitter://user?screen_name=";
private static final String URL_CALIFORNIA = "https://automattic.com/privacy/#california-consumer-privacy-act-ccpa";
private static final String URL_CONTRIBUTE = "https://github.com/Automattic/simplenote-android";
private static final String URL_PRIVACY = "https://automattic.com/privacy";
private static final String URL_TERMS = "https://simplenote.com/terms";
Expand All @@ -55,6 +56,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
View hiring = view.findViewById(R.id.about_careers);
TextView privacy = view.findViewById(R.id.about_privacy);
TextView terms = view.findViewById(R.id.about_terms);
TextView california = view.findViewById(R.id.about_california);
TextView copyright = view.findViewById(R.id.about_copyright);

String colorLink = Integer.toHexString(ContextCompat.getColor(requireContext(), R.color.blue_5) & 0xffffff);
Expand Down Expand Up @@ -165,6 +167,24 @@ public void onClick(View v) {
}
});

california.setText(Html.fromHtml(String.format(
getResources().getString(R.string.link_california),
"<u><span style=\"color:#",
colorLink,
"\">",
"</span></u>"
)));
california.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(URL_CALIFORNIA)));
} catch (Exception e) {
Toast.makeText(getActivity(), R.string.no_browser_available, Toast.LENGTH_LONG).show();
}
}
});

((SpinningImageButton) view.findViewById(R.id.about_logo)).setSpeedListener(this);
return view;
}
Expand Down
9 changes: 9 additions & 0 deletions Simplenote/src/main/res/layout/fragment_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,15 @@

</LinearLayout>

<com.automattic.simplenote.widgets.RobotoRegularTextView
android:id="@+id/about_california"
android:layout_gravity="center_horizontal"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
tools:text="Privacy Notice for California Users"
style="@style/Theme.Simplestyle.About.Link">
</com.automattic.simplenote.widgets.RobotoRegularTextView>

<com.automattic.simplenote.widgets.RobotoRegularTextView
android:id="@+id/about_copyright"
android:gravity="center_horizontal"
Expand Down
1 change: 1 addition & 0 deletions Simplenote/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
<string name="blog">Blog</string>
<string name="no_browser_available">\"Unable to open website. No browser available.\"</string>
<string name="simplenote_blog_url" translatable="false">simplenote.com/blog</string>
<string name="link_california">%1$s%2$s%3$sPrivacy Notice for California Users%4$s</string>
<string name="link_divider">&#183;</string>
<string name="link_privacy">%1$s%2$s%3$sPrivacy Policy%4$s</string>
<string name="link_terms">%1$s%2$s%3$sTerms of Service%4$s</string>
Expand Down

0 comments on commit 27bc829

Please sign in to comment.