国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Android Studio——記事本案例

這篇具有很好參考價(jià)值的文章主要介紹了Android Studio——記事本案例。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

一、布局界面

? ? ? ? 1、記事本界面布局

main_notepad.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#fefefe">

    <TextView
        android:id="@+id/note_name"
        android:layout_width="match_parent"
        android:layout_height="45dp"
        android:background="@android:color/darker_gray"
        android:text="記事本"
        android:gravity="center"
        android:textStyle="bold"
        android:textColor="@android:color/black"
        android:textSize="20sp" />

    <ListView
        android:id="@+id/listview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:cacheColorHint="#00000000"
        android:divider="#E4E4E4E4"
        android:dividerHeight="1dp"
        android:fadingEdge="horizontal"
        android:listSelector="#00000000"
        android:scrollbars="none"
        android:layout_below="@+id/note_name">

    </ListView>

    <ImageView
        android:id="@+id/add"
        android:layout_width="60dp"
        android:layout_height="60dp"
        android:background="@drawable/add"
        android:layout_marginBottom="30dp"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"/>

</RelativeLayout>

? ? ? ? 2、記事本Item布局界面

activity_item.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:paddingLeft="12dp">
    <TextView
        android:id="@+id/ietm_content"
        android:textColor="@android:color/black"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:maxLines="2"
        android:ellipsize="end"
        android:lineSpacingExtra="3dp"
        android:paddingTop="10dp"/>

    <TextView
        android:id="@+id/item_time"
        android:textColor="#fb7a6a"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingTop="5dp"
        android:paddingBottom="7dp"/>

</LinearLayout>

? ? ? ? 3、添加、修改界面布局

activity_record.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="#fefefe">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="45dp"
        android:background="#E4E4E4"
        android:orientation="horizontal">
        <ImageView
            android:id="@+id/note_back"
            android:layout_width="45dp"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:paddingLeft="10dp"
            android:background="@drawable/back"/>
        <TextView
            android:id="@+id/note_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:gravity="center"
            android:text="記事本"
            android:textColor="@android:color/black"
            android:textSize="15sp"
            android:textStyle="bold" />
    </RelativeLayout>
    <TextView
        android:id="@+id/tv_time"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textSize="15sp"
        android:paddingTop="10dp"
        android:paddingBottom="10dp"
        android:gravity="center"
        android:visibility="gone"
        android:textColor="#fb7a6a"/>
    <EditText
        android:id="@+id/note_content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:gravity="top"
        android:hint="請(qǐng)輸入要添加的內(nèi)容"
        android:paddingLeft="5dp"
        android:textColor="@android:color/black"
        android:background="#fefefe"/>
    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="#fb7a6a"/>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="55dp"
        android:orientation="horizontal">

        <ImageView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="@android:color/white"
            android:paddingBottom="15dp"
            android:paddingTop="9dp"/>
        <ImageView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="@android:color/white"
            android:paddingBottom="15dp"
            android:paddingTop="9dp"/>
        <ImageView
            android:id="@+id/delete"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="@drawable/delete"
            android:paddingBottom="15dp"
            android:paddingTop="9dp"/>
        <ImageView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="@android:color/white"
            android:paddingBottom="15dp"
            android:paddingTop="9dp"/>
        <ImageView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="@android:color/white"
            android:paddingBottom="15dp"
            android:paddingTop="9dp"/>

        <ImageView
            android:id="@+id/note_save"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="@drawable/save"
            android:paddingTop="9dp"
            android:paddingBottom="15dp" />
        <ImageView
            android:id="@+id/none2"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="@android:color/white"
            android:paddingBottom="15dp"
            android:paddingTop="9dp"/>
        <ImageView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="@android:color/white"
            android:paddingBottom="15dp"
            android:paddingTop="9dp"/>

    </LinearLayout>
</LinearLayout>

二、封裝記錄信息實(shí)體類

? ? ? ? 記事本的每個(gè)記錄都會(huì)有記錄內(nèi)容和記錄時(shí)間這兩個(gè)屬性,因此需要建立一個(gè)實(shí)體類用于存放這些屬性。

NotepadBean.java

public class NotepadBean {
    private String id;
    private String notepadContent;
    private String notepadTime;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getNotepadContent() {
        return notepadContent;
    }

    public void setNotepadContent(String notepadContent) {
        this.notepadContent = notepadContent;
    }

