How to make Beautiful & Stylish apps like Timely

They did a presentation in which they explain how they calculate the view colors, the problems they had with that and a few other useful tips. The video for the presentation is available on their YouTube channel The number morphing is fairly simple and explained in this article and you can find the complete View … Read more

Android how to get AppCompat.Translucent type theme with support actionbar?

You can create a new set of styles to use which have the same properties as Theme.Translucent from themes.xml. Add the following to your styles.xml file: <style name=”Theme.AppCompat.Translucent”> <item name=”android:windowNoTitle”>true</item> <item name=”android:windowBackground”>@android:color/transparent</item> <item name=”android:colorBackgroundCacheHint”>@null</item> <item name=”android:windowIsTranslucent”>true</item> <item name=”android:windowAnimationStyle”>@android:style/Animation</item> </style> You can change the prefix Theme.AppCompat to something else if you want to inherit other things … Read more

ResourcesCompat.getDrawable() vs AppCompatResources.getDrawable()

Here is my understanding after some testing: ContextCompat.getDrawable(@NonNull Context context, @DrawableRes int resId) ResourcesCompat.getDrawable(@NonNull Resources res, @DrawableRes int id, @Nullable Theme theme) AppCompatResources.getDrawable(@NonNull Context context, @DrawableRes int resId) VectorDrawableCompat.create(@NonNull Resources res, @DrawableRes int resId, @Nullable Theme theme The first thing I see is VectorDrawableCompat and ResourcesCompat can specify a theme. I) Without using AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); in … Read more

How to change default text color using custom theme?

In your Manifest you need to reference the name of the style that has the text color item inside it. Right now you are just referencing an empty style. So in your theme.xml do only this style: <style name=”Theme” parent=”@android:style/TextAppearance”> <item name=”android:textColor”>#ffffffff</item> </style> And keep you reference to in the Manifest the same (android:theme=”@style/Theme”) EDIT: … Read more

How to change the background color of Action Bar’s Option Menu in Android 4.2?

In case people are still visiting for a working solution, here is what worked for me:– This is for Appcompat support library. This is in continuation to ActionBar styling explained here Following is the styles.xml file. <resources> <!– Base application theme. –> <style name=”AppTheme” parent=”Theme.AppCompat.Light”> <!– This is the styling for action bar –> <item … Read more

What are the default color values for the Holo theme on Android 4.0?

If you want the default colors of Android ICS, you just have to go to your Android SDK and look for this path: platforms\android-15\data\res\values\colors.xml. Here you go: <!– For holo theme –> <drawable name=”screen_background_holo_light”>#fff3f3f3</drawable> <drawable name=”screen_background_holo_dark”>#ff000000</drawable> <color name=”background_holo_dark”>#ff000000</color> <color name=”background_holo_light”>#fff3f3f3</color> <color name=”bright_foreground_holo_dark”>@android:color/background_holo_light</color> <color name=”bright_foreground_holo_light”>@android:color/background_holo_dark</color> <color name=”bright_foreground_disabled_holo_dark”>#ff4c4c4c</color> <color name=”bright_foreground_disabled_holo_light”>#ffb2b2b2</color> <color name=”bright_foreground_inverse_holo_dark”>@android:color/bright_foreground_holo_light</color> <color name=”bright_foreground_inverse_holo_light”>@android:color/bright_foreground_holo_dark</color> <color name=”dim_foreground_holo_dark”>#bebebe</color> <color … Read more

How to switch themes (night mode) without restarting the activity?

@Alexander Hanssen’s answer basically has answered this… Don’t know why it was not accepted… Maybe because of the finish()/startActivity(). I voted for it and I tried to comment but cannot… Anyway, I would do exactly what he described in terms of styles. <style name=”AppThemeLight” parent=”Theme.AppCompat.Light”> <!– Customize your theme here. –> <item name=”android:windowAnimationStyle”>@style/WindowAnimationTransition</item> </style> <style … Read more

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