Simple Notepad Application for Android OS
Revision | 11bb0940a3a6be85e0359f68304ce05792a673af (tree) |
---|---|
Time | 2012-08-28 18:37:46 |
Author | Masahiko, SAWAI <say@user...> |
Commiter | Masahiko, SAWAI |
ノートのロック状態の変更用UIを ToggleButton から Button とダイアログに変更
@@ -4,11 +4,12 @@ | ||
4 | 4 | !! notepad-app |
5 | 5 | |
6 | 6 | * テンプレートの書式を変更 |
7 | -** #{date} #{time} など? | |
7 | +** '#{date}' '#{time}' など? | |
8 | 8 | |
9 | -* ノート編集時のロックを ToggleButton から Button + ダイアログに変更 | |
10 | -** ToggleButton はキーボードでオンオフ操作できない? | |
11 | -** ロック解除操作が簡単すぎるのはよくない? | |
9 | +#* ノート編集時のロックを ToggleButton から Button + ダイアログに変更 | |
10 | +#** ToggleButton はキーボードでオンオフ操作できない | |
11 | +#** ロック解除操作が簡単すぎるのはよくない | |
12 | +** ロック、アンロックメッセージを作成 | |
12 | 13 | |
13 | 14 | * ノート一覧画面の本文の表示行数を設定変更可能にする |
14 | 15 |
@@ -7,30 +7,47 @@ | ||
7 | 7 | android:layout_height="fill_parent" |
8 | 8 | android:orientation="vertical" |
9 | 9 | > |
10 | - <LinearLayout | |
10 | + <FrameLayout | |
11 | 11 | android:layout_width="fill_parent" |
12 | 12 | android:layout_height="wrap_content" |
13 | 13 | android:layout_weight="0" |
14 | - android:orientation="horizontal" | |
15 | 14 | > |
16 | 15 | <EditText |
17 | 16 | android:id="@+id/note_title_edittext" |
18 | - android:layout_width="wrap_content" | |
17 | + android:layout_width="fill_parent" | |
19 | 18 | android:layout_height="wrap_content" |
20 | - android:layout_weight="1" | |
19 | + android:layout_weight="0" | |
20 | + android:layout_gravity="bottom" | |
21 | + android:paddingRight="44dip" | |
21 | 22 | android:lines="1" |
22 | 23 | android:inputType="text" |
23 | 24 | android:hint="@string/title" |
24 | 25 | /> |
25 | - <ToggleButton | |
26 | - android:id="@+id/note_title_locked_togglebutton" | |
26 | + <ImageButton | |
27 | + android:id="@+id/note_title_lock_button" | |
28 | + android:layout_width="wrap_content" | |
29 | + android:layout_height="wrap_content" | |
30 | + android:layout_weight="0" | |
31 | + android:layout_gravity="right|center_vertical" | |
32 | + android:layout_margin="4dip" | |
33 | + android:padding="4dip" | |
34 | + android:src="?attr/ic_unlock" | |
35 | + android:background="@drawable/actionbar_button_bg" | |
36 | + android:visibility="visible" | |
37 | + /> | |
38 | + <ImageButton | |
39 | + android:id="@+id/note_title_unlock_button" | |
27 | 40 | android:layout_width="wrap_content" |
28 | 41 | android:layout_height="wrap_content" |
29 | 42 | android:layout_weight="0" |
30 | - android:textOn="@string/locked" | |
31 | - android:textOff="@string/unlocked" | |
43 | + android:layout_gravity="right|center_vertical" | |
44 | + android:layout_margin="4dip" | |
45 | + android:padding="4dip" | |
46 | + android:src="?attr/ic_lock" | |
47 | + android:background="@drawable/actionbar_button_bg" | |
48 | + android:visibility="gone" | |
32 | 49 | /> |
33 | - </LinearLayout> | |
50 | + </FrameLayout> | |
34 | 51 | |
35 | 52 | <EditText |
36 | 53 | android:id="@+id/note_content_edittext" |
@@ -11,6 +11,7 @@ | ||
11 | 11 | <string name="title">Title</string> |
12 | 12 | <string name="text">Text</string> |
13 | 13 | <string name="lock">Lock</string> |
14 | + <string name="unlock">Unlock</string> | |
14 | 15 | <string name="name">Name</string> |
15 | 16 | <string name="locked">Locked</string> |
16 | 17 | <string name="unlocked">Unlocked</string> |
@@ -24,8 +24,11 @@ | ||
24 | 24 | package org.routine_work.notepad; |
25 | 25 | |
26 | 26 | import android.app.Activity; |
27 | +import android.app.AlertDialog; | |
28 | +import android.app.Dialog; | |
27 | 29 | import android.content.ContentResolver; |
28 | 30 | import android.content.ContentValues; |
31 | +import android.content.DialogInterface; | |
29 | 32 | import android.content.Intent; |
30 | 33 | import android.database.Cursor; |
31 | 34 | import android.net.Uri; |
@@ -34,13 +37,10 @@ import android.os.Parcelable; | ||
34 | 37 | import android.text.TextUtils; |
35 | 38 | import android.view.*; |
36 | 39 | import android.view.View.OnFocusChangeListener; |
37 | -import android.widget.CompoundButton; | |
38 | -import android.widget.CompoundButton.OnCheckedChangeListener; | |
39 | 40 | import android.widget.EditText; |
40 | 41 | import android.widget.ImageButton; |
41 | 42 | import android.widget.TextView; |
42 | 43 | import android.widget.Toast; |
43 | -import android.widget.ToggleButton; | |
44 | 44 | import org.routine_work.notepad.model.Note; |
45 | 45 | import org.routine_work.notepad.prefs.NotepadPreferenceUtils; |
46 | 46 | import org.routine_work.notepad.provider.NoteStore; |
@@ -55,13 +55,15 @@ import org.routine_work.utils.Log; | ||
55 | 55 | */ |
56 | 56 | public class NoteDetailActivity extends Activity |
57 | 57 | implements View.OnClickListener, OnFocusChangeListener, |
58 | - OnCheckedChangeListener, NotepadConstants | |
58 | + DialogInterface.OnClickListener, NotepadConstants | |
59 | 59 | { |
60 | 60 | |
61 | + private static final String LOG_TAG = "simple-notepad"; | |
61 | 62 | private static final String SAVE_KEY_CURRENT_NOTE_URI = "currentNoteUri"; |
62 | 63 | private static final String SAVE_KEY_CURRENT_ACTION = "currentAction"; |
63 | 64 | private static final String SAVE_KEY_CURRENT_NOTE = "currentNote"; |
64 | - private static final String LOG_TAG = "simple-notepad"; | |
65 | + private static final int DIALOG_ID_LOCK = 0; | |
66 | + private static final int DIALOG_ID_UNLOCK = 1; | |
65 | 67 | // ActionBar items |
66 | 68 | private ViewGroup actionBarContainer; |
67 | 69 | private TextView titleTextView; |
@@ -72,12 +74,16 @@ public class NoteDetailActivity extends Activity | ||
72 | 74 | // Mode Edit |
73 | 75 | private ViewGroup noteEditContainer; |
74 | 76 | private EditText noteTitleEditText; |
75 | - private ToggleButton noteTitleLockedToggleButton; | |
77 | + private ImageButton noteTitleLockImageButton; | |
78 | + private ImageButton noteTitleUnlockImageButton; | |
76 | 79 | private EditText noteContentEditText; |
77 | 80 | // Mode View |
78 | 81 | private ViewGroup noteViewContainer; |
79 | 82 | private TextView noteTitleTextView; |
80 | 83 | private TextView noteContentTextView; |
84 | + // Dialogs | |
85 | + private Dialog lockDialog; | |
86 | + private Dialog unlockDialog; | |
81 | 87 | // data |
82 | 88 | private String currentAction; |
83 | 89 | private Uri currentNoteUri; |
@@ -104,7 +110,7 @@ public class NoteDetailActivity extends Activity | ||
104 | 110 | // ActionBar |
105 | 111 | actionBarContainer = (ViewGroup) findViewById(R.id.actionbar_container); |
106 | 112 | |
107 | - // ActionBar Buttons | |
113 | + // ActionBar Items | |
108 | 114 | titleTextView = (TextView) findViewById(R.id.title_textview); |
109 | 115 | homeImageButton = (ImageButton) findViewById(R.id.home_button); |
110 | 116 | addNewNoteImageButton = (ImageButton) findViewById(R.id.add_new_note_button); |
@@ -118,10 +124,14 @@ public class NoteDetailActivity extends Activity | ||
118 | 124 | // Edit Mode |
119 | 125 | noteEditContainer = (ViewGroup) findViewById(R.id.note_edit_container); |
120 | 126 | noteTitleEditText = (EditText) findViewById(R.id.note_title_edittext); |
121 | - noteTitleLockedToggleButton = (ToggleButton) findViewById(R.id.note_title_locked_togglebutton); | |
127 | + noteTitleLockImageButton = (ImageButton) findViewById(R.id.note_title_lock_button); | |
128 | + noteTitleUnlockImageButton = (ImageButton) findViewById(R.id.note_title_unlock_button); | |
122 | 129 | noteContentEditText = (EditText) findViewById(R.id.note_content_edittext); |
130 | + | |
123 | 131 | noteTitleEditText.setOnFocusChangeListener(this); |
124 | - noteTitleLockedToggleButton.setOnCheckedChangeListener(this); | |
132 | + noteTitleEditText.setOnClickListener(this); | |
133 | + noteTitleLockImageButton.setOnClickListener(this); | |
134 | + noteTitleUnlockImageButton.setOnClickListener(this); | |
125 | 135 | noteContentEditText.setOnFocusChangeListener(this); |
126 | 136 | |
127 | 137 | // View Mode |
@@ -208,6 +218,27 @@ public class NoteDetailActivity extends Activity | ||
208 | 218 | } |
209 | 219 | |
210 | 220 | @Override |
221 | + protected Dialog onCreateDialog(int id) | |
222 | + { | |
223 | + Dialog dialog = null; | |
224 | + Log.v(LOG_TAG, "Hello"); | |
225 | + | |
226 | + switch (id) | |
227 | + { | |
228 | + case DIALOG_ID_LOCK: | |
229 | + dialog = getLockDialog(); | |
230 | + break; | |
231 | + case DIALOG_ID_UNLOCK: | |
232 | + dialog = getUnlockDialog(); | |
233 | + break; | |
234 | + } | |
235 | + | |
236 | + Log.v(LOG_TAG, "dialog => " + dialog); | |
237 | + Log.v(LOG_TAG, "Bye"); | |
238 | + return dialog; | |
239 | + } | |
240 | + | |
241 | + @Override | |
211 | 242 | public boolean onCreateOptionsMenu(Menu menu) |
212 | 243 | { |
213 | 244 | Log.v(LOG_TAG, "Hello"); |
@@ -332,11 +363,45 @@ public class NoteDetailActivity extends Activity | ||
332 | 363 | Log.d(LOG_TAG, "Edit Button is clicked."); |
333 | 364 | startEditNoteActivity(); |
334 | 365 | break; |
366 | + case R.id.note_title_lock_button: | |
367 | + Log.d(LOG_TAG, "note_title_lock_button is clicked."); | |
368 | + showDialog(DIALOG_ID_LOCK); | |
369 | + break; | |
370 | + case R.id.note_title_unlock_button: | |
371 | + Log.d(LOG_TAG, "note_title_unlock_button is clicked."); | |
372 | + showDialog(DIALOG_ID_UNLOCK); | |
373 | + break; | |
374 | + case R.id.note_title_edittext: | |
375 | + Log.d(LOG_TAG, "note_title_edittext is clicked."); | |
376 | + noteContentEditText.clearFocus(); | |
377 | + break; | |
335 | 378 | } |
336 | 379 | |
337 | 380 | Log.v(LOG_TAG, "Bye"); |
338 | 381 | } |
339 | 382 | |
383 | + // DialogInterface.OnClickListener | |
384 | + @Override | |
385 | + public void onClick(DialogInterface dialog, int which) | |
386 | + { | |
387 | + Log.v(LOG_TAG, "Hello"); | |
388 | + Log.d(LOG_TAG, "dialog => " + dialog); | |
389 | + Log.d(LOG_TAG, "which => " + which); | |
390 | + | |
391 | + if (which == Dialog.BUTTON_POSITIVE) | |
392 | + { | |
393 | + if (dialog == getLockDialog()) | |
394 | + { | |
395 | + setNoteTitleLocked(true); | |
396 | + } | |
397 | + else if (dialog == getUnlockDialog()) | |
398 | + { | |
399 | + setNoteTitleLocked(false); | |
400 | + } | |
401 | + } | |
402 | + Log.v(LOG_TAG, "Bye"); | |
403 | + } | |
404 | + | |
340 | 405 | @Override |
341 | 406 | public boolean onKeyDown(int keyCode, KeyEvent event) |
342 | 407 | { |
@@ -370,13 +435,14 @@ public class NoteDetailActivity extends Activity | ||
370 | 435 | case R.id.note_title_edittext: |
371 | 436 | if (hasFocus) |
372 | 437 | { |
438 | + Log.d(LOG_TAG, "note_title_edittext has focus."); | |
373 | 439 | IMEUtils.showSoftKeyboardWindow(this, v); |
374 | 440 | } |
375 | 441 | break; |
376 | 442 | case R.id.note_content_edittext: |
377 | 443 | if (hasFocus) |
378 | 444 | { |
379 | - Log.d(LOG_TAG, LOG_TAG); | |
445 | + Log.d(LOG_TAG, "note_content_edittext has focus."); | |
380 | 446 | actionBarContainer.setVisibility(View.GONE); |
381 | 447 | IMEUtils.showSoftKeyboardWindow(this, v); |
382 | 448 | } |
@@ -390,16 +456,14 @@ public class NoteDetailActivity extends Activity | ||
390 | 456 | Log.v(LOG_TAG, "Bye"); |
391 | 457 | } |
392 | 458 | |
393 | - public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) | |
459 | + @Override | |
460 | + public void setTitle(int titleId) | |
394 | 461 | { |
395 | - Log.v(LOG_TAG, "Hello"); | |
396 | - switch (buttonView.getId()) | |
462 | + super.setTitle(titleId); | |
463 | + if (titleTextView != null) | |
397 | 464 | { |
398 | - case R.id.note_title_locked_togglebutton: | |
399 | - setNoteTitleEditable(!isChecked); | |
400 | - break; | |
465 | + titleTextView.setText(titleId); | |
401 | 466 | } |
402 | - Log.v(LOG_TAG, "Bye"); | |
403 | 467 | } |
404 | 468 | |
405 | 469 | @Override |
@@ -411,8 +475,8 @@ public class NoteDetailActivity extends Activity | ||
411 | 475 | if (requestCode == REQUEST_CODE_EDIT_NOTE) |
412 | 476 | { |
413 | 477 | loadNoteFromContentProvider(); |
414 | - bindNoteToViews(); | |
415 | 478 | originalNote.copyFrom(currentNote); |
479 | + updateViews(); | |
416 | 480 | } |
417 | 481 | |
418 | 482 | Log.v(LOG_TAG, "Bye"); |
@@ -433,7 +497,8 @@ public class NoteDetailActivity extends Activity | ||
433 | 497 | Log.d(LOG_TAG, "------------------------------------------------------------"); |
434 | 498 | |
435 | 499 | actionBarContainer.setVisibility(View.VISIBLE); |
436 | - // load saved note uri | |
500 | + | |
501 | + // load saved instance | |
437 | 502 | String newAction = null; |
438 | 503 | Uri newNoteUri = null; |
439 | 504 | Log.d(LOG_TAG, "savedInstanceState => " + savedInstanceState); |
@@ -513,7 +578,7 @@ public class NoteDetailActivity extends Activity | ||
513 | 578 | Log.d(LOG_TAG, "EXTRA_TITLE_LOCKED => " + extraTitleLocked); |
514 | 579 | currentNote.setTitleLocked(extraTitleLocked); |
515 | 580 | |
516 | - titleTextView.setText(R.string.add_new_note_title); | |
581 | + setTitle(R.string.add_new_note_title); | |
517 | 582 | addNewNoteImageButton.setVisibility(View.VISIBLE); |
518 | 583 | editNoteImageButton.setVisibility(View.GONE); |
519 | 584 | deleteNoteImageButton.setVisibility(View.GONE); |
@@ -555,23 +620,13 @@ public class NoteDetailActivity extends Activity | ||
555 | 620 | loadNoteFromViews(); |
556 | 621 | } |
557 | 622 | |
558 | - titleTextView.setText(R.string.edit_note_title); | |
623 | + setTitle(R.string.edit_note_title); | |
559 | 624 | addNewNoteImageButton.setVisibility(View.VISIBLE); |
560 | 625 | editNoteImageButton.setVisibility(View.GONE); |
561 | 626 | deleteNoteImageButton.setVisibility(View.GONE); |
562 | 627 | |
563 | 628 | noteEditContainer.setVisibility(View.VISIBLE); |
564 | 629 | noteViewContainer.setVisibility(View.GONE); |
565 | - | |
566 | - if (currentNote.isTitleLocked()) | |
567 | - { | |
568 | - setNoteTitleEditable(false); | |
569 | - noteContentEditText.requestFocus(); | |
570 | - } | |
571 | - else | |
572 | - { | |
573 | - noteTitleEditText.requestFocus(); | |
574 | - } | |
575 | 630 | } |
576 | 631 | else if (Intent.ACTION_VIEW.equals(newAction)) |
577 | 632 | { |
@@ -593,7 +648,7 @@ public class NoteDetailActivity extends Activity | ||
593 | 648 | currentNoteUri = newNoteUri; |
594 | 649 | loadNoteFromContentProvider(); |
595 | 650 | |
596 | - titleTextView.setText(R.string.view_note_title); | |
651 | + setTitle(R.string.view_note_title); | |
597 | 652 | addNewNoteImageButton.setVisibility(View.GONE); |
598 | 653 | editNoteImageButton.setVisibility(View.VISIBLE); |
599 | 654 | deleteNoteImageButton.setVisibility(View.VISIBLE); |
@@ -620,19 +675,18 @@ public class NoteDetailActivity extends Activity | ||
620 | 675 | currentNoteUri = newNoteUri; |
621 | 676 | loadNoteFromContentProvider(); |
622 | 677 | |
623 | - titleTextView.setText(R.string.delete_note_title); | |
678 | + setTitle(R.string.delete_note_title); | |
624 | 679 | addNewNoteImageButton.setVisibility(View.GONE); |
625 | 680 | editNoteImageButton.setVisibility(View.GONE); |
626 | 681 | deleteNoteImageButton.setVisibility(View.VISIBLE); |
627 | 682 | |
628 | 683 | noteEditContainer.setVisibility(View.GONE); |
629 | 684 | noteViewContainer.setVisibility(View.VISIBLE); |
630 | - | |
631 | 685 | } |
632 | 686 | |
633 | 687 | currentAction = newAction; |
634 | - bindNoteToViews(); | |
635 | 688 | originalNote.copyFrom(currentNote); |
689 | + updateViews(); | |
636 | 690 | |
637 | 691 | Log.d(LOG_TAG, "isFinishing() => " + isFinishing()); |
638 | 692 | Log.d(LOG_TAG, "------------------------------------------------------------"); |
@@ -847,37 +901,44 @@ public class NoteDetailActivity extends Activity | ||
847 | 901 | Log.v(LOG_TAG, "Bye"); |
848 | 902 | } |
849 | 903 | |
850 | - private void bindNoteToViews() | |
904 | + private void updateViews() | |
851 | 905 | { |
906 | + Log.v(LOG_TAG, "Hello"); | |
907 | + Log.v(LOG_TAG, "currentAction => " + currentAction); | |
852 | 908 | if (Intent.ACTION_EDIT.equals(currentAction)) |
853 | 909 | { |
854 | - if (noteTitleEditText != null) | |
855 | - { | |
856 | - noteTitleEditText.setText(currentNote.getTitle()); | |
857 | - } | |
858 | - if (noteContentEditText != null) | |
859 | - { | |
860 | - noteContentEditText.setText(currentNote.getContent()); | |
861 | - } | |
862 | - if (noteTitleLockedToggleButton != null) | |
863 | - { | |
864 | - noteTitleLockedToggleButton.setChecked(currentNote.isTitleLocked()); | |
865 | - } | |
866 | - noteEditContainer.setVisibility(View.VISIBLE); | |
867 | - noteViewContainer.setVisibility(View.GONE); | |
910 | + updateNoteEditTexts(); | |
911 | + updateNoteTitleLockedViews(); | |
912 | + updateNoteLockButtonsViews(); | |
868 | 913 | } |
869 | 914 | else |
870 | 915 | { |
871 | - if (noteTitleTextView != null) | |
872 | - { | |
873 | - noteTitleTextView.setText(currentNote.getTitle()); | |
874 | - } | |
875 | - if (noteContentTextView != null) | |
876 | - { | |
877 | - noteContentTextView.setText(currentNote.getContent()); | |
878 | - } | |
879 | - noteEditContainer.setVisibility(View.GONE); | |
880 | - noteViewContainer.setVisibility(View.VISIBLE); | |
916 | + updateNoteTextViews(); | |
917 | + } | |
918 | + Log.v(LOG_TAG, "Bye"); | |
919 | + } | |
920 | + | |
921 | + private void updateNoteEditTexts() | |
922 | + { | |
923 | + if (noteTitleEditText != null) | |
924 | + { | |
925 | + noteTitleEditText.setText(currentNote.getTitle()); | |
926 | + } | |
927 | + if (noteContentEditText != null) | |
928 | + { | |
929 | + noteContentEditText.setText(currentNote.getContent()); | |
930 | + } | |
931 | + } | |
932 | + | |
933 | + private void updateNoteTextViews() | |
934 | + { | |
935 | + if (noteTitleTextView != null) | |
936 | + { | |
937 | + noteTitleTextView.setText(currentNote.getTitle()); | |
938 | + } | |
939 | + if (noteContentTextView != null) | |
940 | + { | |
941 | + noteContentTextView.setText(currentNote.getContent()); | |
881 | 942 | } |
882 | 943 | } |
883 | 944 |
@@ -893,10 +954,72 @@ public class NoteDetailActivity extends Activity | ||
893 | 954 | { |
894 | 955 | currentNote.setContent(noteContentEditText.getText().toString()); |
895 | 956 | } |
896 | - if (noteTitleLockedToggleButton != null) | |
897 | - { | |
898 | - currentNote.setTitleLocked(noteTitleLockedToggleButton.isChecked()); | |
899 | - } | |
957 | + } | |
958 | + } | |
959 | + | |
960 | + // ToDo : update message and title | |
961 | + private Dialog getLockDialog() | |
962 | + { | |
963 | + if (lockDialog == null) | |
964 | + { | |
965 | + AlertDialog.Builder builder = new AlertDialog.Builder(this); | |
966 | + builder.setTitle(R.string.lock); | |
967 | + builder.setMessage(R.string.lock); | |
968 | + builder.setPositiveButton(android.R.string.ok, this); | |
969 | + builder.setNegativeButton(android.R.string.cancel, this); | |
970 | + lockDialog = builder.create(); | |
971 | + } | |
972 | + return lockDialog; | |
973 | + } | |
974 | + | |
975 | + // ToDo : update message and title | |
976 | + private Dialog getUnlockDialog() | |
977 | + { | |
978 | + if (unlockDialog == null) | |
979 | + { | |
980 | + AlertDialog.Builder builder = new AlertDialog.Builder(this); | |
981 | + builder.setTitle(R.string.unlock); | |
982 | + builder.setMessage(R.string.unlock); | |
983 | + builder.setPositiveButton(android.R.string.ok, this); | |
984 | + builder.setNegativeButton(android.R.string.cancel, this); | |
985 | + unlockDialog = builder.create(); | |
986 | + } | |
987 | + return unlockDialog; | |
988 | + } | |
989 | + | |
990 | + private void setNoteTitleLocked(boolean locked) | |
991 | + { | |
992 | + Log.d(LOG_TAG, "locked => " + locked); | |
993 | + currentNote.setTitleLocked(locked); | |
994 | + updateNoteTitleLockedViews(); | |
995 | + updateNoteLockButtonsViews(); | |
996 | + } | |
997 | + | |
998 | + private void updateNoteTitleLockedViews() | |
999 | + { | |
1000 | + if (currentNote.isTitleLocked()) | |
1001 | + { | |
1002 | + setNoteTitleEditable(false); | |
1003 | + noteContentEditText.requestFocus(); | |
1004 | + } | |
1005 | + else | |
1006 | + { | |
1007 | + setNoteTitleEditable(true); | |
1008 | + noteTitleEditText.requestFocus(); | |
1009 | + } | |
1010 | + } | |
1011 | + | |
1012 | + private void updateNoteLockButtonsViews() | |
1013 | + { | |
1014 | + if (currentNote.isTitleLocked()) | |
1015 | + { | |
1016 | + noteTitleLockImageButton.setVisibility(View.GONE); | |
1017 | + noteTitleUnlockImageButton.setVisibility(View.VISIBLE); | |
1018 | + } | |
1019 | + else | |
1020 | + { | |
1021 | + noteTitleLockImageButton.setVisibility(View.VISIBLE); | |
1022 | + noteTitleUnlockImageButton.setVisibility(View.GONE); | |
900 | 1023 | } |
901 | 1024 | } |
902 | 1025 | } |