@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 圆角矩形 -->
|
||||
<corners android:radius="10dip" />
|
||||
<!-- 背景颜色 -->
|
||||
<solid android:color="#FF6666" />
|
||||
<!-- 边框 -->
|
||||
<stroke
|
||||
android:width="1dip"
|
||||
android:color="#FF4444" />
|
||||
</shape>
|
||||
@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#3DDC84"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
||||
@ -0,0 +1,30 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#FF6200" />
|
||||
<size
|
||||
android:width="180dp"
|
||||
android:height="180dp" />
|
||||
</shape>
|
||||
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/friend_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="@android:drawable/divider_horizontal_bright"
|
||||
android:dividerHeight="1dp"
|
||||
android:padding="8dp" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/sv_note_edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/note_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:background="@android:color/darker_gray">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_modified_date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@android:style/TextAppearance.Medium"
|
||||
android:textColor="@android:color/primary_text_light" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 标题显示区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:background="@android:color/white">
|
||||
<TextView
|
||||
android:id="@+id/note_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@android:style/TextAppearance.Large"
|
||||
android:textColor="@android:color/primary_text_dark"
|
||||
android:textSize="20sp"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:background="@null" />
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#CCCCCC" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 正文显示区域 -->
|
||||
<TextView
|
||||
android:id="@+id/note_edit_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/white"
|
||||
android:padding="16dp"
|
||||
android:textAppearance="@android:style/TextAppearance.Medium"
|
||||
android:textColor="@android:color/primary_text_dark"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/friend_note_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="@android:drawable/divider_horizontal_bright"
|
||||
android:dividerHeight="1dp"
|
||||
android:padding="8dp" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="20dp"
|
||||
android:background="@android:color/white">
|
||||
|
||||
<!-- 应用图标 -->
|
||||
<ImageView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:src="@mipmap/ic_launcher"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:layout_marginTop="50dp" />
|
||||
|
||||
<!-- 应用名称 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/app_name"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="40dp" />
|
||||
|
||||
<!-- 登录表单 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:background="@android:color/white"
|
||||
android:padding="20dp"
|
||||
android:elevation="5dp"
|
||||
android:layout_marginBottom="20dp">
|
||||
|
||||
<!-- 用户名输入 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="用户名:"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:hint="请输入用户名"
|
||||
android:inputType="text"
|
||||
android:singleLine="true"
|
||||
android:background="@android:drawable/editbox_background_normal"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 密码输入 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="密码:"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:hint="请输入密码"
|
||||
android:inputType="textPassword"
|
||||
android:singleLine="true"
|
||||
android:background="@android:drawable/editbox_background_normal"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 登录按钮 -->
|
||||
<Button
|
||||
android:id="@+id/btn_login"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:text="登录"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="@android:color/holo_orange_light"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:onClick="onLoginClick" />
|
||||
|
||||
<!-- 注册和忘记密码按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_register"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="注册账号"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@android:color/holo_blue_dark"
|
||||
android:background="@null"
|
||||
android:onClick="onRegisterClick" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@android:color/darker_gray"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_change_password"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="修改密码"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@android:color/holo_blue_dark"
|
||||
android:background="@null"
|
||||
android:onClick="onChangePasswordClick" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 版权信息 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="© 2024 小米便签"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@android:color/darker_gray"
|
||||
android:layout_marginTop="50dp" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hello World!"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="#f0f0f0">
|
||||
|
||||
<!-- 聊天消息列表 -->
|
||||
<ListView
|
||||
android:id="@+id/chat_list"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1"
|
||||
android:cacheColorHint="@null"
|
||||
android:divider="@null"
|
||||
android:dividerHeight="8dip"
|
||||
android:padding="8dip"
|
||||
android:scrollbars="vertical" />
|
||||
|
||||
<!-- 输入框和发送按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="#ffffff"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dip"
|
||||
android:weightSum="1">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/message_edit_text"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:drawable/edit_text"
|
||||
android:hint="输入消息..."
|
||||
android:inputType="textMultiLine"
|
||||
android:maxLines="3"
|
||||
android:padding="8dip"
|
||||
android:textColor="#000000"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/send_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="8dip"
|
||||
android:background="@android:drawable/btn_default"
|
||||
android:text="发送"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left"
|
||||
android:gravity="left"
|
||||
android:orientation="vertical"
|
||||
android:padding="4dip">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left"
|
||||
android:background="#ffffff"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dip">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left"
|
||||
android:maxWidth="250dip"
|
||||
android:padding="4dip"
|
||||
android:text="消息内容"
|
||||
android:textColor="#000000"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left"
|
||||
android:layout_marginTop="4dip"
|
||||
android:padding="2dip"
|
||||
android:text="12:00"
|
||||
android:textColor="#80000000"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left"
|
||||
android:gravity="left"
|
||||
android:orientation="vertical"
|
||||
android:padding="4dip">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left"
|
||||
android:background="#ffffff"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dip">
|
||||
|
||||
<!-- 添加"便签"标注 -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="[便签]"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="12sp"
|
||||
android:background="@android:drawable/btn_default_small"
|
||||
android:paddingLeft="6dip"
|
||||
android:paddingRight="6dip"
|
||||
android:paddingTop="2dip"
|
||||
android:paddingBottom="2dip"
|
||||
android:layout_marginRight="4dip"
|
||||
android:backgroundTint="#0000ff" /> <!-- 接收的便签标注使用蓝色 -->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left"
|
||||
android:maxWidth="300dip"
|
||||
android:padding="4dip"
|
||||
android:text="便签内容"
|
||||
android:textColor="#000000"
|
||||
android:textSize="16sp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="@android:drawable/btn_default_small"
|
||||
android:paddingLeft="8dip"
|
||||
android:paddingRight="8dip"
|
||||
android:paddingTop="4dip"
|
||||
android:paddingBottom="4dip" />
|
||||
</LinearLayout> <!-- 闭合LinearLayout -->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left"
|
||||
android:layout_marginTop="4dip"
|
||||
android:padding="2dip"
|
||||
android:text="12:00"
|
||||
android:textColor="#80000000"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:gravity="right"
|
||||
android:orientation="vertical"
|
||||
android:padding="4dip">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:background="@android:drawable/btn_default"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dip">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:maxWidth="250dip"
|
||||
android:padding="4dip"
|
||||
android:text="消息内容"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginTop="4dip"
|
||||
android:padding="2dip"
|
||||
android:text="12:00"
|
||||
android:textColor="#80ffffff"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:gravity="right"
|
||||
android:orientation="vertical"
|
||||
android:padding="4dip">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:background="@android:drawable/btn_default"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dip">
|
||||
|
||||
<!-- 添加"便签"标注 -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="[便签]"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="12sp"
|
||||
android:background="@android:drawable/btn_default_small"
|
||||
android:paddingLeft="6dip"
|
||||
android:paddingRight="6dip"
|
||||
android:paddingTop="2dip"
|
||||
android:paddingBottom="2dip"
|
||||
android:layout_marginRight="4dip"
|
||||
android:backgroundTint="#ff0000" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:maxWidth="300dip"
|
||||
android:padding="4dip"
|
||||
android:text="便签内容"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="16sp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="@android:drawable/btn_default_small"
|
||||
android:paddingLeft="8dip"
|
||||
android:paddingRight="8dip"
|
||||
android:paddingTop="4dip"
|
||||
android:paddingBottom="4dip" />
|
||||
</LinearLayout> <!-- 闭合LinearLayout -->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginTop="4dip"
|
||||
android:padding="2dip"
|
||||
android:text="12:00"
|
||||
android:textColor="#80ffffff"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,150 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<!-- 标题 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="修改密码"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="20dp" />
|
||||
|
||||
<!-- 用户名输入 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="用户名:"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_change_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:hint="请输入用户名"
|
||||
android:inputType="text"
|
||||
android:singleLine="true"
|
||||
android:background="@android:drawable/editbox_background_normal"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 当前密码输入 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="当前密码:"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_current_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:hint="请输入当前密码"
|
||||
android:inputType="textPassword"
|
||||
android:singleLine="true"
|
||||
android:background="@android:drawable/editbox_background_normal"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 新密码输入 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="新密码:"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_new_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:hint="请输入新密码"
|
||||
android:inputType="textPassword"
|
||||
android:singleLine="true"
|
||||
android:background="@android:drawable/editbox_background_normal"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 确认新密码输入 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="确认新密码:"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_confirm_new_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:hint="请再次输入新密码"
|
||||
android:inputType="textPassword"
|
||||
android:singleLine="true"
|
||||
android:background="@android:drawable/editbox_background_normal"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_change_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:text="取消"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:background="@android:drawable/btn_default"
|
||||
android:layout_marginRight="20dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_change_confirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:text="确认修改"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="@android:color/holo_orange_light" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<!-- 标题 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="注册账号"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="20dp" />
|
||||
|
||||
<!-- 用户名输入 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="用户名:"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_register_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:hint="请输入用户名"
|
||||
android:inputType="text"
|
||||
android:singleLine="true"
|
||||
android:background="@android:drawable/editbox_background_normal"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 密码输入 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="密码:"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_register_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:hint="请输入密码"
|
||||
android:inputType="textPassword"
|
||||
android:singleLine="true"
|
||||
android:background="@android:drawable/editbox_background_normal"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 确认密码输入 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="确认密码:"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_register_confirm_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:hint="请再次输入密码"
|
||||
android:inputType="textPassword"
|
||||
android:singleLine="true"
|
||||
android:background="@android:drawable/editbox_background_normal"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_register_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:text="取消"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:background="@android:drawable/btn_default"
|
||||
android:layout_marginRight="20dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_register_confirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:text="注册"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="@android:color/holo_orange_light" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/friend_username"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@android:style/TextAppearance.Medium"
|
||||
android:textColor="@android:color/primary_text_light"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/password_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPassword"
|
||||
android:hint="@string/preferences_new_password_hint"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/current_password_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/preferences_current_password_label"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/current_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPassword"
|
||||
android:hint="@string/preferences_current_password_hint"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/new_password_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/preferences_new_password_label"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/new_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPassword"
|
||||
android:hint="@string/preferences_new_password_hint"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/confirm_password_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/preferences_confirm_password_label"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/confirm_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPassword"
|
||||
android:hint="@string/preferences_confirm_password_hint" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 982 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
@ -0,0 +1,7 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Base.Theme.Notesmaster" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Customize your dark theme here. -->
|
||||
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
|
||||
</style>
|
||||
</resources>
|
||||
@ -0,0 +1,9 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Base.Theme.Notesmaster" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Customize your light theme here. -->
|
||||
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
|
||||
</style>
|
||||
|
||||
<style name="Theme.Notesmaster" parent="Base.Theme.Notesmaster" />
|
||||
</resources>
|
||||
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample backup rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/guide/topics/data/autobackup
|
||||
for details.
|
||||
Note: This file is ignored for devices older than API 31
|
||||
See https://developer.android.com/about/versions/12/backup-restore
|
||||
-->
|
||||
<full-backup-content>
|
||||
<!--
|
||||
<include domain="sharedpref" path="."/>
|
||||
<exclude domain="sharedpref" path="device.xml"/>
|
||||
-->
|
||||
</full-backup-content>
|
||||
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample data extraction rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
|
||||
for details.
|
||||
-->
|
||||
<data-extraction-rules>
|
||||
<cloud-backup>
|
||||
<!-- TODO: Use <include> and <exclude> to control what is backed up.
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
-->
|
||||
</cloud-backup>
|
||||
<!--
|
||||
<device-transfer>
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
</device-transfer>
|
||||
-->
|
||||
</data-extraction-rules>
|
||||
@ -0,0 +1,23 @@
|
||||
package net.micode.notes.data;
|
||||
|
||||
public class Messages {
|
||||
|
||||
public interface MessageColumns {
|
||||
public static final String ID = "id";
|
||||
public static final String SENDER_ID = "sender_id";
|
||||
public static final String RECEIVER_ID = "receiver_id";
|
||||
public static final String CONTENT = "content";
|
||||
public static final String MESSAGE_TYPE = "message_type";
|
||||
public static final String CREATED_DATE = "created_date";
|
||||
public static final String IS_READ = "is_read";
|
||||
}
|
||||
|
||||
public interface MessageType {
|
||||
public static final int TEXT = 0;
|
||||
public static final int IMAGE = 1;
|
||||
public static final int EMOTION = 2;
|
||||
public static final int NOTE = 3;
|
||||
}
|
||||
|
||||
public static final long ID_INVALID = -1;
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package net.micode.notes.data;
|
||||
|
||||
public class Users {
|
||||
public interface UserColumns {
|
||||
public static final String ID = "_id";
|
||||
public static final String USERNAME = "username";
|
||||
public static final String PASSWORD = "password";
|
||||
public static final String CREATED_DATE = "created_date";
|
||||
public static final String MODIFIED_DATE = "modified_date";
|
||||
}
|
||||
|
||||
public interface UserConstants {
|
||||
// 可以添加一些用户相关的常量
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,271 @@
|
||||
package net.micode.notes.ui;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import net.micode.notes.R;
|
||||
import net.micode.notes.data.Notes;
|
||||
import net.micode.notes.data.Notes.NoteColumns;
|
||||
import net.micode.notes.model.WorkingNote;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class FriendNoteListActivity extends Activity {
|
||||
private ListView mNoteListView;
|
||||
private NoteAdapter mNoteAdapter;
|
||||
private List<Note> mNoteList;
|
||||
private long mFriendId;
|
||||
private String mFriendUsername;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_friend_note_list);
|
||||
|
||||
// 获取好友信息
|
||||
mFriendId = getIntent().getLongExtra("friend_id", -1);
|
||||
mFriendUsername = getIntent().getStringExtra("friend_username");
|
||||
|
||||
if (mFriendId == -1 || mFriendUsername == null) {
|
||||
Toast.makeText(this, "好友信息错误", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
// 设置ActionBar
|
||||
ActionBar actionBar = getActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
actionBar.setTitle(mFriendUsername + "的公开便签");
|
||||
}
|
||||
|
||||
// 初始化ListView
|
||||
mNoteListView = findViewById(R.id.friend_note_list);
|
||||
mNoteList = new ArrayList<>();
|
||||
mNoteAdapter = new NoteAdapter(this, mNoteList);
|
||||
mNoteListView.setAdapter(mNoteAdapter);
|
||||
|
||||
// 设置ListView点击事件
|
||||
mNoteListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
Note note = mNoteList.get(position);
|
||||
// 启动查看便签详情的活动
|
||||
Intent intent = new Intent(FriendNoteListActivity.this, FriendNoteEditActivity.class);
|
||||
intent.putExtra(Intent.EXTRA_UID, note.id);
|
||||
intent.putExtra("friend_id", mFriendId);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
// 加载好友的公开便签
|
||||
loadFriendNotes();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
// 重新加载好友便签
|
||||
loadFriendNotes();
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载好友的公开便签
|
||||
*/
|
||||
private void loadFriendNotes() {
|
||||
try {
|
||||
mNoteList.clear();
|
||||
|
||||
// 查询好友的所有公开便签
|
||||
String[] projection = {
|
||||
NoteColumns.ID,
|
||||
NoteColumns.TITLE,
|
||||
NoteColumns.SNIPPET,
|
||||
NoteColumns.MODIFIED_DATE,
|
||||
NoteColumns.TYPE,
|
||||
NoteColumns.PINNED,
|
||||
NoteColumns.LOCKED,
|
||||
NoteColumns.PUBLIC
|
||||
};
|
||||
|
||||
String selection = NoteColumns.USER_ID + " = ? AND " + NoteColumns.PUBLIC + " = 1 AND " + NoteColumns.PARENT_ID + " <> " + Notes.ID_TRASH_FOLER;
|
||||
String[] selectionArgs = {String.valueOf(mFriendId)};
|
||||
|
||||
Cursor cursor = null;
|
||||
try {
|
||||
cursor = getContentResolver().query(
|
||||
Notes.CONTENT_NOTE_URI,
|
||||
projection,
|
||||
selection,
|
||||
selectionArgs,
|
||||
NoteColumns.PINNED + " DESC, " + NoteColumns.MODIFIED_DATE + " DESC"
|
||||
);
|
||||
|
||||
if (cursor != null) {
|
||||
while (cursor.moveToNext()) {
|
||||
long id = cursor.getLong(cursor.getColumnIndexOrThrow(NoteColumns.ID));
|
||||
String title = cursor.getString(cursor.getColumnIndexOrThrow(NoteColumns.TITLE));
|
||||
String content = cursor.getString(cursor.getColumnIndexOrThrow(NoteColumns.SNIPPET));
|
||||
long modifiedDate = cursor.getLong(cursor.getColumnIndexOrThrow(NoteColumns.MODIFIED_DATE));
|
||||
int type = cursor.getInt(cursor.getColumnIndexOrThrow(NoteColumns.TYPE));
|
||||
int pinned = cursor.getInt(cursor.getColumnIndexOrThrow(NoteColumns.PINNED));
|
||||
int locked = cursor.getInt(cursor.getColumnIndexOrThrow(NoteColumns.LOCKED));
|
||||
int isPublic = cursor.getInt(cursor.getColumnIndexOrThrow(NoteColumns.PUBLIC));
|
||||
|
||||
mNoteList.add(new Note(id, title, content, modifiedDate, type, pinned, locked, isPublic));
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Toast.makeText(this, "查询好友便签失败: " + e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
} finally {
|
||||
if (cursor != null) {
|
||||
cursor.close();
|
||||
}
|
||||
}
|
||||
|
||||
// 通知适配器数据变化
|
||||
mNoteAdapter.notifyDataSetChanged();
|
||||
|
||||
// 如果没有公开便签,显示提示
|
||||
if (mNoteList.isEmpty()) {
|
||||
Toast.makeText(this, mFriendUsername + "没有公开的便签", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Toast.makeText(this, "加载好友便签失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 便签实体类
|
||||
*/
|
||||
private static class Note {
|
||||
long id;
|
||||
String title;
|
||||
String content;
|
||||
long modifiedDate;
|
||||
int type;
|
||||
int pinned;
|
||||
int locked;
|
||||
int isPublic;
|
||||
|
||||
Note(long id, String title, String content, long modifiedDate, int type, int pinned, int locked, int isPublic) {
|
||||
this.id = id;
|
||||
this.title = title;
|
||||
this.content = content;
|
||||
this.modifiedDate = modifiedDate;
|
||||
this.type = type;
|
||||
this.pinned = pinned;
|
||||
this.locked = locked;
|
||||
this.isPublic = isPublic;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 便签列表适配器
|
||||
*/
|
||||
private static class NoteAdapter extends BaseAdapter {
|
||||
private Activity mActivity;
|
||||
private List<Note> mNoteList;
|
||||
private LayoutInflater mInflater;
|
||||
|
||||
NoteAdapter(Activity activity, List<Note> noteList) {
|
||||
mActivity = activity;
|
||||
mNoteList = noteList;
|
||||
mInflater = LayoutInflater.from(activity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mNoteList.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position) {
|
||||
return mNoteList.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
ViewHolder holder;
|
||||
if (convertView == null) {
|
||||
convertView = mInflater.inflate(R.layout.note_item, parent, false);
|
||||
holder = new ViewHolder();
|
||||
holder.titleTextView = convertView.findViewById(R.id.tv_title);
|
||||
holder.modifiedDateTextView = convertView.findViewById(R.id.tv_time);
|
||||
holder.pinnedImageView = convertView.findViewById(R.id.iv_alert_icon);
|
||||
holder.lockedImageView = convertView.findViewById(R.id.iv_lock_icon);
|
||||
holder.publicImageView = convertView.findViewById(R.id.iv_public_icon);
|
||||
convertView.setTag(holder);
|
||||
} else {
|
||||
holder = (ViewHolder) convertView.getTag();
|
||||
}
|
||||
|
||||
Note note = mNoteList.get(position);
|
||||
// 显示标题,如果标题为空则显示内容摘要
|
||||
String displayText;
|
||||
if (note.title != null && !note.title.isEmpty()) {
|
||||
displayText = note.title;
|
||||
} else {
|
||||
displayText = note.content;
|
||||
}
|
||||
holder.titleTextView.setText(displayText);
|
||||
holder.modifiedDateTextView.setText(android.text.format.DateUtils.formatDateTime(
|
||||
mActivity, note.modifiedDate,
|
||||
android.text.format.DateUtils.FORMAT_SHOW_DATE |
|
||||
android.text.format.DateUtils.FORMAT_NUMERIC_DATE |
|
||||
android.text.format.DateUtils.FORMAT_SHOW_TIME));
|
||||
|
||||
// 设置置顶图标
|
||||
holder.pinnedImageView.setVisibility(note.pinned == 1 ? View.VISIBLE : View.GONE);
|
||||
|
||||
// 设置锁定图标
|
||||
holder.lockedImageView.setVisibility(note.locked == 1 ? View.VISIBLE : View.GONE);
|
||||
|
||||
// 设置公开图标
|
||||
holder.publicImageView.setVisibility(note.isPublic == 1 ? View.VISIBLE : View.GONE);
|
||||
|
||||
return convertView;
|
||||
}
|
||||
|
||||
private static class ViewHolder {
|
||||
TextView titleTextView;
|
||||
TextView modifiedDateTextView;
|
||||
ImageView pinnedImageView;
|
||||
ImageView lockedImageView;
|
||||
ImageView publicImageView;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(android.view.MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
// 返回上一级活动
|
||||
finish();
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package net.micode.notes.ui;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.animation.AlphaAnimation;
|
||||
import android.view.animation.Animation;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import net.micode.notes.R;
|
||||
|
||||
public class SplashActivity extends Activity {
|
||||
|
||||
private static final int SPLASH_DISPLAY_DURATION = 2000; // 2秒
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_splash);
|
||||
|
||||
// 找到小米logo容器
|
||||
LinearLayout miLogo = findViewById(R.id.mi_logo);
|
||||
|
||||
// 创建淡入淡出动画
|
||||
AlphaAnimation animation = new AlphaAnimation(0.0f, 1.0f);
|
||||
animation.setDuration(1500); // 1.5秒
|
||||
animation.setAnimationListener(new Animation.AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animation animation) {
|
||||
// 动画开始时的回调
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animation animation) {
|
||||
// 动画结束后跳转到主界面
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Intent mainIntent = new Intent(SplashActivity.this, NotesListActivity.class);
|
||||
SplashActivity.this.startActivity(mainIntent);
|
||||
SplashActivity.this.finish();
|
||||
}
|
||||
}, 500); // 延迟500毫秒后跳转
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animation animation) {
|
||||
// 动画重复时的回调
|
||||
}
|
||||
});
|
||||
|
||||
// 应用动画到小米logo
|
||||
miLogo.startAnimation(animation);
|
||||
}
|
||||
}
|
||||