diff --git a/src/Notes-master/assets/font/FZSTK.TTF b/src/Notes-master/assets/font/FZSTK.TTF
new file mode 100644
index 0000000..407d370
Binary files /dev/null and b/src/Notes-master/assets/font/FZSTK.TTF differ
diff --git a/src/Notes-master/assets/font/SIMYOU.TTF b/src/Notes-master/assets/font/SIMYOU.TTF
new file mode 100644
index 0000000..933b9d3
Binary files /dev/null and b/src/Notes-master/assets/font/SIMYOU.TTF differ
diff --git a/src/Notes-master/assets/font/STLITI.TTF b/src/Notes-master/assets/font/STLITI.TTF
new file mode 100644
index 0000000..8ede20e
Binary files /dev/null and b/src/Notes-master/assets/font/STLITI.TTF differ
diff --git a/src/Notes-master/assets/font/STXINGKA.TTF b/src/Notes-master/assets/font/STXINGKA.TTF
new file mode 100644
index 0000000..53439a2
Binary files /dev/null and b/src/Notes-master/assets/font/STXINGKA.TTF differ
diff --git a/src/Notes-master/assets/font/simfang.ttf b/src/Notes-master/assets/font/simfang.ttf
new file mode 100644
index 0000000..68334e2
Binary files /dev/null and b/src/Notes-master/assets/font/simfang.ttf differ
diff --git a/src/Notes-master/assets/font/simhei.ttf b/src/Notes-master/assets/font/simhei.ttf
new file mode 100644
index 0000000..5bd4687
Binary files /dev/null and b/src/Notes-master/assets/font/simhei.ttf differ
diff --git a/src/Notes-master/res/layout/dialog_edit_text.xml b/src/Notes-master/res/layout/dialog_edit_text.xml
index 361b39a..677719b 100644
--- a/src/Notes-master/res/layout/dialog_edit_text.xml
+++ b/src/Notes-master/res/layout/dialog_edit_text.xml
@@ -14,10 +14,63 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
\ No newline at end of file
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:gravity="center_vertical">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Notes-master/res/layout/note_item.xml b/src/Notes-master/res/layout/note_item.xml
index d541f6a..8875507 100644
--- a/src/Notes-master/res/layout/note_item.xml
+++ b/src/Notes-master/res/layout/note_item.xml
@@ -17,6 +17,7 @@
@@ -75,4 +76,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|right"/>
+
+
diff --git a/src/Notes-master/res/menu/note_edit.xml b/src/Notes-master/res/menu/note_edit.xml
index 60693c7..7b62e80 100644
--- a/src/Notes-master/res/menu/note_edit.xml
+++ b/src/Notes-master/res/menu/note_edit.xml
@@ -62,5 +62,4 @@
android:id="@+id/menu_font_select"
android:title="@string/menu_font_style" />
-
\ No newline at end of file
diff --git a/src/Notes-master/src/net/micode/notes/tool/.DataUtils.java.swp b/src/Notes-master/src/net/micode/notes/tool/.DataUtils.java.swp
new file mode 100644
index 0000000..3edf778
Binary files /dev/null and b/src/Notes-master/src/net/micode/notes/tool/.DataUtils.java.swp differ
diff --git a/src/Notes-master/src/net/micode/notes/ui/NoteEditActivity.java b/src/Notes-master/src/net/micode/notes/ui/NoteEditActivity.java
index 8e49571..9b7b4ec 100644
--- a/src/Notes-master/src/net/micode/notes/ui/NoteEditActivity.java
+++ b/src/Notes-master/src/net/micode/notes/ui/NoteEditActivity.java
@@ -54,7 +54,7 @@ import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
-
+import android.graphics.Typeface;
import net.micode.notes.R;
import net.micode.notes.data.Notes;
import net.micode.notes.data.Notes.TextNote;
@@ -77,7 +77,10 @@ import java.util.regex.Pattern;
public class NoteEditActivity extends Activity implements OnClickListener,
NoteSettingChangedListener, OnTextViewChangeListener {
+ private AlertDialog alertDialog2;
private class HeadViewHolder {
+
+
public TextView tvModified;
public ImageView ivAlertIcon;
@@ -396,6 +399,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
}
@Override
+
public boolean dispatchTouchEvent(MotionEvent ev) {
if (mNoteBgColorSelector.getVisibility() == View.VISIBLE
&& !inRangeOfView(mNoteBgColorSelector, ev)) {
@@ -410,6 +414,56 @@ public class NoteEditActivity extends Activity implements OnClickListener,
}
return super.dispatchTouchEvent(ev);
}
+ public void showSingleAlertDiglog(){
+ final String[] items = {"方正舒体","仿宋","黑体","隶书","行楷","幼圆"};
+ AlertDialog.Builder alertBuilder = new AlertDialog.Builder(this);
+ alertBuilder.setTitle("字体选择");
+ alertBuilder.setSingleChoiceItems(items, 0, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int i) {
+ switch(i){
+ case 0:
+ Typeface typeface0 = Typeface.createFromAsset(getAssets(),"font/FZSTK.TTF");
+ mNoteEditor.setTypeface(typeface0);
+ break;
+ case 1:
+ Typeface typeface1 = Typeface.createFromAsset(getAssets(),"font/SIMYOU.TTF");
+ mNoteEditor.setTypeface(typeface1);
+ break;
+ case 2:
+ Typeface typeface2 = Typeface.createFromAsset(getAssets(),"font/STLITI.TTF");
+ mNoteEditor.setTypeface(typeface2);
+ break;
+ case 3:
+ Typeface typeface3 = Typeface.createFromAsset(getAssets(),"font/STXINGKA.TTF");
+ mNoteEditor.setTypeface(typeface3);
+ break;
+ case 4:
+ Typeface typeface4 = Typeface.createFromAsset(getAssets(),"font/simfang.ttf");
+ mNoteEditor.setTypeface(typeface4);
+ break;
+ case 5:
+ Typeface typeface5 = Typeface.createFromAsset(getAssets(),"font/simhei.ttf");
+ mNoteEditor.setTypeface(typeface5);
+ break;
+ }
+ }
+ });
+ alertBuilder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int i) {
+ alertDialog2.dismiss();
+ }
+ });
+ alertBuilder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int i) {
+ alertDialog2.dismiss();
+ }
+ });
+ alertDialog2 = alertBuilder.create();
+ alertDialog2.show();
+ }
private boolean inRangeOfView(View view, MotionEvent ev) {
int []location = new int[2];
@@ -635,6 +689,9 @@ public class NoteEditActivity extends Activity implements OnClickListener,
case R.id.top:
mWorkingNote.setTop((mWorkingNote.getTopId()) == 1 ? "0" : "1");
break;
+ case R.id.menu_font_select:
+ showSingleAlertDiglog();
+ break;
default:
break;
}