    public String getNotepadTime() {
        return notepadTime;
    }

    public void setNotepadTime(String notepadTime) {
        this.notepadTime = notepadTime;
    }
}

三、編寫記事本界面列表適配器

? ? ? ? 因?yàn)橛浭卤镜募o(jì)錄列表是使用ListView控件展示的,因此需要建立一個(gè)數(shù)據(jù)適配器對(duì)ListView控件進(jìn)行數(shù)據(jù)適配。

NotepadAdapter.java

public class NotepadAdapter extends BaseAdapter {
    private LayoutInflater layoutInflater;
    private List<NotepadBean> list;
    public NotepadAdapter(Context context, List<NotepadBean> list){        
        this.layoutInflater=LayoutInflater.from(context);
        this.list=list;
    }
    @Override
    //獲取Item條目的總數(shù)
    public int getCount(){
        return list==null? 0: list.size();
    }
    @Override
    //根據(jù)position(位置)獲取某個(gè)Item的對(duì)象
    public Object getItem(int position){
        return list.get(position);
    }
    @Override
    //根據(jù)position(位置)獲取某個(gè)Item的id
    public long getItemId(int position){
        return position;
    }
    @Override
    //獲取相應(yīng)position對(duì)應(yīng)的Item視圖,position是當(dāng)前Item的位置,convertView用于復(fù)用舊視圖,parent用于加載xml布局
    public View getView(int position, View convertView, ViewGroup parent){
        ViewHolder viewHolder;
        //通過inflate()方法加載Item布局,并將獲取的數(shù)據(jù)顯示到對(duì)應(yīng)的控件上,并判斷舊視圖是否為空,若為空,則創(chuàng)建一個(gè)ViewHolder對(duì)象
        //通過set.Tag()方法將該對(duì)象添加到convertView中進(jìn)行緩存,否則把獲取的舊視圖進(jìn)行緩存
        if(convertView==null){
            convertView=layoutInflater.inflate(R.layout.activity_item,null);
            viewHolder=new ViewHolder(convertView);
            convertView.setTag(viewHolder);
        }
        else{
            viewHolder=(ViewHolder) convertView.getTag();
        }
        NotepadBean noteInfo=(NotepadBean) getItem(position);
        viewHolder.tvNoteoadContent.setText(noteInfo.getNotepadContent());
        viewHolder.tvNotepadTime.setText(noteInfo.getNotepadTime());
        return convertView;
    }
    class ViewHolder{
        TextView tvNoteoadContent;
        TextView tvNotepadTime;
        public ViewHolder(View view){
            tvNoteoadContent=(TextView) view.findViewById(R.id.ietm_content);
            tvNotepadTime=(TextView) view.findViewById((R.id.item_time));
        }
    }
}

四、創(chuàng)建數(shù)據(jù)庫(kù)

? ? ? ? 因?yàn)橛浭卤镜拇鎯?chǔ)和讀取記錄的數(shù)據(jù)都是通過數(shù)據(jù)庫(kù)完成的,因此需要?jiǎng)?chuàng)建數(shù)據(jù)庫(kù)

? ? ? ? 1、先創(chuàng)建一個(gè)DBUtils類,在該類中定義數(shù)據(jù)庫(kù)的名稱、表名、數(shù)據(jù)庫(kù)版本、數(shù)據(jù)庫(kù)表中的列名以及獲取當(dāng)前日期等信息。

DBUtils.java

public class DBUtils {
    public static final String DATABASE_NAME="Notepad";
    public static final String DATABASE_TABLE="Note";
    public static final int DATABASE_VERSION=1;
    //數(shù)據(jù)庫(kù)表中的列名
    public static final String NOTEPAD_ID="id";
    public static  final String NOTEPAD_CONTENT="content";
    public static final String NOTEPAD_TIME="notetime";
    //獲取當(dāng)前日期
    public static final String getTime(){
        SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy年MM月dd日HH:mm;ss");
        Date date=new Date(System.currentTimeMillis());
        return simpleDateFormat.format(date);
    }
}

? ? ? ? 2、創(chuàng)建SQLiteHelper類,在該類中實(shí)現(xiàn)增刪改查操作

SQLiteHelper.java

public class SQLiteHelper extends SQLiteOpenHelper {
    private SQLiteDatabase sqLiteDatabase;

