How to set custom ActionBar color / style?

You can define the color of the ActionBar (and other stuff) by creating a custom Style: Simply edit the res/values/styles.xml file of your Android project. For example like this: <resources> <style name=”MyCustomTheme” parent=”@android:style/Theme.Holo.Light”> <item name=”android:actionBarStyle”>@style/MyActionBarTheme</item> </style> <style name=”MyActionBarTheme” parent=”@android:style/Widget.Holo.Light.ActionBar”> <item name=”android:background”>ANY_HEX_COLOR_CODE</item> </style> </resources> Then set “MyCustomTheme” as the Theme of your Activity that contains the … Read more

How do I programmatically set the background color gradient on a Custom Title Bar?

To do this in code, you create a GradientDrawable. The only chance to set the angle and color is in the constructor. If you want to change the color or angle, just create a new GradientDrawable and set it as the background View layout = findViewById(R.id.mainlayout); GradientDrawable gd = new GradientDrawable( GradientDrawable.Orientation.TOP_BOTTOM, new int[] {0xFF616261,0xFF131313}); … Read more

div background color, to change onhover

The “a:hover” literally tells the browser to change the properties for the <a>-tag, when the mouse is hovered over it. What you perhaps meant was “the div:hover” instead, which would trigger when the div was chosen. Just to make sure, if you want to change only one particular div, give it an id (“<div id=’something’>“) … Read more

sendMessage from extension background or popup to content script doesn’t work

In your background page you should call chrome.tabs.query({active: true, currentWindow: true}, function(tabs){ chrome.tabs.sendMessage(tabs[0].id, {action: “open_dialog_box”}, function(response) {}); }); instead of using chrome.extension.sendMessage as you currently do. The chrome.tabs variant sends messages to content scripts, whereas the chrome.extension function sends messages to all other extension components.

Transparent background on CardView – Android

Setup your CardView to use the cardBackgroundColor attribute to remove color and cardElevation attribute to remove the drop shadow. For example: <android.support.v7.widget.CardView xmlns:card_view=”http://schemas.android.com/apk/res-auto” xmlns:android=”http://schemas.android.com/apk/res/android” android:id=”@+id/myCardView” android:layout_width=”match_parent” android:layout_height=”match_parent” card_view:cardBackgroundColor=”@android:color/transparent” card_view:cardElevation=”0dp”> For a full list of supported attributes see here: https://developer.android.com/reference/android/support/v7/widget/CardView.html If you are using an older API, you will need to call these two functions on … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)