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

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

update navigationBar icon

parent 67966552
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.graphics.Color;
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.QuickContact;
import android.support.v7.widget.Toolbar;
@@ -50,6 +51,7 @@ import java.io.FileNotFoundException;
import java.util.ArrayList;

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

/**
 * Contact editor with only the most important fields displayed initially.
@@ -393,10 +395,17 @@ public class ContactEditorActivity extends AppCompatContactsActivity implements
            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);
        //this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
        //this.getWindow().setNavigationBarColor(R.color.expanding_entry_card_button_text_color);

        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
@@ -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 android.support.v4.content.ContextCompat;
@@ -69,6 +70,7 @@ import com.android.contacts.util.ViewUtil;
import java.util.ArrayList;

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 of contacts (or phone numbers or postal addresses) for the
@@ -136,7 +138,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);
        }

        //this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
        //this.getWindow().setNavigationBarColor(R.color.expanding_entry_card_button_text_color);

+10 −2
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 android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
@@ -26,6 +27,7 @@ import android.webkit.WebView;
import com.android.contacts.R;

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

/**
 * Displays the licenses for all open source libraries.
@@ -44,7 +46,13 @@ 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);
        }

        // this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
        //this.getWindow().setNavigationBarColor(R.color.expanding_entry_card_button_text_color);

+12 −1
Original line number Diff line number Diff line
@@ -113,6 +113,7 @@ 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.
@@ -1325,8 +1326,18 @@ public class PeopleActivity extends AppCompatContactsActivity implements
     * */

    private int fetchAccentColor() {
        this.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);

        //SYSTEM_UI_FLAG_LIGHT_STATUS_BAR and SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
        //this.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
        //this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);

        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);
+9 −2
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ import java.util.ArrayList;
import java.util.List;

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

/**
 * Shows a list of all available accounts, letting the user select under which account to view
@@ -94,7 +95,13 @@ public class AccountFilterActivity extends Activity implements AdapterView.OnIte
        filters.add(ContactListFilter.createFilterWithType(
                ContactListFilter.FILTER_TYPE_CUSTOM));
        mListView.setAdapter(new FilterListAdapter(this, filters, mCurrentFilterType));
        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);
        }

        // this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
        //this.getWindow().setNavigationBarColor(R.color.expanding_entry_card_button_text_color);

Loading