<RelativeLayout>
<android.support.v7.widget.CardView>
.
.//this card view is showing
.
</android.support.v7.widget.CardView>
<ScrollView>
<RelativeLayout>
<android.support.v7.widget.CardView>
.
.//this card view is not showing
.
</android.support.v7.widget.CardView>
<android.support.v7.widget.RecyclerView>
//data is previewing but not scrolling
</android.support.v7.widget.RecyclerView>
</RelativeLayout>
</ScrollView>
</RelativeLayout>
Но если я поместил второй вид карты вне прокрутки, чем он отображает. Я не понял, в чем проблема. Большое спасибо, если кто-то может помочь.Вид карты не отображается, а также scrollview не работает
Решение Я попробовал: -
использование nestedscrollview вместо зрения прокрутки.
Если формат вопроса или стиль не соответствуют рекомендациям переполнения стека, сообщите мне, чтобы в будущем я задал вопросы лучше. Вместо того, чтобы голосовать.
EDIT:
Полная XML файла:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView
android:id="@+id/goal_status_card"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:textAppearance="@style/Base.TextAppearance.AppCompat.Large"
android:id="@+id/goal_name"
android:textAlignment="center"
android:text="Blood Pressure"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_marginTop="@dimen/activity_horizontal_margin"
android:weightSum="3"
android:orientation="horizontal"
android:id="@+id/goal_brief"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<customView.timeline_segement
android:layout_weight="1"
android:layout_width="100dp"
android:layout_height="wrap_content">
</customView.timeline_segement>
<customView.timeline_segement
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</customView.timeline_segement>
<customView.timeline_segement
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</customView.timeline_segement>
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
<ScrollView
android:fillViewport="true"
android:layout_below="@+id/goal_status_card"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView
android:layout_margin="@dimen/activity_horizontal_margin"
android:id="@+id/goal_card_team"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:text="Your Care Team"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:weightSum="3"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_weight="1.5"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/doctor_photo"
android:layout_width="wrap_content"
android:layout_height="60dp" />
<TextView
android:textAlignment="center"
android:id="@+id/doctor_name"
android:text="Dr Ankur"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<ImageView
android:src="@drawable/applozic_ic_action_add"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<LinearLayout
android:orientation="vertical"
android:layout_weight="1.6"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/care_manager_photo"
android:layout_width="wrap_content"
android:layout_height="60dp" />
<TextView
android:textAlignment="center"
android:id="@+id/care_manager_name"
android:text="Cm Ankit"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.RecyclerView
android:layout_below="@+id/goal_card_team"
android:id="@+id/action_list"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</android.support.v7.widget.RecyclerView>
</RelativeLayout>
</ScrollView>
Любой человек может помочь мне с этим ??
В вашем стартовом коде исправить этот '<Относительный макет>' к этому '' у вас есть место между 'Relative' и' Layout'. –
Ironman
это был опечатка ошибка. Я исправил это. @Ironman .. спасибо, что указал. –
сейчас проверьте, работает оно или нет? – Ironman