Skip to content

Commit

Permalink
Housekeeping and grammar fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Timothy Langer <[email protected]>
  • Loading branch information
zeevox committed Feb 21, 2023
1 parent 4fb4cc9 commit bca3d09
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions app/src/main/java/com/zeevox/octo/core/Ocquarium.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static void start(
final float dp = resources.getDisplayMetrics().density;

// Set the background to be the gradient with user defined colors
// See bgGradient(ContextWrapper, Resources) for more info about this
// See bgGradient(ContextWrapper, Resources) for more information about this
window.setBackgroundDrawable(bgGradient(context, resources));

// Hide the navigation bar if set by the user
Expand Down Expand Up @@ -89,8 +89,8 @@ public static void start(

/* START Settings button */
if (showSettingsButton) {
ImageButton mImageButton = new ImageButton(context);
mImageButton =
new ImageButton(context);
ImageButton mImageButton =
(ImageButton)
LayoutInflater.from(context).inflate(R.layout.ocquarium_settings_button, bg, false);
// Set a transparent icon if user set in preferences
Expand Down Expand Up @@ -155,7 +155,7 @@ public static GradientDrawable bgGradient(ContextWrapper context, Resources reso
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
// Recreate octo_bg.xml programmatically
GradientDrawable backgroundGradient = new GradientDrawable();
// Set the background colors / fetch them from the preferences menu
// Set the background colors / fetch them from the user's preferences
backgroundGradient.setColors(
new int[] {
preferences.getInt(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public int getOpacity() {
return PixelFormat.TRANSLUCENT;
}

private class Link // he come to town
private class Link // he comes to town
implements DynamicAnimation.OnAnimationUpdateListener {

final FloatValueHolder[] coords = new FloatValueHolder[2];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
/**
* A {@link PreferenceActivity} that presents a set of application settings. On handset devices,
* settings are presented as a single list. On tablets, settings are split by category, with
* category headers shown to the left of the list of settings.
* category headers shown in a panel on the left.
*
* <p>See <a href="http://developer.android.com/design/patterns/settings.html">Android Design:
* Settings</a> for design guidelines and the <a
Expand Down Expand Up @@ -131,7 +131,7 @@ protected void onCreate(Bundle savedInstanceState) {
}

@Override
public boolean onPreferenceStartScreen(PreferenceFragmentCompat caller, PreferenceScreen pref) {
public boolean onPreferenceStartScreen(@NonNull PreferenceFragmentCompat caller, PreferenceScreen pref) {
Bundle args = new Bundle();
args.putString(PreferenceFragmentCompat.ARG_PREFERENCE_ROOT, pref.getKey());

Expand All @@ -143,7 +143,7 @@ public boolean onPreferenceStartScreen(PreferenceFragmentCompat caller, Preferen
}

@Override
public boolean onPreferenceStartFragment(PreferenceFragmentCompat caller, Preference pref) {
public boolean onPreferenceStartFragment(@NonNull PreferenceFragmentCompat caller, Preference pref) {
if (!isValidFragment(pref.getFragment())) return false;
Fragment fragment = Fragment.instantiate(this, pref.getFragment(), pref.getExtras());
fragment.setTargetFragment(caller, 0);
Expand Down Expand Up @@ -315,7 +315,7 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
.setOnPreferenceClickListener(
new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
public boolean onPreferenceClick(@NonNull Preference preference) {
final String[][] randomGradientDetails = {
ColorUtils.getGradientDetails(getRandomInt(ColorUtils.gradients.size()))
};
Expand Down Expand Up @@ -356,7 +356,7 @@ private int getRandomInt(int max) {
}

@Override
public void onDisplayPreferenceDialog(Preference preference) {
public void onDisplayPreferenceDialog(@NonNull Preference preference) {
if (preference instanceof ColorPreference) {
((ColorPreference) preference).showDialog(this, 0);
} else super.onDisplayPreferenceDialog(preference);
Expand All @@ -382,7 +382,7 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
}

@Override
public boolean onPreferenceStartFragment(PreferenceFragmentCompat caller, Preference pref) {
public boolean onPreferenceStartFragment(@NonNull PreferenceFragmentCompat caller, Preference pref) {
if (pref.getFragment().equals(OctopusFragmentV2.class.getName())) {
Fragment fragment = Fragment.instantiate(caller.getActivity(), pref.getFragment(), pref.getExtras());
fragment.setTargetFragment(caller, 0);
Expand Down Expand Up @@ -544,7 +544,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
Integer.parseInt(preferences.getString("octopus_average_size", "110"));

// Set the background to be the gradient with user defined colors
// See bgGradient(ContextWrapper, Resources) for more info about this
// See bgGradient(ContextWrapper, Resources) for more information about this
requireView()
.findViewById(R.id.prefs_octopus_bg)
.setBackground(Ocquarium.bgGradient(getActivity(), getResources()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void onSurfaceCreated(SurfaceHolder holder) {
protected abstract void drawFrame();

protected void iteration() {
// Reschedule the next redraw in 40ms
// Reschedule the next redrawing in 40ms
mHandler.removeCallbacks(mIteration);
if (mVisible) {
mHandler.postDelayed(mIteration, 1000 / 25);
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/pref_octopus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
android:paddingEnd="16dp"
android:paddingBottom="48dp"
android:orientation="vertical">
<!-- Higher bottom padding so user doesn't tap navbar instead of seekbar accidentally -->
<!-- Higher bottom padding so that the user does not tap navbar instead of seekbar accidentally -->

<TextView
android:layout_width="match_parent"
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<string name="about_action_alpha">Test alpha builds</string>
<string name="about_action_email">Send an email</string>
<string name="about_action_email_error">There are no email clients installed.</string>
<string name="about_action_email_text">Hello there, I\'d like to…</string>
<string name="about_action_email_text">To the Ocquarium developers,\n\n</string>
<string name="about_action_email_title">Ocquarium question</string>
<string name="about_action_g_play">Write a review</string>
<string name="about_action_github">View source code</string>
Expand Down Expand Up @@ -122,7 +122,7 @@
<string name="prefs_restarting_wallpaper">Restarting live wallpaper…</string>
<string name="prefs_screensaver_enable_touch_summary">Allow moving the octopus by touch during screensaver mode</string>
<string name="prefs_screensaver_enable_touch_title">Enable touch</string>
<string name="prefs_screensaver_error">Your device doesn\'t support setting a screensaver, sorry.</string>
<string name="prefs_screensaver_error">Unfortunately, our device does not support setting a screensaver.</string>
<string name="prefs_set_live_wall_summary">Click me to set Ocquarium as your live wallpaper.</string>
<string name="prefs_set_live_wall_title">Set live wallpaper</string>
<string name="prefs_set_screensaver_summary">Click me to set Ocquarium as your device\'s screensaver.</string>
Expand All @@ -131,7 +131,7 @@
<string name="prefs_show_navigation_bar_title">Show system navbar</string>
<string name="prefs_show_platlogo_summary">Display the Android Oreo logo before the octopus.</string>
<string name="prefs_show_platlogo_title">Show platform logo</string>
<string name="prefs_uigradients_dialog_description">Apply gradient called %s?\n\nIf you would like to try a different gradient, press cancel and select \"Random gradient\" again.</string>
<string name="prefs_uigradients_dialog_description">Apply gradient called %s?\n\nIf you would like to try a different gradient, press \"cancel\" and select \"Random gradient\" again.</string>
<string name="prefs_uigradients_dialog_title">Random gradient</string>
<string name="prefs_uigradients_summary">Random gradient</string>
<string name="prefs_uigradients_title">Pick a random set of colors from uigradients.com</string>
Expand Down

0 comments on commit bca3d09

Please sign in to comment.