Profile cover photo
Profile photo
Nicolas Roard
12,914 followers -
When I'm not working on Android, I enjoy taking pictures...
When I'm not working on Android, I enjoy taking pictures...

12,914 followers
About
Nicolas Roard's interests
View all
Nicolas Roard's posts

Post has shared content
An interesting introduction talk about #ConstraintLayout  
I will be giving a talk on the new ConstraintLayout that was announced at I/O

Post has attachment
Preview 3 of Android Studio 2.2 is out! Many new cool things, like a demo of the Espresso Test Recorder, a new photoshop file loader (and you can convert them to VectorDrawable!), and many, many bug fixes.

Regarding the layout editor and #ConstraintLayout  (which itself got bumped to alpha 3), DataBindings should now work correctly in the editor, and in general mixed layouts (a ConstraintLayout containing a LinearLayout for example) should work better. A new pan & zoom widget is also available in the inspector :)

Go check it out, and don't forget to file bugs (http://b.android.com under Tools-Studio, or simply use the Help->Submit Feedback) and give us feedback!

Post has shared content
ADB 50: Constraint Layout

In this week's gripping podcast installment, +Tor Norbye and I are joined by +Romain Guy, +John Hoford, and +Nicolas Roard to talk about the new layout and visual layout editor that they've all been working on (announced at Google I/O).

http://androidbackstage.blogspot.com/2016/06/episode-50-constraint-layout.html

Post has shared content
We always strive for staying up to date.

ConstraintLayout was announced at Google IO less than two weeks ago. We put together some of its nicest features & we ran a few performance tests as well. What did we find? Check out our post!

#ConstraintLayout   #Android   #WanariLeaks  

Post has shared content
First Impressions of Android's New Constraint Layout

After Google IO, the Android GDE team got together to gather our thoughts about the most significant announcements from the conference…

https://medium.com/google-developer-experts/first-impressions-of-androids-new-constraintlayout-c6d081b2bc2a?source=rss----a67bd6fa7d58---4

#gde #android #blogpost  

Post has attachment
One of the interesting thing we can build on top of #ConstraintLayout  are virtual helper objects -- elements that will be present in the UI builder to help you create the UI layout you want, but do not have to appear later on in the view hierarchy: their role is limited to creating the right constraints.

We have many, many ideas of helpers we will expose in future versions, but we did include at least one in the current alpha2: Guidelines.

(on that note, do remember to update your Android Studio 2.2 preview from the canary, and to constraintlayout alpha 2 -- new versions appear regularly! http://tools.android.com/download/studio/canary/latest).

You can create horizontal or vertical guidelines on the root ConstraintLayout element, and those can be positioned either relatively to one side (left/top/right/bottom) on a fixed distance, or as a percentage of the side they belong to. Once created, simply attach elements to them, and that's all you have to do.

As often with ConstraintLayout, there are more than one way to position elements. Guidelines are not a necessity, but simply provides another way of expressing your layout intent, and can makes things a lot more understandable -- remember, what we really are setting up in a ConstraintLayout is the flow of relations between all the elements.

#Android   #androiddev   #ConstraintLayout   #AndroidStudio  
Animated Photo

Post has attachment
Android Studio 2.2 preview 2 is out! go grab it :)

Tons of bugfixes since last week's preview 1 -- if you want to test ConstraintLayout and the new editor I highly recommend you to test preview 2 :)

http://tools.android.com/recent/androidstudio22preview2available

As always, please report bugs on http://b.android.com under the Tools-Studio component.

#Android   #AndroidDev   #AndroidStudio   #ConstraintLayout  

Post has shared content

Animating ConstraintLayout

I had a few questions over the weekend about if, and how, you could animate layout changes when using ConstraintLayout. The thing to remember here is that ConstraintLayout is simply another ViewGroup -- as such, you can use all that is already available in the android framework to do animation (thanks +Chet Haase !)

So, if you simply want to animate when an object is added or marked as gone, the easiest thing is to add the following attribute to your ConstraintLayout object:

android:animateLayoutChanges="true"

Now, if you want to animate layout changes, where for example you add a constraint to an object, you can simply use TransitionManager to do that:

final ViewGroup layout = (ViewGroup) findViewById(R.id.constraintLayout);
final Scene scene = new Scene(layout);
final Button buttonA = (Button) findViewById(R.id.buttonA);
final Button buttonB = (Button) findViewById(R.id.buttonB);

buttonA.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) buttonB.getLayoutParams();
params.bottomToBottom = layout.getId();
buttonB.setLayoutParams(params);
// animate changes
TransitionManager.go(scene);
}
});

And voila! That’s all that is necessary.

#Android   #ConstraintLayout  

Post has shared content
For Android developers, I'd like to especially point out this I/O video as one to watch. It covers some of the significant changes we have been making to platform behavior to improve battery life, changes which impact all apps.

We did a lot of the outreach to apps back in Marshmallow when doze was first introduces (since it is a rare case where it impacts all apps, not just ones that target a new platform version); however, with doze light in N, it is even more important that apps follow those recommendations so they continue to work correctly. We had to make the initial doze behavior in Marshmallow fairly conservative to mitigate its impact on existing apps... but now that we've had it out there and worked with developers to update their apps, we can start tightening the screws down. :)

The presentation also gives a preview of some significant behavior changes we plan on making to the platform in a future release, related to broadcast receivers and services. This is I think the largest application model change we have ever made to the platform, so it is well worth taking a look at it now so you can prepare for when it hits. Unlike doze, we plan (at least for now) on this being something that doesn't apply to existing apps, only apps that target the newer platform version. (And many changes you make today to have your app compatible with these future restrictions will also have a positive impact for our users on current devices!)
Wait while more posts are being loaded