New activity snippet template for Android Studio 1.4

Since many months, as an Android developer, I use the Activity-Fragment template to implement Activity. But it looks like Google decided to change the template (again).

A few days ago I upgraded Android Studio to version v1.4 beta 4. I noticed a new template for creating activity. When I tried to create a new activity from new-> Activity, I could not find "New activity with an empty fragment." Instead, two new options have appeared: "Empty Activity" and "Blank Activity". enter image description here I selected Blank Activity and added the following files.

  • MainActivity.java (activity class) mainActivity.java file
  • activity_main.xml (activity layout) activity_main.xml file
  • content_main.xml (activity content included by activtiy_main.xml) content_main.xml file

So my question is: what is the new development pattern that an Android developer should follow?

---- EDIT ---- How to use the previous Activity-Fragment template In order to return the "Fragment" to the image, you need to select "use fragment" in the dialog box that appears after selecting "Empty action", enter image description here

+5
source share

Source: https://habr.com/ru/post/1231990/


All Articles