I'm coding a little Android application for myself. And now I struggle with weights. If I use the code show down below my application shows nothing. But If I use for example 230dp it works perfectly. What I'm doing wrong with the weights. Can you help me out?
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/swipe_refresh_layout_history"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="vertical"
android:id="@+id/linearLayoutHistory"
android:weightSum="100">
<com.github.mikephil.charting.charts.BarChart
android:id="@+id/chart"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="@dimen/activity_left_margin"
android:layout_weight="50"/>
<com.github.mikephil.charting.charts.BarChart
android:id="@+id/weekdayChart"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="@dimen/activity_left_margin"
android:layout_weight="50"/>
</LinearLayout>
</ScrollView>
</android.support.v4.widget.SwipeRefreshLayout>