    //創(chuàng)建數(shù)據(jù)庫(kù)
    public SQLiteHelper(Context context){
        super(context, DBUtils.DATABASE_NAME,null,DBUtils.DATABASE_VERSION);
        sqLiteDatabase=this.getWritableDatabase();
    }
    //創(chuàng)建表
    @Override
    public void onCreate(SQLiteDatabase db){
        db.execSQL("create table "+DBUtils.DATABASE_TABLE+"("+DBUtils.NOTEPAD_ID+" integer primary key autoincrement,"+DBUtils.NOTEPAD_CONTENT+" text,"+DBUtils.NOTEPAD_TIME+ " text)");
    }
    @Override
    public void onUpgrade(SQLiteDatabase db,int oldVersion,int newVersion){}
    //添加數(shù)據(jù)
    public boolean insertData(String userContent,String userTime){
        ContentValues contentValues=new ContentValues();
        contentValues.put(DBUtils.NOTEPAD_CONTENT,userContent);
        contentValues.put(DBUtils.NOTEPAD_TIME,userTime);
        return sqLiteDatabase.insert(DBUtils.DATABASE_TABLE,null,contentValues)>0;
    }
    //刪除數(shù)據(jù)
    public boolean deleteData(String id){
        String sql=DBUtils.NOTEPAD_ID+"=?";
        String [] contentValuesArray=new String[]{String.valueOf(id)};
        return sqLiteDatabase.delete(DBUtils.DATABASE_TABLE,sql,contentValuesArray)>0;
    }
    //修改數(shù)據(jù)
    public boolean updateData(String id,String content,String userYear){
        ContentValues contentValues=new ContentValues();
        contentValues.put(DBUtils.NOTEPAD_CONTENT,content);
        contentValues.put(DBUtils.NOTEPAD_TIME,userYear);
        String sql=DBUtils.NOTEPAD_ID+"=?";
        String [] strings=new String[] {id};
        return sqLiteDatabase.update(DBUtils.DATABASE_TABLE,contentValues,sql,strings)>0;
    }
    //查詢數(shù)據(jù)
    public List<NotepadBean> query(){
        List<NotepadBean> list =new ArrayList<NotepadBean>();
        Cursor cursor=sqLiteDatabase.query(DBUtils.DATABASE_TABLE,null,null,null,null,null,DBUtils.NOTEPAD_ID+" desc");
        if(cursor!=null){
            while(cursor.moveToNext()){
                NotepadBean noteInfo=new NotepadBean();
                @SuppressLint("range")
                String id=String.valueOf(cursor.getInt(cursor.getColumnIndex(DBUtils.NOTEPAD_ID)));
                @SuppressLint("range")
                String content=cursor.getString(cursor.getColumnIndex(DBUtils.NOTEPAD_CONTENT));
                @SuppressLint("range")
                String time=cursor.getString(cursor.getColumnIndex(DBUtils.NOTEPAD_TIME));
                noteInfo.setId(id);
                noteInfo.setNotepadContent(content);
                noteInfo.setNotepadTime(time);
                list.add(noteInfo);
            }
            cursor.close();
        }
        return list;
    }
}

五、實(shí)現(xiàn)添加記錄界面功能

? ? ? ? 因?yàn)樘砑佑涗浗缑嬗斜4婧蛣h除按鈕,因此創(chuàng)建記錄類實(shí)現(xiàn)點(diǎn)擊事件,將編寫的內(nèi)容添加到數(shù)據(jù)庫(kù)中。

RecordActivity.java

