dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.0.1' compile 'com.android.support:design:23.0.1' }
Note: I remind you that unit tests live in thesrc\test\<package_name>
, not insrc\androidTest\<package_name>
. It is also worth remembering that tests on JUnit 4 use the@Test
annotation instead ofextends TestCase
.
<?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools:context=".MainActivity"> <android.support.design.widget.AppBarLayout android:layout_height="wrap_content" android:layout_width="match_parent" android:theme="@style/AppTheme.AppBarOverlay"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" app:popupTheme="@style/AppTheme.PopupOverlay"/> </android.support.design.widget.AppBarLayout> <include layout="@layout/content_main"/> <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_margin="@dimen/fab_margin" android:src="@android:drawable/ic_dialog_email"/> </android.support.design.widget.CoordinatorLayout>
Note: for the full work of Theme Editor with the ability to preview, you must have an SDK Platform for API 23.You no longer need to spend the time on the necessary properties of the theme, select Primary / PrimaryDark / Accent colors - Theme Editor kindly prompts / generates the desired palette. So, PrimaryDark will be selected on the basis of Primary colors - conveniently.
dependencies { classpath 'com.android.tools.build:gradle:1.4.0-beta3' }
Warning: Imports are under development and do not support the entire SVG specification. Problem items will be listed, you will have to make edits.
res\drawable
res\drawable
. To ensure backward compatibility with pre-Lollipop devices at the time of the android gradle plugin build, it will generate * .png for all screen densities in the app\build\generated\res\pngs
Backward compatibility limitations:
minSdkVersion> = 21 (Lollipop)
- Full support for VectorDrawable API
minSdkVersion <21
- Auto-png generation instead of sml at build time
- Trimmed VectorDrawable API
- Elements
not supported
<clip-path>
<clip-path>
UsingBitmapDrawable
instead ofVectorDrawable
in Java code.Two new monitors: GPU Rendering, Network
Two new monitors are available to the developer for analyzing application performance: GPU Rendering Monitor and Network Monitor :To make the GPU Rendering monitor work, you need to enable it on a device or an emulator: Setting → Developer Options → Profile GPU rendering → In adb shell dumpsys gfxinfo
That's all, good to see that the favorite tool of Android developers is developing, thank you for your attention.
Materials used:
Android Studio Blog
Vector Drawable API. Application possibilities
Easily go to the vector image format instead of cutting under different screen densities in Android 4.0+. Part 1 of 2
Source: https://habr.com/ru/post/268143/
All Articles