Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
314 views
in Technique[技术] by (71.8m points)

Why are some views 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.

question from:https://stackoverflow.com/questions/50079026/why-are-some-views-inside-the-legacy-tab-in-android-studio-3-1-and-what-replaces

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...