mehdi.safavie
چهارشنبه 27 آبان 1394, 20:04 عصر
درود;
من از این کتابخانه ها استفاده میکنم :
sidemenu.jar
android-support-v4.jar
این هم کد Layout منه :
<com.agimind.widget.SlideHolder xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/slideHolder"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
tools:context=".MainActivity" >
<ScrollView
android:layout_width="200dp"
android:layout_height="fill_parent"
android:background="#3498db" >
<LinearLayout
android:layout_width="200dp"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#99cc00"
android:text="Stack Overflow"
android:textColor="#fff"
android:textSize="24sp"/>
<!--android:textDirection="rtl" -->
<Button
android:id="@+id/btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Helloooo"/>
</LinearLayout>
</ScrollView>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#2980b9" >
<Button
android:id="@+id/btn_open"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true" />
</RelativeLayout>
</com.agimind.widget.SlideHolder>
سوال اول : من این کتابخانه و کد ها رو از سایت کلیدستان گرفتم . وقتی خود پروژه دانلود شده رو اجرا میکنم در قسمت Preview هیچ مشکلی نیست ، ولی وقتی این کد ها رو تو یه پروژه جدید مینویسم در قسمت Preview پیغام خطا میده :
The following classes could not be found :
- com.agimind.widget.SlidHolder (Fix Build Path, Creat Class)
Tip: Try to build the project.
Couldn't resolve resource
@style/Widget.Holo.Light.ActionMode.Inverse (2 similar errors not shown)
سوال دوم : چطور میتونم یه Button بسازم که وقتی روش کلیک میکنم این منوی Slide من باز بشه !
یعنی به جای این که از سمت چپ تصویر به سمت راست بکشم تا منو باز بشه ، با یه Button این عمل انجام بشه .
من از این کتابخانه ها استفاده میکنم :
sidemenu.jar
android-support-v4.jar
این هم کد Layout منه :
<com.agimind.widget.SlideHolder xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/slideHolder"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
tools:context=".MainActivity" >
<ScrollView
android:layout_width="200dp"
android:layout_height="fill_parent"
android:background="#3498db" >
<LinearLayout
android:layout_width="200dp"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#99cc00"
android:text="Stack Overflow"
android:textColor="#fff"
android:textSize="24sp"/>
<!--android:textDirection="rtl" -->
<Button
android:id="@+id/btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Helloooo"/>
</LinearLayout>
</ScrollView>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#2980b9" >
<Button
android:id="@+id/btn_open"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true" />
</RelativeLayout>
</com.agimind.widget.SlideHolder>
سوال اول : من این کتابخانه و کد ها رو از سایت کلیدستان گرفتم . وقتی خود پروژه دانلود شده رو اجرا میکنم در قسمت Preview هیچ مشکلی نیست ، ولی وقتی این کد ها رو تو یه پروژه جدید مینویسم در قسمت Preview پیغام خطا میده :
The following classes could not be found :
- com.agimind.widget.SlidHolder (Fix Build Path, Creat Class)
Tip: Try to build the project.
Couldn't resolve resource
@style/Widget.Holo.Light.ActionMode.Inverse (2 similar errors not shown)
سوال دوم : چطور میتونم یه Button بسازم که وقتی روش کلیک میکنم این منوی Slide من باز بشه !
یعنی به جای این که از سمت چپ تصویر به سمت راست بکشم تا منو باز بشه ، با یه Button این عمل انجام بشه .