onPrepareActionMode not called when creating ActionMode

I have created a demo and its working fine,onPrepareActionMode gets called each time the action mode is shown. Always called after onCreateActionMode, but may be called multiple times if the mode is invalidated. [ I request any one to make a small edit. I need status bar color same as that of toolbar but dynamically, … Read more

InflateException with FloatingActionButton from Official Design Library

com.android.support:appcompat-v7:21+ added support for tinting widgets on devices running pre android 5.1 (API Level 21). To make use of it make sure you extend or set the AppCompat Theme and use app:backgroundTint instead of android:backgroundTint. Example: <android.support.design.widget.FloatingActionButton xmlns:app=”http://schemas.android.com/apk/res-auto” android:id=”@+id/fab” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_margin=”16dp” android:src=”https://stackoverflow.com/questions/30870443/@drawable/icon” app:backgroundTint=”@color/accent” app:borderWidth=”0dp” />

Cannot resolve symbol AppCompatActivity – Support v7 libraries aren’t recognized?

For me, Even after upgrading to appcompat-v7:22.1.0, in which AppCompatActivty is added, the problem was not resolved for me, Android Studio was giving same problem Cannot resolve symbol ‘AppCompatActivity’ Sometimes clearing the android studio caches help. In android studio I just cleared the caches and restarted with the following option– File->Invalidate Caches/Restart

Android Lollipop, AppCompat ActionBar custom view doesn’t take up whole screen width

Looks like this is caused by the latest changes to the ActionBar in the recent appcompat-v7 update. It seems like that there are significant changes to how you should handle action bars. I faced the same issue and after reading the ActionBar documentation, and especially the following quote I found a solution. Beginning with Android … Read more

Android transparent status bar and actionbar

I’m developing an app that needs to look similar in all devices with >= API14 when it comes to actionbar and statusbar customization. I’ve finally found a solution and since it took a bit of my time I’ll share it to save some of yours. We start by using an appcompat-21 dependency. Transparent Actionbar: values/styles.xml: … Read more

How to implement DrawerArrowToggle from Android appcompat v7 21 library

First, you should know now the android.support.v4.app.ActionBarDrawerToggle is deprecated. You must replace that with android.support.v7.app.ActionBarDrawerToggle. Here is my example and I use the new Toolbar to replace the ActionBar. MainActivity.java public class MainActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Toolbar mToolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(mToolbar); DrawerLayout mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); … Read more

Change Toolbar color in Appcompat 21

again this is all in the link you supplied to change the text to white all you have to do is change the theme. use this theme <android.support.v7.widget.Toolbar xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” android:id=”@+id/activity_my_toolbar” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:minHeight=”?attr/actionBarSize” android:background=”?attr/colorPrimary” app:theme=”@style/ThemeOverlay.AppCompat.Dark.ActionBar” app:popupTheme=”@style/ThemeOverlay.AppCompat.Light”/>

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