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

Commit 1b7ae0f3 authored by Wysie's avatar Wysie
Browse files

Fixed bug with digits colors now showing properly. Also cleaned up prefs a little.

parent 317f7fad
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -29,13 +29,16 @@
        android:gravity="center_vertical"
    >
    
        
        <!--Wysie_Soh: Default width and height is 78 -->
        <!-- android:scaleType="fitCenter" -->
        <ImageView android:id="@+id/photo"
            style="?android:attr/imageWellStyle"
            android:layout_width="78dip"
            android:layout_height="78dip"
            android:layout_marginRight="7dip"
            android:layout_marginLeft="2dip"
            android:scaleType="fitCenter"
            android:scaleType="fitXY"
            android:background="@drawable/btn_contact_picture"
        />

+11 −1
Original line number Diff line number Diff line
@@ -773,6 +773,8 @@
    <string name="title_use_custom_color">Use custom digits colors</string>
    <string name="summaryon_custom_color">Supported formats: #RRGGBB or #AARRGGBB. Input the # as well.</string>
    
    <string name="title_change_digits_color">Change digits color</string>
    
    <string name="title_call_log_category">Call log</string>    
    <string name="title_cl_relative_time">Relative times</string>
    <string name="summaryon_cl_relative_time">Use relative times in call log</string>
@@ -799,6 +801,14 @@
    <string name="title_misc_category">Miscellaneous</string>
    <string name="title_sensor_rotation">Enable sensor rotation</string>
    
    <string name="title_about">About</string>
    <string name="title_about_name">Mod Name</string>
    <string name="summary_about_name">Wysie Contacts</string>
    <string name="title_about_version">Version</string>
    <string name="summary_about_version">1.93</string>
    <string name="title_about_credits">Credits</string>
    <string name="summary_about_credits">ChainsDD and the rest of XDA! :)</string>
    
    <!-- Wysie_Soh: Call log strings -->  
    <string name="alert_clear_call_log_title">Clear call log</string>
    <string name="alert_clear_call_log_message">Are you sure you want to clear all call records?</string>
+63 −40
Original line number Diff line number Diff line
@@ -37,16 +37,19 @@
            android:summaryOn="@string/summaryon_disable_num_check"
            android:summaryOff="@string/summaryoff_disable_num_check"
            android:defaultValue="false" />
        <PreferenceScreen
            android:key="dial_digits_color"
            android:title="@string/title_change_digits_color">  
                <ListPreference
            android:key="focused_digit_color"
            android:title="@string/title_digits_color_focused"
                    android:key="pressed_digit_color"
                    android:title="@string/title_digits_color_pressed"
                    android:dialogTitle="@string/title_choose_color"
                    android:entries="@array/digits_colors"
                    android:entryValues="@array/digits_colors_values"
                    android:defaultValue="-16777216" />
                <ListPreference
            android:key="pressed_digit_color"
            android:title="@string/title_digits_color_pressed"
                    android:key="focused_digit_color"
                    android:title="@string/title_digits_color_focused"
                    android:dialogTitle="@string/title_choose_color"
                    android:entries="@array/digits_colors"
                    android:entryValues="@array/digits_colors_values"
@@ -64,18 +67,19 @@
                    android:defaultValue="false"
                    android:summary="@string/summaryon_custom_color"
                    android:disableDependentsState="false" />
        <EditTextPreference
            android:key="focused_digit_color_custom"
            android:title="@string/title_digits_color_focused"
            android:dependency="dial_digit_use_custom_color" />
                <EditTextPreference
                    android:key="pressed_digit_color_custom"
                    android:title="@string/title_digits_color_pressed"
                    android:dependency="dial_digit_use_custom_color" />
                <EditTextPreference
                    android:key="focused_digit_color_custom"
                    android:title="@string/title_digits_color_focused"
                    android:dependency="dial_digit_use_custom_color" />
                <EditTextPreference
                    android:key="unselected_digit_color_custom"
                    android:title="@string/title_digits_color_unselected"
                    android:dependency="dial_digit_use_custom_color" />
        </PreferenceScreen>
    </PreferenceCategory>
    <PreferenceCategory android:title="@string/recentCallsIconLabel">
        <CheckBoxPreference
