android-5.1.1-lollipop
Android XML: android:elevation vs. app:elevation
Hope I can help, Let’s talk with an example: <android.support.design.widget.FloatingActionButton android:layout_height=”wrap_content” android:layout_width=”wrap_content” … android:elevation=”@dimen/elevation_medium” /> The android:elevationattribute will work from the API level 21 and upper. <android.support.design.widget.FloatingActionButton android:layout_height=”wrap_content” android:layout_width=”wrap_content” … app:elevation=”@dimen/elevation_medium” /> In this case the app:elevation attribute belongs to the FloatingActionButton styleable, inside de Android Design Support Library which will work from version 4 … Read more
Android getResources().getDrawable() deprecated API 22
You have some options to handle this deprecation the right (and future proof) way, depending on which kind of drawable you are loading: A) drawables with theme attributes ContextCompat.getDrawable(getActivity(), R.drawable.name); You’ll obtain a styled Drawable as your Activity theme instructs. This is probably what you need. B) drawables without theme attributes ResourcesCompat.getDrawable(getResources(), R.drawable.name, null); You’ll … Read more