Unable to see completed view layout in Android Studio

前端 未结 15 1592
不思量自难忘°
不思量自难忘° 2020-12-12 14:37

I am creating a vertical LinearLayout that will be displayed in a vertical ScrollView. I can\'t find a way in Android Studio to see the portion of the LinearLayout that is

15条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-12 15:06

    Update: Now you can scroll a ScrollView directly inside preview panel (I tested on Android studio version 2.3.2)

    Short answer: Right click on your ScrollView and select Refactor > Extract > Layout.

    Android-studio will extract your ScrollView into a new layout file and put tools:showIn="@layout/original_layout_file" attribute at root layout(your ScrollView).

    Note: Android-studio will preview full layout if root layout is ScrollView.

提交回复
热议问题