Compare commits
2 Commits
fec99da20f
...
1c70e3bfa3
Author | SHA1 | Date |
---|---|---|
|
1c70e3bfa3 | 2 years ago |
|
4a6219c302 | 2 years ago |
After Width: | Height: | Size: 256 KiB |
@ -0,0 +1,45 @@
|
|||||||
|
package cc.liuyx.note.activity;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.preference.PreferenceManager;
|
||||||
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.v7.widget.Toolbar;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.Switch;
|
||||||
|
|
||||||
|
import com.example.atry.R;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public class AboutActivity extends BaseActivity {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_about);
|
||||||
|
|
||||||
|
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
|
||||||
|
Intent intent = getIntent();
|
||||||
|
boolean night_change;
|
||||||
|
if (intent.getExtras() != null)
|
||||||
|
night_change = intent.getBooleanExtra("night_change", false);
|
||||||
|
else night_change = false;
|
||||||
|
|
||||||
|
Toolbar myToolbar = (Toolbar) findViewById(R.id.my_toolbar);
|
||||||
|
setSupportActionBar(myToolbar);
|
||||||
|
Objects.requireNonNull(getSupportActionBar()).setHomeButtonEnabled(true);
|
||||||
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
|
if (isNightMode())
|
||||||
|
myToolbar.setNavigationIcon(getDrawable(R.drawable.ic_more));
|
||||||
|
else myToolbar.setNavigationIcon(getDrawable(R.drawable.ic_more));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void needRefresh() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -1,63 +0,0 @@
|
|||||||
@startuml
|
|
||||||
|
|
||||||
title __ADAPTER's Class Diagram__\n
|
|
||||||
|
|
||||||
namespace cc.liuyx.note {
|
|
||||||
namespace adapter {
|
|
||||||
class cc.liuyx.note.adapter.NoteAdapter {
|
|
||||||
- backList : List<Note>
|
|
||||||
- mContext : Context
|
|
||||||
- noteList : List<Note>
|
|
||||||
+ NoteAdapter()
|
|
||||||
+ getCount()
|
|
||||||
+ getFilter()
|
|
||||||
+ getItem()
|
|
||||||
+ getItemId()
|
|
||||||
+ getView()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
namespace cc.liuyx.note {
|
|
||||||
namespace adapter {
|
|
||||||
class cc.liuyx.note.adapter.NoteAdapter.MyFilter {
|
|
||||||
# performFiltering()
|
|
||||||
# publishResults()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
namespace cc.liuyx.note {
|
|
||||||
namespace adapter {
|
|
||||||
class cc.liuyx.note.adapter.TagAdapter {
|
|
||||||
- context : Context
|
|
||||||
- numList : List<Integer>
|
|
||||||
- tagList : List<String>
|
|
||||||
+ TagAdapter()
|
|
||||||
+ getCount()
|
|
||||||
+ getItem()
|
|
||||||
+ getItemId()
|
|
||||||
+ getView()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
cc.liuyx.note.adapter.NoteAdapter .up.|> android.widget.Filterable
|
|
||||||
cc.liuyx.note.adapter.NoteAdapter -up-|> android.widget.BaseAdapter
|
|
||||||
cc.liuyx.note.adapter.NoteAdapter o-- cc.liuyx.note.adapter.NoteAdapter.MyFilter : mFilter
|
|
||||||
cc.liuyx.note.adapter.NoteAdapter +-down- cc.liuyx.note.adapter.NoteAdapter.MyFilter
|
|
||||||
cc.liuyx.note.adapter.NoteAdapter.MyFilter -up-|> android.widget.Filter
|
|
||||||
cc.liuyx.note.adapter.TagAdapter -up-|> android.widget.BaseAdapter
|
|
||||||
|
|
||||||
|
|
||||||
right footer
|
|
||||||
|
|
||||||
|
|
||||||
PlantUML diagram generated by SketchIt! (https://bitbucket.org/pmesmeur/sketch.it)
|
|
||||||
For more information about this tool, please contact philippe.mesmeur@gmail.com
|
|
||||||
endfooter
|
|
||||||
|
|
||||||
@enduml
|
|
@ -1,329 +0,0 @@
|
|||||||
package cc.liuyx.note.alarm;
|
|
||||||
|
|
||||||
import android.app.DatePickerDialog;
|
|
||||||
import android.app.TimePickerDialog;
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.support.annotation.Nullable;
|
|
||||||
import android.support.v7.app.AlertDialog;
|
|
||||||
import android.support.v7.widget.Toolbar;
|
|
||||||
import android.util.Log;
|
|
||||||
import android.view.KeyEvent;
|
|
||||||
import android.view.Menu;
|
|
||||||
import android.view.MenuItem;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.DatePicker;
|
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.TextView;
|
|
||||||
import android.widget.TimePicker;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import cc.liuyx.note.activity.BaseActivity;
|
|
||||||
|
|
||||||
import com.example.atry.R;
|
|
||||||
|
|
||||||
import java.util.Calendar;
|
|
||||||
|
|
||||||
public class EditAlarmActivity extends BaseActivity implements View.OnClickListener {
|
|
||||||
|
|
||||||
private DatePickerDialog.OnDateSetListener dateSetListener;
|
|
||||||
private TimePickerDialog.OnTimeSetListener timeSetListener;
|
|
||||||
private EditText et_title;
|
|
||||||
private EditText et;
|
|
||||||
private Button set_date;
|
|
||||||
private Button set_time;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private TextView date;
|
|
||||||
private TextView time;
|
|
||||||
private Plan plan;
|
|
||||||
private int[] dateArray = new int[3];
|
|
||||||
private int[] timeArray = new int[2];
|
|
||||||
|
|
||||||
private int openMode = 0;
|
|
||||||
private String old_title = "";
|
|
||||||
private String old_content = "";
|
|
||||||
private String old_time = "";
|
|
||||||
private long id = 0;
|
|
||||||
private boolean timeChange = false;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.edit_alarm_layout);
|
|
||||||
|
|
||||||
Toolbar myToolbar = (Toolbar) findViewById(R.id.my_toolbar);
|
|
||||||
setSupportActionBar(myToolbar);
|
|
||||||
getSupportActionBar().setHomeButtonEnabled(true);
|
|
||||||
|
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
|
|
||||||
init();
|
|
||||||
|
|
||||||
final Intent intent = getIntent();
|
|
||||||
openMode = intent.getExtras().getInt("mode", 0);
|
|
||||||
if(openMode == 1){
|
|
||||||
id = intent.getLongExtra("id", 0);
|
|
||||||
old_title = intent.getStringExtra("title");
|
|
||||||
old_content = intent.getStringExtra("content");
|
|
||||||
old_time = intent.getStringExtra("time");
|
|
||||||
et_title.setText(old_title);
|
|
||||||
et_title.setSelection(old_title.length());
|
|
||||||
et.setText(old_content);
|
|
||||||
et.setSelection(old_content.length());
|
|
||||||
|
|
||||||
String[] wholeTime = old_time.split(" ");
|
|
||||||
String[] temp = wholeTime[0].split("-");
|
|
||||||
String[] temp1 = wholeTime[1].split(":");
|
|
||||||
setDateTV(Integer.parseInt(temp[0]), Integer.parseInt(temp[1]), Integer.parseInt(temp[2]));
|
|
||||||
setTimeTV(Integer.parseInt(temp1[0]), Integer.parseInt(temp1[1]));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isNightMode()) myToolbar.setNavigationIcon(getDrawable(R.drawable.ic_keyboard_arrow_left_white_24dp));
|
|
||||||
else myToolbar.setNavigationIcon(getDrawable(R.drawable.ic_keyboard_arrow_left_black_24dp));
|
|
||||||
|
|
||||||
myToolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
if(!canBeSet()) {
|
|
||||||
Toast.makeText(EditAlarmActivity.this, "Invalid Time", Toast.LENGTH_SHORT).show();
|
|
||||||
}else if(et.getText().toString().length() + et_title.getText().toString().length() == 0 && openMode == 2){
|
|
||||||
Intent intent1 = new Intent();
|
|
||||||
intent1.putExtra("mode", -1);//nothing new happens.
|
|
||||||
setResult(RESULT_OK, intent1);
|
|
||||||
finish();//返回
|
|
||||||
overridePendingTransition(R.anim.in_lefttoright, R.anim.out_lefttoright);
|
|
||||||
}
|
|
||||||
else if (et_title.getText().toString().length() == 0) {
|
|
||||||
Toast.makeText(EditAlarmActivity.this, "Title cannot be empty", Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
isTimeChange();
|
|
||||||
Intent intent = new Intent();
|
|
||||||
if (openMode == 2) {
|
|
||||||
intent.putExtra("mode", 10); // new one plan;
|
|
||||||
intent.putExtra("title", et_title.getText().toString());
|
|
||||||
intent.putExtra("content", et.getText().toString());
|
|
||||||
intent.putExtra("time", date.getText().toString() + " " + time.getText().toString());
|
|
||||||
Log.d(TAG, date.getText().toString() + time.getText().toString());
|
|
||||||
} else {
|
|
||||||
if (et.getText().toString().equals(old_content) && et_title.getText().toString().equals(old_title) && !timeChange) {
|
|
||||||
intent.putExtra("mode", -1); // edit nothing
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
intent.putExtra("mode", 11); //edit the content
|
|
||||||
intent.putExtra("title", et_title.getText().toString());
|
|
||||||
intent.putExtra("content", et.getText().toString());
|
|
||||||
intent.putExtra("time", date.getText().toString() + " " + time.getText().toString());
|
|
||||||
intent.putExtra("id", id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setResult(RESULT_OK, intent);
|
|
||||||
finish();//返回
|
|
||||||
overridePendingTransition(R.anim.in_lefttoright, R.anim.out_lefttoright);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
|
||||||
|
|
||||||
if( keyCode== KeyEvent.KEYCODE_HOME){
|
|
||||||
return true;
|
|
||||||
} else if( keyCode== KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN){
|
|
||||||
if(!canBeSet()) {
|
|
||||||
Toast.makeText(EditAlarmActivity.this, "Invalid Time", Toast.LENGTH_SHORT).show();
|
|
||||||
}else if(et.getText().toString().length() + et_title.getText().toString().length() == 0 && openMode == 2){
|
|
||||||
Intent intent1 = new Intent();
|
|
||||||
intent1.putExtra("mode", -1);//nothing new happens.
|
|
||||||
setResult(RESULT_OK, intent1);
|
|
||||||
finish();//返回
|
|
||||||
overridePendingTransition(R.anim.in_lefttoright, R.anim.out_lefttoright);
|
|
||||||
}
|
|
||||||
else if (et_title.getText().toString().length() == 0) {
|
|
||||||
Toast.makeText(EditAlarmActivity.this, "Title cannot be empty", Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
isTimeChange();
|
|
||||||
Intent intent = new Intent();
|
|
||||||
if (openMode == 2) {
|
|
||||||
intent.putExtra("mode", 10); // new one plan;
|
|
||||||
intent.putExtra("title", et_title.getText().toString());
|
|
||||||
intent.putExtra("content", et.getText().toString());
|
|
||||||
intent.putExtra("time", date.getText().toString() + " " + time.getText().toString());
|
|
||||||
Log.d(TAG, date.getText().toString() + time.getText().toString());
|
|
||||||
} else {
|
|
||||||
if (et.getText().toString().equals(old_content) && et_title.getText().toString().equals(old_title) && !timeChange) {
|
|
||||||
intent.putExtra("mode", -1); // edit nothing
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
intent.putExtra("mode", 11); //edit the content
|
|
||||||
intent.putExtra("title", et_title.getText().toString());
|
|
||||||
intent.putExtra("content", et.getText().toString());
|
|
||||||
intent.putExtra("time", date.getText().toString() + " " + time.getText().toString());
|
|
||||||
intent.putExtra("id", id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setResult(RESULT_OK, intent);
|
|
||||||
finish();//返回
|
|
||||||
overridePendingTransition(R.anim.in_lefttoright, R.anim.out_lefttoright);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return super.onKeyDown(keyCode, event);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
|
||||||
getMenuInflater().inflate(R.menu.edit_menu, menu);
|
|
||||||
return super.onCreateOptionsMenu(menu);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
|
||||||
final Intent intent = new Intent();
|
|
||||||
switch (item.getItemId()){
|
|
||||||
case R.id.delete:
|
|
||||||
new AlertDialog.Builder(EditAlarmActivity.this)
|
|
||||||
.setMessage("Delete this plan ?")
|
|
||||||
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
if(openMode == 2){
|
|
||||||
intent.putExtra("mode", -1); // delete the plan
|
|
||||||
setResult(RESULT_OK, intent);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
intent.putExtra("mode", 12); // delete the plan
|
|
||||||
intent.putExtra("id", id);
|
|
||||||
setResult(RESULT_OK, intent);
|
|
||||||
}
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
}).setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
dialog.dismiss();
|
|
||||||
}
|
|
||||||
}).create().show();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return super.onOptionsItemSelected(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void needRefresh() {
|
|
||||||
setNightMode();
|
|
||||||
startActivity(new Intent(this, EditAlarmActivity.class));
|
|
||||||
overridePendingTransition(R.anim.night_switch, R.anim.night_switch_over);
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void init(){
|
|
||||||
|
|
||||||
plan = new Plan();
|
|
||||||
dateArray[0] = plan.getYear();
|
|
||||||
dateArray[1] = plan.getMonth() + 1;
|
|
||||||
dateArray[2] = plan.getDay();
|
|
||||||
timeArray[0] = plan.getHour();
|
|
||||||
timeArray[1] = plan.getMinute();
|
|
||||||
|
|
||||||
et_title = findViewById(R.id.et_title);
|
|
||||||
et = findViewById(R.id.et);
|
|
||||||
set_date = findViewById(R.id.set_date);
|
|
||||||
set_time = findViewById(R.id.set_time);
|
|
||||||
date = findViewById(R.id.date);
|
|
||||||
time = findViewById(R.id.time);
|
|
||||||
|
|
||||||
//initialize two textviews
|
|
||||||
setDateTV(dateArray[0], dateArray[1], dateArray[2]);
|
|
||||||
setTimeTV((timeArray[1]>54? timeArray[0]+1 : timeArray[0]), (timeArray[1]+5)%60);
|
|
||||||
Log.d(TAG, "init: "+dateArray[1]);
|
|
||||||
|
|
||||||
set_date.setOnClickListener(this);
|
|
||||||
set_time.setOnClickListener(this);
|
|
||||||
|
|
||||||
dateSetListener = new DatePickerDialog.OnDateSetListener() {
|
|
||||||
@Override
|
|
||||||
public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {
|
|
||||||
setDateTV(year, month+1, dayOfMonth);
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
|
||||||
timeSetListener = new TimePickerDialog.OnTimeSetListener() {
|
|
||||||
@Override
|
|
||||||
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
|
|
||||||
setTimeTV(hourOfDay, minute);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setDateTV(int y, int m, int d){
|
|
||||||
//update tv and dateArray
|
|
||||||
String temp = y + "-";
|
|
||||||
if(m<10) temp += "0";
|
|
||||||
temp += (m + "-");
|
|
||||||
if(d<10) temp +="0";
|
|
||||||
temp += d;
|
|
||||||
date.setText(temp);
|
|
||||||
dateArray[0] = y;
|
|
||||||
dateArray[1] = m;
|
|
||||||
dateArray[2] = d;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setTimeTV(int h, int m){
|
|
||||||
//update tv and timeArra
|
|
||||||
String temp = "";
|
|
||||||
if(h<10) temp += "0";
|
|
||||||
temp += (h + ":");
|
|
||||||
if(m<10) temp += "0";
|
|
||||||
temp += m;
|
|
||||||
time.setText(temp);
|
|
||||||
timeArray[0] = h;
|
|
||||||
timeArray[1] = m;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
switch (v.getId()){
|
|
||||||
case R.id.set_date: //choose day
|
|
||||||
DatePickerDialog dialog = new DatePickerDialog(EditAlarmActivity.this,
|
|
||||||
(isNightMode()?R.style.NightDialogTheme :R.style.DayDialogTheme), dateSetListener,
|
|
||||||
dateArray[0], dateArray[1] - 1, dateArray[2]);
|
|
||||||
//dialog.getWindow().setBackgroundDrawable(new ColorDrawable((isNightMode()?Color.BLACK : Color.WHITE)));
|
|
||||||
dialog.show();
|
|
||||||
break;
|
|
||||||
case R.id.set_time://choose hour and minute
|
|
||||||
TimePickerDialog dialog1 = new TimePickerDialog(EditAlarmActivity.this,
|
|
||||||
(isNightMode()?R.style.NightDialogTheme :R.style.DayDialogTheme), timeSetListener,
|
|
||||||
timeArray[0], timeArray[1], true);
|
|
||||||
//dialog1.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
|
||||||
dialog1.show();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void isTimeChange(){
|
|
||||||
String newTime = date.getText().toString() + " " + time.getText().toString();
|
|
||||||
if(!newTime.equals(old_time)) timeChange = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean canBeSet(){
|
|
||||||
Calendar calendar = Calendar.getInstance();
|
|
||||||
calendar.set(dateArray[0], dateArray[1] - 1, dateArray[2], timeArray[0], timeArray[1]);
|
|
||||||
Calendar cur = Calendar.getInstance();
|
|
||||||
Log.d(TAG, "canBeSet: " + cur.getTime().toString() + calendar.getTime().toString());
|
|
||||||
if(cur.before(calendar)) return true;
|
|
||||||
else {
|
|
||||||
Toast.makeText(this, "Invalid Time", Toast.LENGTH_SHORT).show();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -1,4 +1,4 @@
|
|||||||
package cc.liuyx.note.alarm;
|
package cc.liuyx.note.entity;
|
||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 11 KiB |
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:top="20dp">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="?attr/lvBackground" />
|
||||||
|
<corners android:radius="15dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item android:bottom="10dp">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="?attr/tvBackground" />
|
||||||
|
<padding android:bottom="20dp"
|
||||||
|
android:top="20dp"
|
||||||
|
android:right="20dp"
|
||||||
|
android:left="20dp"/>
|
||||||
|
<corners android:radius="15dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#ffffff" />
|
||||||
|
<padding
|
||||||
|
android:left="15dp"
|
||||||
|
android:top="12dp"
|
||||||
|
android:right="15dp"
|
||||||
|
android:bottom="12dp" />
|
||||||
|
<corners android:radius="10dp"/>
|
||||||
|
</shape>
|
@ -0,0 +1,97 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout 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:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="?attr/lvBackground"
|
||||||
|
tools:context="cc.liuyx.note.activity.AboutActivity">
|
||||||
|
|
||||||
|
<android.support.v7.widget.Toolbar
|
||||||
|
android:id="@+id/my_toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
android:background="?attr/colorPrimary"
|
||||||
|
android:elevation="4dp"
|
||||||
|
app:titleTextColor="?attr/titleColor"
|
||||||
|
app:title="关于我"
|
||||||
|
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
|
||||||
|
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="25dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="128dp"
|
||||||
|
android:layout_height="128dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:src="@mipmap/ic_avatar" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/sentence"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:layout_marginTop="18dp"
|
||||||
|
android:layout_marginBottom="20dp"
|
||||||
|
android:background="@drawable/shape_text"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="#303F9F"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/contact"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:background="@drawable/shape_text"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_marginBottom="10dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/github"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:background="@drawable/shape_text"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/blog"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:background="@drawable/shape_text"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/qq"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:background="@drawable/shape_text"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/email"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:background="@drawable/shape_text"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@color/ic_avatar_background"/>
|
||||||
|
<foreground android:drawable="@mipmap/ic_avatar_foreground"/>
|
||||||
|
</adaptive-icon>
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@color/ic_avatar_background"/>
|
||||||
|
<foreground android:drawable="@mipmap/ic_avatar_foreground"/>
|
||||||
|
</adaptive-icon>
|
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 9.2 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 43 KiB |
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="ic_avatar_background">#FFFFFF</color>
|
||||||
|
</resources>
|