src\MyApplication\.idea\sonarlint\issuestore\index.pb
src\MyApplication\app\src\main\java\com\example\administrator\myapplication\app\BaseApplication.java src\MyApplication\app\src\main\res\layout\app_bar_main.xml src\MyApplication\.idea\sonarlint\issuestore\2\5\251d187717c2a2bb0fc4a2a1922d62e8bdc3c251 src\MyApplication\.idea\sonarlint\issuestore\4\8\487d5149cb35c7a7667af03d218f63298d21b1f0 src\MyApplication\.idea\sonarlint\issuestore\5\7\57c831202760b4842bfc3ee5ac2511ebb0122f9e src\MyApplication\.idea\sonarlint\issuestore\a\0\a02bf92a1675ea96231995a8137b01dd95f322ae src\MyApplication\.idea\sonarlint\issuestore\a\a\aa2f43374bddf98bfc4aea5a398fe877e5337db3 src\MyApplication\.idea\sonarlint\issuestore\b\3\b395e8da890bfdf6daeefc467704d4b30eac2ea4 src\MyApplication\.idea\sonarlint\issuestore\c\3\c398df7bbcd019772b6c3e3a739dc867ce964184
This commit is contained in:
parent
1ba68ad2ee
commit
a772a74200
|
@ -0,0 +1,15 @@
|
|||
|
||||
Y
|
||||
squid:S106"9Replace this use of System.out or System.err by a logger.(óîý´þÿÿÿÿ8€<38>ž‹¹,
|
||||
Lsquid:S1444"0Make this "public static avatarPath" field final(ក†8ñéã<C3A9>¹,
|
||||
T
|
||||
squid:S106"9Replace this use of System.out or System.err by a logger.(”“î€8çì½<C3AC>¹,
|
||||
^squid:CallToDeprecatedMethod"1Remove this use of "discCache"; it is deprecated.(’áŽÙ8ñéã<C3A9>¹,
|
||||
usquid:S00116"XRename this field "ApplicationId" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(Âñ¶8ñéã<C3A9>¹,
|
||||
osquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(ក†8ñéã<C3A9>¹,
|
||||
osquid:CallToDeprecatedMethod"BRemove this use of "discCacheFileNameGenerator"; it is deprecated.(àò‹Ó8ñéã<C3A9>¹,
|
||||
‰"squid:ClassVariableVisibilityCheck"VMake avatarPath a static final constant or non-public and provide accessors if needed.(ក†8ñéã<C3A9>¹,
|
||||
fsquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(ßåÂ
8ñéã<C3A9>¹,
|
||||
Ksquid:S1068"*Remove this unused "noteDb" private field.(¤Ý¯›ûÿÿÿÿ8ñéã<C3A9>¹,
|
||||
lsquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(<28>ÔÙÚùÿÿÿÿ8Ï䄃¹,
|
||||
Ksquid:S1068"/Remove this unused "mFontSizeId" private field.(ÙüÙé8Ç¢–‹¹,
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(Áä–—
|
||||
_squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(¡ÅøP
|
||||
`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(Žëê·
|
||||
esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(éØ»Úûÿÿÿÿ
|
||||
Dsquid:S1172"/Remove this unused method parameter "objectId".(¤²˜Š
|
||||
`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(ªÌ¿ú
|
||||
jsquid:S1206"PThis class overrides "equals()" and should therefore also override "hashCode()".(Ý¢êÍýÿÿÿÿ
|
||||
`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(†äßï
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
Osquid:S1118":Add a private constructor to hide the implicit public one.(؉ ú
|
||||
Dsquid:S00108")Either remove or fill this block of code.(ÒÌâ–øÿÿÿÿ
|
||||
Dsquid:S00108")Either remove or fill this block of code.(ÒÌâ–øÿÿÿÿ
|
||||
;squid:S1452"&Remove usage of generic wildcard type.(õ›Éü
|
||||
Zsquid:S2147"ECombine this catch with the one at line 185, which has the same body.(“Ç—Ã
|
||||
Osquid:S1118":Add a private constructor to hide the implicit public one.(Ÿ¶í÷
|
||||
Dsquid:S00108")Either remove or fill this block of code.(ÒÌâ–øÿÿÿÿ
|
||||
Zsquid:S2147"ECombine this catch with the one at line 185, which has the same body.(à“˜ƒ
|
||||
Dsquid:S00108")Either remove or fill this block of code.(ÒÌâ–øÿÿÿÿ
|
|
@ -0,0 +1,36 @@
|
|||
|
||||
gsquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(ÐÌS
|
||||
ysquid:S1488"_Immediately return this expression instead of assigning it to the temporary variable "curDate".(Ó°Ø’úÿÿÿÿ
|
||||
Rsquid:CallToDeprecatedMethod",Remove this use of "Time"; it is deprecated.(óÌæ‚
|
||||
?squid:S00108")Either remove or fill this block of code.(<28>”ý¾
|
||||
isquid:S00100"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(óµÔüúÿÿÿÿ
|
||||
Tsquid:S1226"?Introduce a new variable instead of reusing the parameter "is".(¥ÁÙ¥
|
||||
Rsquid:CallToDeprecatedMethod",Remove this use of "Time"; it is deprecated.(óÌæ‚
|
||||
?squid:S00108")Either remove or fill this block of code.(ï£Ä
|
||||
Rsquid:CallToDeprecatedMethod",Remove this use of "Time"; it is deprecated.(óÌæ‚
|
||||
hsquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(‘ÐçÈ
|
||||
Wsquid:CallToDeprecatedMethod",Remove this use of "Date"; it is deprecated.(Ðãûßøÿÿÿÿ
|
||||
?squid:S00108")Either remove or fill this block of code.(<28>”ý¾
|
||||
Rsquid:CallToDeprecatedMethod",Remove this use of "Time"; it is deprecated.(óÌæ‚
|
||||
lsquid:S3776"RRefactor this method to reduce its Cognitive Complexity from 22 to the 15 allowed.(¡¥ÎÏüÿÿÿÿ
|
||||
ssquid:S1149"_Replace the synchronized class "StringBuffer" by an unsynchronized one such as "StringBuilder".(ÄÍœ
|
||||
|
||||
msquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(«Ê‚Ÿýÿÿÿÿ
|
||||
?squid:S00108")Either remove or fill this block of code.(<28>”ý¾
|
||||
Rsquid:CallToDeprecatedMethod",Remove this use of "Time"; it is deprecated.(óÌæ‚
|
||||
isquid:S00100"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(¡¥ÎÏüÿÿÿÿ
|
||||
Qsquid:S2589"7Remove this expression which always evaluates to "true"(ÜÞ¼<C39E>ûÿÿÿÿ
|
||||
\squid:S1226"BIntroduce a new variable instead of reusing the parameter "start".(¶ùßýÿÿÿÿ
|
||||
=squid:S1148"#Use a logger to log this exception.(€ÉÔ…ýÿÿÿÿ
|
||||
msquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(ãו‰þÿÿÿÿ
|
||||
Rsquid:CallToDeprecatedMethod",Remove this use of "Time"; it is deprecated.(óÌæ‚
|
||||
isquid:S00100"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(òŸŒ<C5B8>þÿÿÿÿ
|
||||
=squid:S1148"#Use a logger to log this exception.(€ÉÔ…ýÿÿÿÿ
|
||||
Tsquid:S1118":Add a private constructor to hide the implicit public one.(Íë¹’ûÿÿÿÿ
|
||||
msquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(êÒÔ’úÿÿÿÿ
|
||||
Rsquid:CallToDeprecatedMethod",Remove this use of "Time"; it is deprecated.(óÌæ‚
|
||||
Qsquid:S2589"7Remove this expression which always evaluates to "true"(¹ï¤Ÿýÿÿÿÿ
|
||||
msquid:ModifiersOrderCheck"EReorder the modifiers to comply with the Java Language Specification.(Ô×ÒÖøÿÿÿÿ
|
||||
Wsquid:S1226"BIntroduce a new variable instead of reusing the parameter "start".(ÑÉþÔ
|
||||
Zsquid:S1226"@Introduce a new variable instead of reusing the parameter "num".(ÎÈÖ‡ýÿÿÿÿ
|
||||
Rsquid:CallToDeprecatedMethod",Remove this use of "Time"; it is deprecated.(óÌæ‚
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(‚„É“øÿÿÿÿ
|
||||
›squid:S1186"€Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.(¯¢ç´üÿÿÿÿ
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
3squid:S2131"Use "Integer.toString" instead.(§”Ý
|
||||
esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(¯²Ç‚ÿÿÿÿÿ
|
||||
ssquid:S2293"YReplace the type specification in this constructor call with the diamond operator ("<>").(ñП’øÿÿÿÿ
|
||||
4squid:S2131"Use "Integer.toString" instead.(¨¨üž
|
||||
4squid:S2131"Use "Integer.toString" instead.(‚û‰˜
|
||||
4squid:S2131"Use "Integer.toString" instead.(Ԣ؉
|
||||
9squid:S2131"Use "Integer.toString" instead.(Ìì³Çøÿÿÿÿ
|
||||
4squid:S2131"Use "Integer.toString" instead.(‚û‰˜
|
||||
esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(ÌÙ·Îøÿÿÿÿ
|
||||
esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(«·³‰ýÿÿÿÿ
|
||||
esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(®ôˆÍøÿÿÿÿ
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
hsquid:CallToDeprecatedMethod"=Remove this use of "EXTRA_SHORTCUT_INTENT"; it is deprecated.(ËúÕâÿÿÿÿÿ
|
||||
Bsquid:S1199"-Extract this nested code block into a method.(в¶Ë
|
||||
esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(Ö¹ßÂþÿÿÿÿ
|
||||
esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(£<>Ëßúÿÿÿÿ
|
||||
nsquid:S2293"YReplace the type specification in this constructor call with the diamond operator ("<>").(À—’¢
|
||||
Vsquid:S1161":Add the "@Override" annotation above this method signature(ßìê¯8’«Ùþ¸,
|
||||
Gsquid:S1199"-Extract this nested code block into a method.(£É€Øúÿÿÿÿ
|
||||
S"squid:SwitchLastCaseIsDefaultCheck""Add a default case to this switch.(øå´¡ÿÿÿÿÿ
|
||||
2squid:S2386"Make this member "protected".(ã´Í—
|
||||
`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(›üÊÚ
|
||||
ksquid:CallToDeprecatedMethod"9Remove this use of "setTextAppearance"; it is deprecated.(Ãîœåúÿÿÿÿ8ó©Å‹¹,
|
||||
`squid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(ý<>§ñ
|
||||
2squid:S2386"Make this member "protected".(éÎÓÆ
|
||||
Gsquid:S1199"-Extract this nested code block into a method.(ºß¡«üÿÿÿÿ
|
||||
gsquid:S3776"RRefactor this method to reduce its Cognitive Complexity from 19 to the 15 allowed.(<28>ñ”Ò
|
||||
Usquid:CallToDeprecatedMethod"0Remove this use of "fromHtml"; it is deprecated.(„í’c
|
||||
Bsquid:S1199"-Extract this nested code block into a method.( ’®ì
|
||||
Vsquid:S2209"5Change this instance-reference to a static reference.(Ø÷‘Ïÿÿÿÿÿ8’«Ùþ¸,
|
||||
S"squid:SwitchLastCaseIsDefaultCheck""Add a default case to this switch.(ÅþÓÍÿÿÿÿÿ
|
||||
asquid:CallToDeprecatedMethod";Remove this use of "EXTRA_SHORTCUT_NAME"; it is deprecated.(‡ê³ã
|
||||
ssquid:S2293"YReplace the type specification in this constructor call with the diamond operator ("<>").(êÝýÂþÿÿÿÿ
|
||||
@squid:S1172"+Remove this unused method parameter "view".(<28>Çį
|
||||
esquid:CommentedOutCodeLine"<This block of commented-out lines of code should be removed.(Ȭ¬ÿüÿÿÿÿ
|
||||
osquid:CallToDeprecatedMethod"DRemove this use of "EXTRA_SHORTCUT_ICON_RESOURCE"; it is deprecated.(ýÈž„úÿÿÿÿ
|
||||
psquid:S00100"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ñ¦ú‚ùÿÿÿÿ8’«Ùþ¸,
|
||||
2squid:S2386"Make this member "protected".(Ž‚ô
|
||||
S"squid:SwitchLastCaseIsDefaultCheck""Add a default case to this switch.(ד¾ñùÿÿÿÿ
|
||||
esquid:S1301"KReplace this "switch" statement by "if" statements to increase readability.(øå´¡ÿÿÿÿÿ
|
|
@ -7,7 +7,17 @@ A
|
|||
gradle.properties,2\a\2afbb999f001938c88fa43fc2ef52abf0f8213e4
|
||||
@
|
||||
local.properties,0\7\0712df971a99ac4d2fccb8e0fb19f377f3374cca
|
||||
€
|
||||
Papp\src\main\java\com\example\administrator\myapplication\db\DatabaseHelper.java,a\a\aa2f43374bddf98bfc4aea5a398fe877e5337db3
|
||||
|
|
||||
Lapp\src\main\java\com\example\administrator\myapplication\utils\SPUtils.java,5\7\57c831202760b4842bfc3ee5ac2511ebb0122f9e
|
||||
€
|
||||
Papp\src\main\java\com\example\administrator\myapplication\utils\StringUtils.java,a\0\a02bf92a1675ea96231995a8137b01dd95f322ae
|
||||
‚
|
||||
Rapp\src\main\java\com\example\administrator\myapplication\ui\NoteBookFragment.java,3\0\30a54a60f14d64645eed00c5f82475af0b8df642
|
||||
Rapp\src\main\java\com\example\administrator\myapplication\entity\NotebookData.java,4\8\487d5149cb35c7a7667af03d218f63298d21b1f0
|
||||
~
|
||||
Napp\src\main\java\com\example\administrator\myapplication\ui\MainActivity.java,6\7\67dcf9378cf673b1d3b665701ca8ab112314a41a
|
||||
Napp\src\main\java\com\example\administrator\myapplication\db\NoteDatabase.java,b\3\b395e8da890bfdf6daeefc467704d4b30eac2ea4
|
||||
‚
|
||||
Rapp\src\main\java\com\example\administrator\myapplication\ui\NoteEditFragment.java,c\3\c398df7bbcd019772b6c3e3a739dc867ce964184
|
||||
‚
|
||||
Rapp\src\main\java\com\example\administrator\myapplication\app\BaseApplication.java,2\5\251d187717c2a2bb0fc4a2a1922d62e8bdc3c251
|
|
@ -1,6 +1,8 @@
|
|||
package com.example.administrator.myapplication.app;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
@ -9,8 +11,15 @@ import android.widget.ImageView;
|
|||
import android.widget.Toast;
|
||||
|
||||
import com.example.administrator.myapplication.R;
|
||||
import com.example.administrator.myapplication.db.NoteDatabase;
|
||||
import com.example.administrator.myapplication.entity.NotebookData;
|
||||
import com.example.administrator.myapplication.entity.OnResponseListener;
|
||||
import com.example.administrator.myapplication.entity.Response;
|
||||
import com.example.administrator.myapplication.ui.MainActivity;
|
||||
import com.example.administrator.myapplication.utils.BmobConstants;
|
||||
import com.example.administrator.myapplication.utils.Constants;
|
||||
import com.example.administrator.myapplication.utils.SPUtils;
|
||||
import com.example.administrator.myapplication.utils.StringUtils;
|
||||
import com.nostra13.universalimageloader.cache.disc.impl.UnlimitedDiscCache;
|
||||
import com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator;
|
||||
import com.nostra13.universalimageloader.cache.memory.impl.WeakMemoryCache;
|
||||
|
@ -30,10 +39,14 @@ import cn.bmob.v3.Bmob;
|
|||
|
||||
|
||||
public class BaseApplication extends Application {
|
||||
|
||||
private NoteDatabase noteDb;
|
||||
private NotebookData editData;
|
||||
private static final String TAG = "FloatWindow";
|
||||
private String ApplicationId="82cacaa4470ab6b8d61d3f0ce6d6201d";
|
||||
private int mFontSizeId;
|
||||
protected boolean isNewNote;
|
||||
static public String avatarPath= BmobConstants.MyAvatarDir+"avatarIcon.png";
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
@ -57,12 +70,57 @@ public class BaseApplication extends Application {
|
|||
.build();
|
||||
|
||||
|
||||
|
||||
//设置点击事件实现一键收藏
|
||||
imageView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Toast.makeText(BaseApplication.this, "嗖藏成功~", Toast.LENGTH_SHORT).show();
|
||||
//获取剪切板内容
|
||||
|
||||
ClipboardManager cbm=(ClipboardManager)getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
ClipData clipData = cbm.getPrimaryClip(); //获取当前剪贴板内容
|
||||
ClipData.Item item = clipData.getItemAt(0);
|
||||
String text = item.getText().toString();
|
||||
System.out.println(text);
|
||||
//将剪切板内容转化为notebookdata
|
||||
noteDb = new NoteDatabase(getApplicationContext());
|
||||
editData = new NotebookData();
|
||||
editData.setContent(text);
|
||||
isNewNote = true;
|
||||
if (StringUtils.isEmpty(editData.getDate())) {
|
||||
editData.setDate(StringUtils.getDataTime("yyyy/MM/dd"));
|
||||
}
|
||||
|
||||
mFontSizeId= (int) SPUtils.get(getApplicationContext(),Constants.TEXT_SIZE, Constants.TEXT_MEDIUM);
|
||||
System.out.println(editData.getContent());
|
||||
|
||||
editData.postNoteToServer(getApplicationContext(), new OnResponseListener() {
|
||||
@Override
|
||||
public void onResponse(Response response) {
|
||||
if (!response.isSucces()) {
|
||||
//Snackbar.make(mImgGreen, "保存至服务器端失败,暂保存在本地", Snackbar.LENGTH_LONG).show();
|
||||
Toast.makeText(getApplicationContext(),"保存至服务器端失败,暂保存在本地",Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/* public void initData() {
|
||||
noteDb = new NoteDatabase(null);
|
||||
if (editData == null) {
|
||||
editData = new NotebookData();
|
||||
editData.setContent(text);
|
||||
isNewNote = true;
|
||||
}
|
||||
if (StringUtils.isEmpty(editData.getDate())) {
|
||||
editData.setDate(StringUtils.getDataTime("yyyy/MM/dd"));
|
||||
}
|
||||
|
||||
mFontSizeId= (int) SPUtils.get(getActivity(),Constants.TEXT_SIZE, Constants.TEXT_MEDIUM);
|
||||
}*/
|
||||
|
||||
//悬浮窗口部分
|
||||
initImageLoader(this);
|
||||
Bmob.initialize(this, ApplicationId);
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
|
||||
<android.support.design.widget.TabLayout
|
||||
android:id="@+id/app_bar_tablayout"
|
||||
android:layout_width="394dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
|
|
Loading…
Reference in New Issue