Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are some views located inside the legacy tab in Android Studio 3.1 and what replaces them?

I've updated my Android Studio to 3.1 stable channel. I've noticed that "All" tabs in palette window are removed and "Legacy" tab is introduced. That tab contains the following:

The new Legacy tab in AndroidStudio that contains GridLayout, ListView, TabHost, RelativeLayout and GridView

  • ListView
  • TabHost
  • RelativeLayout
  • GridView

I didn't mention the GridLayout because it's a downloadable dependency rather than a View from the Android APIs.

Which new Views have replaced the views mentioned above?

I know ConstraintLayout replaces RelativeLayout, but what replaces the ListView, the GridView or the TabHost? I want to be up-to-date.

like image 935
CodigosTutoriales Avatar asked Apr 28 '18 17:04

CodigosTutoriales


1 Answers

ListView - replaced with RecyclerView

TabHost - replaced with TabLayout

RelativeLayout - replaced with ConstraintLayout

GridView - replaced with ConstraintLayout

Mostly due to the new ones having better performance.

RecyclerView.Adapter has implemented the popular and recommended holder pattern and supports modern layout transitions. It also accepts a layout manager allowing you to easily implement a grid.

like image 154
rosghub Avatar answered Sep 20 '22 13:09

rosghub