public class RecordActivity extends AppCompatActivity implements View.OnClickListener{
    ImageView delete,note_save,note_back;
    TextView noteName,note_time;
    EditText content;
    SQLiteHelper mSQLiteHelper;
    String id;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_record);
        //通過findViewById獲取界面控件
        note_back=(ImageView) findViewById(R.id.note_back);
        note_save=(ImageView) findViewById(R.id.note_save);
        delete=(ImageView) findViewById(R.id.delete);
        noteName=(TextView) findViewById(R.id.note_name);
        note_time=(TextView) findViewById(R.id.tv_time);
        content=(EditText) findViewById(R.id.note_content);
        //設(shè)置啟動(dòng)器
        note_back.setOnClickListener(this);
        delete.setOnClickListener(this);
        note_save.setOnClickListener(this);
        //初始化
        initData();
    }
    protected void initData(){
        //創(chuàng)建數(shù)據(jù)庫(kù)
        mSQLiteHelper=new SQLiteHelper(this);
        noteName.setText("添加記錄");
        //接收記事本傳來的消息
        //getIntent()方法獲取Intent對(duì)象
        Intent intent=getIntent();
        if(intent!=null){
            //獲取傳遞的記錄id
            id=intent.getStringExtra("id");
            if(id!=null){
                noteName.setText("修改記錄");
                content.setText(intent.getStringExtra("content"));
                note_time.setText(intent.getStringExtra("time"));
                note_time.setVisibility(View.VISIBLE);
            }
        }
    }
    public void onClick(View v){
        switch (v.getId()){
            //后退,刪除,保存事件
            case R.id.note_back:
                finish();
                break;
            case R.id.delete:
                content.setText("");
                break;
            case R.id.note_save:
                //通過getText()獲取輸入內(nèi)容
                String noteContent=content.getText().toString().trim();
                if(id!=null){
                    if(noteContent.length()>0){
                        if(mSQLiteHelper.updateData(id,noteContent,DBUtils.getTime())){
                            showToast("修改成功");
                            setResult(2);
                            finish();
                        }
                        else{
                            showToast("保存失敗");
                        }
                    }
                    else{
                        showToast("保存內(nèi)容不能為空");
                    }
                }
             //向數(shù)據(jù)庫(kù)添加數(shù)據(jù)
                else{
                    if(noteContent.length()>0){
                        if(mSQLiteHelper.insertData(noteContent,DBUtils.getTime())){
                            showToast("保存成功");
                            setResult(2);
                            finish();
                        }
                        else{
                            showToast("保存失敗");
                        }
                    }
                    else{
                        showToast("修改內(nèi)容不能為空");
                    }
                }
                break;
            }
    }
    public void showToast(String Message){
        Toast.makeText(RecordActivity.this,Message,Toast.LENGTH_SHORT).show();
    }
}

六、實(shí)現(xiàn)記事本界面的顯示功能

? ? ? ? 等于就是剛進(jìn)入程序的界面的選擇與操作

MainActivity.java

public class MainActivity extends Activity {
    ListView listView;
    List<NotepadBean> list;
    SQLiteHelper mSQLiteHelper;
    NotepadAdapter adapter;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_notepad);
        //用于顯示記錄的列表
        listView=(ListView) findViewById(R.id.listview);
        ImageView add=(ImageView) findViewById(R.id.add);
        //設(shè)置添加按鈕事件
        add.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //使用顯示Intent指定要跳轉(zhuǎn)的目標(biāo)Activity,并通過startActivityForResult()方法開啟目標(biāo)Activity
                Intent intent=new Intent(MainActivity.this,RecordActivity.class);
                startActivityForResult(intent,1);
            }
        });
        initData();
    }
    protected void initData() {
        //創(chuàng)建數(shù)據(jù)庫(kù)
        mSQLiteHelper = new SQLiteHelper(this);
        showQueryData();
        //處理查看記事本詳細(xì)信息
        listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                //通過get方法獲取對(duì)應(yīng)的Item數(shù)據(jù)
                NotepadBean notepadBean=list.get(position);
                //通過putExtra()方法封裝到Intent對(duì)象中
                Intent intent=new Intent(MainActivity.this,RecordActivity.class);
                intent.putExtra("id",notepadBean.getId());
                intent.putExtra("time",notepadBean.getNotepadTime());
                intent.putExtra("content",notepadBean.getNotepadContent());
                MainActivity.this.startActivityForResult(intent,1);
            }
        });
        //刪除記事本記錄
        listView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
            @Override
            public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
                AlertDialog dialog;
                AlertDialog.Builder builder=new AlertDialog.Builder(MainActivity.this)
                        .setMessage("是否刪除此紀(jì)錄?")
                        .setPositiveButton("確定", new DialogInterface.OnClickListener() {
                            @Override
                            public void onClick(DialogInterface dialog, int which) {
                                //獲取Item對(duì)象
                                NotepadBean notepadBean=list.get(position);
                                if(mSQLiteHelper.deleteData(notepadBean.getId())){
                                    //刪除對(duì)應(yīng)的Item
                                    list.remove(position);
                                    //更新記事本界面
                                    adapter.notifyDataSetChanged();
                                    Toast.makeText(MainActivity.this,"刪除成功",Toast.LENGTH_SHORT).show();
                                }
                            }
                        })
                        .setPositiveButton("取消", new DialogInterface.OnClickListener() {
                            @Override
                            public void onClick(DialogInterface dialog, int which) {
                                dialog.dismiss();
                            }
                        });
                dialog=builder.create();
                dialog.show();
                return true;
            }
        });
    }
    private void showQueryData(){
        if(list!=null){
            list.clear();
        }
        //從數(shù)據(jù)庫(kù)中查詢數(shù)據(jù)
        list=mSQLiteHelper.query();
        adapter=new NotepadAdapter(this,list);
        listView.setAdapter(adapter);
    }
    @Override
    //重寫,當(dāng)關(guān)閉添加記錄界面時(shí),程序回調(diào)該方法
    // 并在該方法中調(diào)用showQueryData()方法重新獲取數(shù)據(jù)庫(kù)中保存的記錄數(shù)據(jù)并顯示到記錄列表中
    protected void onActivityResult(int requestCode,int resultCode,Intent data){
        super.onActivityResult(requestCode,resultCode,data);
        if(requestCode==1&&resultCode==2){
            showQueryData();
        }
    }
}

