どのようにレイアウトできますか?ヘッダーはスクロールしないでください。常に見えるようにしてください。スクロール可能なレイアウト
問題は、私はLinearLayout
にScrollView
を入れしようとすると、Androidがエラーをスローです。
マークアップ:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/baseLayout">
<LinearLayout
style="@style/app_header" />
<ScrollView
style="@style/fillParent">
<!-- elements here -->
</ScrollView>
</LinearLayout>
スタイル:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="app_theme" parent="android:Theme">
</style>
<style name="fillParent">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">fill_parent</item>
</style>
<style name="fullWidth">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
</style>
<style name="wrapContent">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
</style>
<style name="baseLayout" parent="fillParent">
<item name="android:orientation">vertical</item>
<item name="android:background">@drawable/app_bg</item>
</style>
<style name="app_header" parent="fullWidth">
<item name="android:background">@drawable/header_bg</item>
</style>
</resources>
正確なエラーを表示できますか? – prolink007