私のアプリでは、押すとアプリのrawフォルダーに保存されているファイルをsdcard / Android/dataにコピーするボタンが必要です...すでに存在する既存のファイルを上書きします。
これが私がこれまでに持っているものです。例として、rawフォルダー内のファイルを呼び出しますbrawler.dat
。
私は誰かにコード全体を書くように頼んではいないが、それは確かにボーナスだろう。
私は主に正しい方向に私を向ける誰かが必要です。
URLなどに移動するボタンを作成することはできますが、次のレベルの準備ができていると感じています。
main.xml
rLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Overwrite File" />
FreelineActivity.java
package my.freeline.conquest;
import android.app.Activity;
import android.os.Bundle;
public class FreelineActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}