نمایش نتایج 1 تا 10 از 10

نام تاپیک: برنامه اندرویدی با زامارین و استفاده از SQLite

Threaded View

پست قبلی پست قبلی   پست بعدی پست بعدی
  1. #1
    کاربر دائمی آواتار ghasem110deh
    تاریخ عضویت
    اردیبهشت 1393
    محل زندگی
    تهران
    پست
    1,148

    Post برنامه اندرویدی با زامارین و استفاده از SQLite

    بنام خدا
    سلام به همه :-)
    در خدمت دوستان هستیم با آموزش استفاده از زامارین و دیتابیس اسکیوال لایت ...
    توجه: فقط از طریق NuGet کامپوننت sqlit.net-pcl رو به پروژه اضافه کنید !

    بریم سر اصل مطلب :
    خوب طبیعتا مثل برنامه نویسی با اندروید استودیو باید اول لایه های نمایشی (layout) رو ایجاد کرد !

    لایه اصلی برنامه که بعد از اجرا به کاربر نمایش داده میشه (لانچر)

    کد HTML:
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:minWidth="25px"
        android:minHeight="25px"
        android:background="#3498DB">
        <LinearLayout
            android:orientation="vertical"
            android:minWidth="25px"
            android:minHeight="25px"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/linearLayout1"
            android:layout_gravity="fill"
            android:layout_margin="5dp">
            <EditText
                android:hint="نام کاربری"
                android:gravity="center"
                android:inputType="textPersonName"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/edtName"
                android:textColor="#ffffff" />
            <EditText
                android:hint="کلمه عبور"
                android:gravity="center"
                android:inputType="numberPassword"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/edtPass"
                android:textColor="#ffffff" />
            <Button
                android:gravity="center"
                android:text="ورود"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/btnLogin"
                android:layout_margin="5dp" />
            <Button
                android:gravity="center"
                android:text="ایجاد حساب"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/btnRegisterPage"
                android:layout_margin="5dp" />
            <Button
                android:gravity="center"
                android:text="نمایش کاربران"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/btnShow"
                android:layout_margin="5dp" />
        </LinearLayout>
        <ListView
            android:minWidth="25px"
            android:minHeight="25px"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:id="@+id/listVIEW" />
    </LinearLayout>
    این در واقع صفحه آبی رنگ توی تصاویر ضمیمه هست !

    و اینم لایه رجیستر (یا همون ثبت نام و ورود اطلاعات توسط کاربر)

    کد HTML:
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:minWidth="25px"
        android:minHeight="25px">
        <ImageView
            android:src="@android:drawable/ic_menu_gallery"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/imageView" />
        <Button
            android:text="انتخاب تصویر"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/btnSelectPic" />
        <EditText
            android:hint="نام کاربری"
            android:gravity="center"
            android:inputType="textPersonName"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/edtName" />
        <EditText
            android:hint="کلمه عبور"
            android:gravity="center"
            android:inputType="numberPassword"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/edtPass" />
        <EditText
            android:hint="توضیحات"
            android:gravity="center"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/edtDescription" />
        <CheckBox
            android:text="خانم هستید؟"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/checkGender" />
        <Button
            android:text="ثبت و ادامه"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/btnCreatAccunt" />
    </LinearLayout>
    نکته : اینجا یه لایه خالی داریم که به هیچ اکتیویتی ای مربوط نمیشه و در واقع ایجاد یک لیست ویو سفارشی هست ش

    کد HTML:
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:minWidth="25px"
        android:minHeight="25px">
        <TextView
            android:text="نام کاربری"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/txtName" />
        <TextView
            android:text="جنسیت"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/txtGender" />
        <TextView
            android:text="توضیحات"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/txtDescription" />
    </LinearLayout>
    این لایه نمایشی توی یک لایه که مربوط به اکتیویتی نمایش لیست اعضا هست نمایش داده میشه
    لایه لیست اعضا تنها حاوی یه لیست ویو هست !
    عکس های ضمیمه عکس های ضمیمه

تاپیک های مشابه

  1. سوال: طریقه استفاده از SQLite در برنامه
    نوشته شده توسط gilas1368 در بخش C#‎‎
    پاسخ: 4
    آخرین پست: جمعه 05 اردیبهشت 1393, 15:38 عصر
  2. اشكال در استفاده از sqlite در برنامه با دات نت 4
    نوشته شده توسط m110_110 در بخش C#‎‎
    پاسخ: 4
    آخرین پست: پنج شنبه 28 دی 1391, 08:47 صبح
  3. حرفه ای: ارتباط سایت با برنامه ی تحت ویندوز بدون استفاده از پایگاه داده
    نوشته شده توسط mohsen-unique در بخش ASP.NET Web Forms
    پاسخ: 7
    آخرین پست: شنبه 09 اردیبهشت 1391, 14:58 عصر
  4. نصب برنامه فقط با dll های استفاده شده از فریم ورک
    نوشته شده توسط smaill در بخش Setup و Deployment
    پاسخ: 5
    آخرین پست: پنج شنبه 27 خرداد 1389, 11:43 صبح
  5. یادگیری SQL استاندارد با استفاده از SQLite
    نوشته شده توسط rezaTavak در بخش Foxpro
    پاسخ: 50
    آخرین پست: چهارشنبه 26 فروردین 1388, 08:41 صبح

برچسب های این تاپیک

قوانین ایجاد تاپیک در تالار

  • شما نمی توانید تاپیک جدید ایجاد کنید
  • شما نمی توانید به تاپیک ها پاسخ دهید
  • شما نمی توانید ضمیمه ارسال کنید
  • شما نمی توانید پاسخ هایتان را ویرایش کنید
  •