Shr*_*pal 8 android android-layout mpandroidchart
我想PieChart
在我的片段中显示一个.以下是我写的xml,
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background">
<LinearLayout
android:id="@+id/graphContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.github.mikephil.charting.charts.PieChart
android:id="@+id/piechart"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</ScrollView>
Run Code Online (Sandbox Code Playgroud)
问题是,PieChart
如果我给予match_parent
或,是不行的wrap_content
.如果我给出固定的高度和宽度它工作正常.此外,如果我删除它ScrollView
,它就像一个魅力!那么在什么情况下需要做ScrollView
什么?
归档时间: |
|
查看次数: |
1825 次 |
最近记录: |