View Full Version : مشکل در لیست ویو
NeoFighT
سه شنبه 16 اردیبهشت 1393, 19:37 عصر
سلام.
یه مشکلی پیش اومده برام.
یک لیست ورو دارم که برای مقدار دهی اون از array adapter استفاده کردم و لیوت این شکلی هستش :
118714
ولی وقتی برنامه رو اجرا میکنم اون دکمه نصفه نشون داده میشه این هم عکسش :
118715
رو گوشی هم تست کردم مشکل داره.
کد هر قسمتی هم که لازمه بگید بزارم.
poorman
سه شنبه 16 اردیبهشت 1393, 20:08 عصر
سلام
احتمال داره مشکل از کدهای xml باشه
حالا شما کدهای xml آیتم و لیست ویو رو بذار شاید مشخص شد
البته یک احتمال خیلی قوی اینه که شما به اون دکمه padding راست داده باشی !!!
NeoFighT
سه شنبه 16 اردیبهشت 1393, 20:15 عصر
activity_main.xml
<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:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<RatingBar
android:id="@+id/ratingBar1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
<ListView
android:id="@+id/listView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/ratingBar1"
android:layout_centerHorizontal="true" >
</ListView>
</RelativeLayout>
item.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:background="@android:color/transparent">
<TextView
android:id="@+id/textView1"
android:layout_width="100dp"
android:layout_height="30dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:text="jafar abasi"
android:textColor="#aaff0000"
/>
<CheckBox
android:id="@+id/check1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:layout_marginTop="20dp"
android:button="@drawable/favorite_btn"
/>
</LinearLayout>
favorite_btn.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_checked="false"
android:drawable="@drawable/e"></item>
<item android:state_checked="true"
android:drawable="@drawable/f"></item>
</selector>
poorman
سه شنبه 16 اردیبهشت 1393, 21:05 عصر
نمیدونم والا !!! اینجا که چیزی به چشم من نمیخوره که مشکل داشته باشه
عرض checkBox رو مقدار بده یکم سیخ کن کدها رو ببین چی میشه :لبخند:
NeoFighT
سه شنبه 16 اردیبهشت 1393, 21:35 عصر
عرض چک باکس رو تغییر دادم درست شد :لبخند:
118721
یعنی چی؟!؟:متفکر:
poorman
سه شنبه 16 اردیبهشت 1393, 21:53 عصر
خدا رو شکر درست شد :لبخند:
فک کنم چون checkBox هست عرض wrap براش نشون دهنده همون checkBox پیش فرض باشه، که چون اینجا تکست نداره، عرضش رو فقط اون ماسماسک در نظر میگیره
پ.ن : ماسماسک ینی همون باکسی که چک و آنچک میشه :لبخند:
NeoFighT
سه شنبه 16 اردیبهشت 1393, 23:06 عصر
آره احتمالا:تشویق:
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.