-1
我想在sqlite android數據庫中保存一個文件,首先我選擇文件夾的文件夾,我已經讓它現在我堅持如何保存這個文件在數據庫並將其顯示在另一個活動中,如文件菜單。如何在android sqlite數據庫中存儲文件
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView android:id="@+id/textview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Get File Name From SDCard"
android:textSize="18dp"
android:gravity="center"
android:layout_marginTop="10dp"
/>
<RelativeLayout android:id="@+id/relativeLayout1"
android:layout_height="wrap_content"
android:layout_width="wrap_content">
<EditText
android:layout_alignParentLeft="true"
android:hint="EditText"
android:id="@+id/editText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="15dp"
android:ems="10"
android:inputType="textPersonName"
android:layout_toLeftOf="@+id/skipButton" >
</EditText>
<Button android:text="Browser"
android:id="@+id/skipButton"
android:textSize="18dp"
android:layout_marginTop="10dp"
android:layout_alignParentRight="true"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:onClick="getfile" >
</Button>
<Button android:text="Enregistrer"
android:id="@+id/saveB"
android:textSize="18dp"
android:layout_marginTop="10dp"
android:layout_alignParentRight="true"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
>
</Button>
</RelativeLayout>
</LinearLayout>
可怕的想法,用文件膨脹你的數據庫。你最好存儲文件路徑。 –
我該怎麼做? – Andro
路徑不過是字符串。 –