biodread
پنج شنبه 09 خرداد 1392, 12:31 عصر
سلام
من یه کلاس دارم که از ViewGroup مشتق شده
وقتی من در layout برنامم کلاسم رو داخل یه ScrollView قرار میدم در کلاسم مقدارهای تابع onMeasure رو MeasureSpec.UNSPECIFIED بر میگردونه و من نمینونم در کلاسم محاسبات رو انجام بدم
ولی اگه در داخل ScrollView قرار ندم هیچ مشکلی نیست
بنظر شما علت چیست؟
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000"
tools:context=".MainActivity" >
<ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.asdeveloper.biolearn.layouts.BioFlowLayout
android:id="@+id/bioFlowLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</ScrollView>
</RelativeLayout>
ممنون میشم راهنمایی کنید
من یه کلاس دارم که از ViewGroup مشتق شده
وقتی من در layout برنامم کلاسم رو داخل یه ScrollView قرار میدم در کلاسم مقدارهای تابع onMeasure رو MeasureSpec.UNSPECIFIED بر میگردونه و من نمینونم در کلاسم محاسبات رو انجام بدم
ولی اگه در داخل ScrollView قرار ندم هیچ مشکلی نیست
بنظر شما علت چیست؟
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000"
tools:context=".MainActivity" >
<ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.asdeveloper.biolearn.layouts.BioFlowLayout
android:id="@+id/bioFlowLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</ScrollView>
</RelativeLayout>
ممنون میشم راهنمایی کنید