hackii 3 years ago
parent 1fc55a5519
commit 65b8df9a56

@ -9,6 +9,7 @@
<entry key="..\:/data/git/MJ_maintainNotes/src/Project/app/src/main/res/layout/activity_set_lock.xml" value="0.2" />
<entry key="..\:/data/git/MJ_maintainNotes/src/Project/app/src/main/res/layout/activity_sync.xml" value="0.1296875" />
<entry key="..\:/data/git/MJ_maintainNotes/src/app/src/main/res/layout/activity_splash.xml" value="0.12135416666666667" />
<entry key="..\:/data/git/MJ_maintainNotes/src/app/src/main/res/layout/note_edit.xml" value="0.25364583333333335" />
<entry key="..\:/data/git/MJ_maintainNotes/src/app/src/main/res/layout/note_list.xml" value="0.1359375" />
<entry key="..\:/data/git/MJ_maintainNotes/src/app/src/main/res/menu/note_list.xml" value="0.264" />
</map>

File diff suppressed because it is too large Load Diff

@ -1,4 +1,4 @@
#Fri Nov 19 21:08:53 CST 2021
#Sat Nov 20 08:05:40 CST 2021
base.1=F\:\\data\\git\\MJ_maintainNotes\\src\\app\\build\\intermediates\\dex\\debug\\mergeProjectDexDebug\\out\\classes.dex
path.1=classes.dex
base.0=F\:\\data\\git\\MJ_maintainNotes\\src\\app\\build\\intermediates\\dex\\debug\\mergeExtDexDebug\\out\\classes.dex

@ -16,7 +16,7 @@
<uses-permission android:name="android.permission.INTERNET" />
<application
android:icon="@drawable/icon_app"
android:icon="@drawable/app1"
android:label="@string/app_name">
<activity
android:name=".ui.SplashActivity"

@ -30,9 +30,11 @@ import android.content.SharedPreferences;
import android.graphics.Paint;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.text.Editable;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.text.format.DateUtils;
import android.text.style.BackgroundColorSpan;
import android.util.Log;
@ -85,6 +87,59 @@ public class NoteEditActivity extends Activity implements OnClickListener,
public ImageView ibSetBgColor;
}
private EditText editText;
private TextView textView;
private String Textchange(String oriText){
StringBuffer stringBuffer = new StringBuffer(oriText);
int Flag1 = -1;
int Flag2 = -1;
do {//不计入表示图片的字符
Flag1 = stringBuffer.indexOf("<img");
Flag2 = stringBuffer.indexOf(">");
if (Flag1 != -1 && Flag2 != -1) {
stringBuffer = stringBuffer.replace(Flag1, Flag2+1, "");
}
} while (Flag1 != -1 && Flag2 != -1);
do {//不计入换行字符
Flag1 = stringBuffer.indexOf("\n");
if (Flag1 != -1){
stringBuffer = stringBuffer.replace(Flag1, Flag1+1, "");
}
} while (Flag1 != -1);
do {//不计入空格字符
Flag1 = stringBuffer.indexOf(" ");
if (Flag1 != -1) {
stringBuffer = stringBuffer.replace(Flag1, Flag1+1, "");
}
} while (Flag1 != -1);
return stringBuffer.toString();
}
private void count() {
editText = (EditText) findViewById(R.id.note_edit_view);
textView = (TextView) findViewById(R.id.text_num);
mNoteEditor.addTextChangedListener(new TextWatcher() {
int currentLength = 0;
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
textView.setText("Number of characters" + currentLength);
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
currentLength = Textchange(mNoteEditor.getText().toString()).length();
}
@Override
public void afterTextChanged(Editable s) {
textView.setText("Number of characters" + currentLength);
}
});
}
private static final Map<Integer, Integer> sBgSelectorBtnsMap = new HashMap<Integer, Integer>();
static {
@ -168,6 +223,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
return;
}
initResources();
count();
}
/**

@ -138,14 +138,11 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
private final static int REQUEST_CODE_OPEN_NODE = 102;
private final static int REQUEST_CODE_NEW_NODE = 103;
static Activity NotesListActivity;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.note_list);
getWindow().setBackgroundDrawableResource(R.drawable.grassland);
NotesListActivity = this;
initResources();
/**

@ -15,7 +15,6 @@ import net.micode.notes.R;
import net.micode.notes.mysql.ConnectRDS;
import org.json.JSONObject;
import static net.micode.notes.ui.NotesListActivity.NotesListActivity;
public class syncActivity<c> extends Activity {
private static final String TAG = SqlData.class.getSimpleName();
@ -63,10 +62,9 @@ public class syncActivity<c> extends Activity {
try{
if (ConnectRDS.uploadInfo(JS.toString())){
showMessage("上传成功!");
NotesListActivity.finish();
Intent intent = new Intent(syncActivity.this, NotesListActivity.class);
startActivity(intent);
syncActivity.this.finish();
finish();
} else {
showMessage("上传失败,请检查网络连接!");
}
@ -93,7 +91,6 @@ public class syncActivity<c> extends Activity {
System.out.println(JSONInfo.get("NOTE"));
NotesProvider.syncTABLE(JSONInfo);
showMessage("下载成功!");
NotesListActivity.finish();
Intent intent = new Intent(syncActivity.this, NotesListActivity.class);
startActivity(intent);
finish();

@ -40,6 +40,14 @@
android:layout_marginRight="8dip"
android:textAppearance="@style/TextAppearanceSecondaryItem" />
<TextView
android:id="@+id/text_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|center_vertical"
android:layout_marginRight="8dip"
/>
<ImageView
android:id="@+id/iv_alert_icon"
android:layout_width="wrap_content"

Loading…
Cancel
Save