Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 434a476f authored by Pedlar's avatar Pedlar Committed by Steve Kondik
Browse files

Added a Toast message to let you know when you reached the max buttons

parent af2d8ad6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -359,6 +359,7 @@
    <string name="pref_ring_mode_summary">Scegli le modalità del tasto per l\'audio</string>
    <string name="pref_flash_mode_title">Mod. Torcia</string>
    <string name="pref_flash_mode_summary">Scegli tra Normal e High / Death Ray(Evo)</string>
    <string name="widget_max_buttons">6 è il numero massimo di tasti.</string>



+1 −0
Original line number Diff line number Diff line
@@ -367,6 +367,7 @@
    <string name="pref_ring_mode_summary">Choose how the sound button changes modes</string>
    <string name="pref_flash_mode_title">Flash mode</string>
    <string name="pref_flash_mode_summary">Choose High / Death Ray(Evo)</string>
    <string name="widget_max_buttons">6 is the max amount of buttons.</string>


    <!-- Performance : Lock home memory -->
+2 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ import android.preference.PreferenceCategory;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.PreferenceScreen;
import android.provider.Settings;
import android.widget.Toast;
import android.util.Log;

import java.util.ArrayList;
@@ -123,6 +124,7 @@ public class WidgetActivity extends PreferenceActivity implements OnPreferenceCh
        List<String> sList = getList();
        if(add) {
            if(sList.size() >= 6) {
                Toast.makeText(this, R.string.widget_max_buttons, Toast.LENGTH_LONG).show();
                return false;
            }
            sList.add(toggle);