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

Commit 89051231 authored by narinder Rana's avatar narinder Rana
Browse files

update navigation bar icon color, drawer select item

parent abc0284e
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.content.ComponentName;
import android.content.ContentValues;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.ContactsContract.QuickContact;
import androidx.appcompat.widget.Toolbar;
@@ -49,6 +50,8 @@ import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;

import static android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS;


/**
 * Contact editor with only the most important fields displayed initially.
@@ -383,7 +386,13 @@ public class ContactEditorActivity extends AppCompatContactsActivity implements
        if (Intent.ACTION_INSERT.equals(action)) {
            DynamicShortcuts.reportShortcutUsed(this, DynamicShortcuts.SHORTCUT_ADD_CONTACT);
        }
        this.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
      //  this.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
        if(Build.VERSION.SDK_INT >= 27) {
            this.getWindow().getDecorView().setSystemUiVisibility(FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS |
                    View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR |
                    View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
        }


    }

+11 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.content.Intent;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.ContactsContract.Contacts;
import androidx.core.content.ContextCompat;
@@ -67,6 +68,8 @@ import com.android.contacts.util.ViewUtil;

import java.util.ArrayList;

import static android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS;

/**
 * Displays a list of contacts (or phone numbers or postal addresses) for the
 * purposes of selecting one.
@@ -133,7 +136,14 @@ public class ContactSelectionActivity extends AppCompatContactsActivity implemen
        prepareSearchViewAndActionBar(savedState);
        configureActivityTitle();

        this.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
       // this.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);

        if(Build.VERSION.SDK_INT >= 27) {
            this.getWindow().getDecorView().setSystemUiVisibility(FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS |
                    View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR |
                    View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
        }

    }

    public boolean isSelectionMode() {
+11 −1
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 */
package com.android.contacts.activities;

import android.os.Build;
import android.os.Bundle;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
@@ -24,6 +25,8 @@ import android.webkit.WebView;

import com.android.contacts.R;

import static android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS;

/**
 * Displays the licenses for all open source libraries.
 */
@@ -41,7 +44,14 @@ public class LicenseActivity extends AppCompatActivity {
        if (actionBar != null) {
            actionBar.setDisplayOptions(ActionBar.DISPLAY_HOME_AS_UP, ActionBar.DISPLAY_HOME_AS_UP);
        }
        this.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
        //this.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);

        if(Build.VERSION.SDK_INT >= 27) {
            this.getWindow().getDecorView().setSystemUiVisibility(FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS |
                    View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR |
                    View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
        }

    }

    @Override
+10 −1
Original line number Diff line number Diff line
@@ -110,6 +110,8 @@ import com.google.common.util.concurrent.Futures;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import static android.view.View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
import static android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS;

/**
 * Displays a list to browse contacts.
@@ -1320,7 +1322,14 @@ public class PeopleActivity extends AppCompatContactsActivity implements

    private int fetchAccentColor() {

        this.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
       // this.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);

        if(Build.VERSION.SDK_INT >= 27) {
            this.getWindow().getDecorView().setSystemUiVisibility(FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS |
                    View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR |
                    View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
        }

        int color=getResources().getColor(R.color.accent);

        color_default_primary_text=getResources().getColor(R.color.color_default_primary_text);
+2 −0
Original line number Diff line number Diff line
@@ -403,9 +403,11 @@ public class DrawerAdapter extends BaseAdapter {
        if (activated) {
            imageView.setColorFilter(ACCENT_COLOR,
                    PorterDuff.Mode.SRC_ATOP);
            textView.setTextColor(ACCENT_COLOR);
        } else {
            imageView.clearColorFilter();
        }

    }

    private void notifyChangeAndRebuildList() {
Loading