@@ -130,6 +134,25 @@
            android:key="misc_sensor_rotation"
            android:title="@string/title_sensor_rotation"
            android:defaultValue="false" />
        <PreferenceScreen
            android:key="misc_about"
            android:title="@string/title_about"> 
          <Preference
                android:key="about_name"
                android:title="@string/title_about_name"
                android:summary="@string/summary_about_name"
                android:enabled="false" />
            <Preference
                android:key="about_version"
                android:title="@string/title_about_version"
                android:summary="@string/summary_about_version"
                android:enabled="false" />
            <Preference
                android:key="about_credits"
                android:title="@string/title_about_credits"
                android:summary="@string/summary_about_credits"
                android:enabled="false" />
        </PreferenceScreen>
    </PreferenceCategory>    
    
</PreferenceScreen>
+1 −65
Original line number Diff line number Diff line
@@ -2565,73 +2565,9 @@ public final class EditContactActivity extends Activity implements View.OnClickL

            builder.setMultiChoiceItems(groupsCharSeq, checkedValues,
                    confirmGroupSelectionListener);  
        
        // If selected groups already has something inside, we use it
        /*
        if (selectedGroups.size() > 0) {

            groupsCharSeq = groups.toArray(
                    new CharSequence[groups.size()]);

            checkedValues = new boolean[groups.size()];

            for (boolean b : checkedValues) {
                b = false;
            }

            for (int i = 0; i < selectedGroups.size(); i++) {
                int j = groups.indexOf(selectedGroups.get(i));

                if (j != -1) {
                    checkedValues[j] = true;
                }
            }            

            builder.setMultiChoiceItems(groupsCharSeq, checkedValues,
                    confirmGroupSelectionListener); 
        } else {
            Cursor cursor = mResolver.query(Groups.CONTENT_URI, GROUPS_PROJECTION, null,
                    null, Groups.DEFAULT_SORT_ORDER);
            try {
                if (cursor.moveToFirst()) {
                    while (cursor.moveToNext()) {            
                        String name = cursor.getString(
                                cursor.getColumnIndex(Groups.NAME));

                        groups.add(name);                
                    }
                }

                groupsCharSeq = groups.toArray(new CharSequence[groups.size()]);                

                checkedValues = new boolean[groups.size()];

                for (boolean b : checkedValues) {
                    b = false;
                }
                
                if (!(mState == STATE_INSERT)) {

                    for (int i = 0; i < currentMembership.size(); i++) {
                      int j = groups.indexOf(currentMembership.get(i));

                        if (j != -1) {
                            checkedValues[j] = true;
                            selectedGroups.add(groups.get(j));
                        }
                    }
                }
            } finally {
                cursor.close();
            }

            builder.setMultiChoiceItems(groupsCharSeq, checkedValues,
                    confirmGroupSelectionListener);           

        }
        */
    }
    
    //Wysie_Soh: Load person's current membership into currentMembership ArrayList    
    private void loadCurrentMembership() {
        if (!(mState == STATE_INSERT)) {
            long personId = ContentUris.parseId(mUri);
+4 −4
Original line number Diff line number Diff line
@@ -1151,8 +1151,8 @@ public class TwelveKeyDialer extends Activity implements View.OnClickListener,
    }
    
    private void setDigitsColor() {
        int colorFocused = -16777216;
        int colorPressed = -16777216;
        int colorFocused = -16777216;
        int colorUnselected = -1;
        
        if (prefs.getBoolean("dial_digit_use_custom_color", false)) {
@@ -1173,11 +1173,11 @@ public class TwelveKeyDialer extends Activity implements View.OnClickListener,
    
        mDigits.setTextColor(new ColorStateList(
                     new int[][] {
                             new int[] { android.R.attr.state_focused },
                             new int[] { android.R.attr.state_pressed },
                             new int[] { android.R.attr.state_focused },
                             new int[0]},
                     
                             new int[] { colorFocused, colorPressed, colorUnselected }
                             new int[] { colorPressed, colorFocused, colorUnselected }
                     ));
        mDigits.setCursorVisible(false);
    }