七、運(yùn)行結(jié)果截圖

? ? ? ? 主界面

Android Studio——記事本案例

? ? ? ? ?選擇添加按鈕之后進(jìn)入編寫界面

Android Studio——記事本案例Android Studio——記事本案例

? ? ? ? ?修改界面

Android Studio——記事本案例Android Studio——記事本案例文章來源地址http://www.zghlxwxcb.cn/news/detail-448637.html

到了這里,關(guān)于Android Studio——記事本案例的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • Android記事本

    Android記事本

    1、項(xiàng)目需求分析 1.1、記事功能需求分析: 1.1.1、顯示記事 用戶打開記事本可以看到之前所寫的所有記事內(nèi)容,進(jìn)入主頁(yè)后,軟件應(yīng)該從數(shù)據(jù)庫(kù)中搜索出該用戶所寫的全部記事,并將所有的數(shù)據(jù)進(jìn)行顯示。 1.1.2、添加記事 設(shè)置添加按鈕,點(diǎn)擊添加按鈕之后可以編輯記事的標(biāo)題

    2024年02月03日
    瀏覽(34)
  • Android開發(fā)_記事本(1)

    Android開發(fā)_記事本(1)

    TextView中有下述幾個(gè)屬性: id: 為TextView設(shè)置一個(gè)組件id,根據(jù)id,我們可以在Java代碼中通過findViewById()的方法獲取到該對(duì)象,然后進(jìn)行相關(guān)屬性的設(shè)置,又或者使用RelativeLayout時(shí),參考組件用的也是id! layout_width: 組件的寬度,一般寫: wrap_content 或者 match_parent(fill_parent) ,前

    2023年04月10日
    瀏覽(33)
  • Android——記事本功能業(yè)務(wù)(完整代碼)

    Android——記事本功能業(yè)務(wù)(完整代碼)

    目錄 實(shí)現(xiàn)效果 一、搭建記事本頁(yè)面布局activity_notepad.xml 二、搭建記事本界面Item布局notepad_item_layout.xml 三、封裝記錄信息實(shí)體類NotepadBean類 四、編寫記事本界面列表適配器NotepadAdapter類 五、創(chuàng)建數(shù)據(jù)庫(kù) 六、實(shí)現(xiàn)記事本界面的顯示功能NotepadAdapter.java? 七、搭建添加記錄界面和

    2024年02月03日
    瀏覽(34)
  • 基于Android的記事本設(shè)計(jì)和模塊開發(fā)

    基于Android的記事本設(shè)計(jì)和模塊開發(fā)

    有一萬(wàn)五千字論文,完美運(yùn)行。 由于編程技術(shù)的迅速發(fā)展,各種記事本APP隨處可見,在人們的日常生活中經(jīng)常使用的到。于是各種記事本APP也跟著發(fā)展起來。本文在通過在Android Studio開發(fā)平臺(tái)上開發(fā)一個(gè)簡(jiǎn)單的多功能語(yǔ)音輸入記事本APP的過程,同時(shí)了解記事本APP的功能實(shí)現(xiàn),

    2024年02月03日
    瀏覽(33)
  • Android 備忘錄,記事本程序設(shè)計(jì)

    Android 備忘錄,記事本程序設(shè)計(jì)

    android備忘錄實(shí)現(xiàn),使用ObjectBox數(shù)據(jù)庫(kù)框架進(jìn)行數(shù)據(jù)存儲(chǔ),增刪改查等操作。代碼使用kotlin編寫。 1、下面看看ObjectBox數(shù)據(jù)庫(kù)封裝 需要注意的是: ? ?/** ? ? ?* 你只有配置好之后, 點(diǎn)擊 Make Model \\\'你的model名字\\\', 才會(huì)創(chuàng)建 MyObjectBox對(duì)象 ? ? ?* 對(duì)于MyObjectBox的包名, 目前我發(fā)現(xiàn)的

    2024年01月23日
    瀏覽(27)
  • 基于安卓系統(tǒng)(android)記事本APP管理系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)

    基于安卓系統(tǒng)(android)記事本APP管理系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)

    目錄 摘要 I Abstract II 1 緒論 1.1 課題來源、目的和意義 1 1.2 國(guó)內(nèi)外基本研究情況 1 2 需求分析 2.1 用戶需求 4 2.2 功能需求 4 2.3 數(shù)據(jù)庫(kù)選擇 6 2.4 性能需求 6 3 概要設(shè)計(jì) 3.1 功能概要設(shè)計(jì) 7 3.2 數(shù)據(jù)庫(kù)概要設(shè)計(jì) 13 4 詳細(xì)設(shè)計(jì) 4.1 功能設(shè)計(jì) 15 4.2 數(shù)據(jù)庫(kù)設(shè)計(jì) 30 5 系統(tǒng)功能實(shí)現(xiàn) 5.1 系統(tǒng)架

    2024年02月11日
    瀏覽(26)
  • 【Android 記事本,筆記本,可注冊(cè)登錄,增刪改查(附源碼)】

    【Android 記事本,筆記本,可注冊(cè)登錄,增刪改查(附源碼)】

    簡(jiǎn)介 用Sqlite做數(shù)據(jù)庫(kù),用來存儲(chǔ)賬號(hào)以及筆記信息,實(shí)現(xiàn)了賬號(hào)的注冊(cè)以及登錄功能,筆記方面實(shí)現(xiàn)了新增、刪除、修改、搜索功能,列表展示筆記使用的是listView(懶得弄分割線,就使用listView的默認(rèn)分割線了); 運(yùn)行效果 代碼講解 我代碼里使用了兩個(gè)依賴,一個(gè)是工具

    2024年02月04日
    瀏覽(20)
  • Android:實(shí)現(xiàn)安卓小程序-記事本(備忘錄)的開發(fā),教你如何增加拿到BAT大廠offer幾率

    Android:實(shí)現(xiàn)安卓小程序-記事本(備忘錄)的開發(fā),教你如何增加拿到BAT大廠offer幾率

    public MyBaseAdapter(Context context, List data) { this.context = context; this.data = data; } @Override public Object getItem(int i) { return null; } @Override public long getItemId(int i) { return 0; } @Override public int getCount() { if(data==null) return 0; return data.size(); } } 接著在編寫NoteAdapter類繼承上類,初始化view, 將Note條目的

    2024年04月25日
    瀏覽(91)
  • 電腦記事本在哪里?電腦桌面顯示記事本要怎么設(shè)置?

    電腦記事本在哪里?電腦桌面顯示記事本要怎么設(shè)置?

    絕大多數(shù)上班族在使用電腦辦公時(shí),都需要隨手記錄一些瑣碎或重要的事情,例如工作注意事項(xiàng)、常用的文案、某項(xiàng)工作的具體要求、多個(gè)平臺(tái)的賬號(hào)和密碼等。于是就有不少小伙伴想要使用電腦記事本軟件來記錄,那么電腦記事本在哪里呢?想要電腦桌面顯示記事本怎么設(shè)

    2024年02月15日
    瀏覽(33)
  • WIN11右鍵打開方式?jīng)]有記事本,記事本無法使用問題

    WIN11右鍵打開方式?jīng)]有記事本,記事本無法使用問題

    背景: 個(gè)人手欠把記事本卸載了,然后又安裝了,結(jié)果記事本可以打開,但是應(yīng)用里面沒有,右擊打開方式也沒有!!(檢索過程發(fā)現(xiàn)很多人人用不了是因?yàn)樯?jí)W11) 問題: 1.如題,右擊打開方式里沒有記事本選項(xiàng)! 2.右擊更多打開方式,通過查找到notepad.exe打開,出現(xiàn)程序

    2024年02月04日
    瀏覽(19)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包