摘要: 解决办法: 将版本升级到com.squareup.okhttp3:okhttp:3.9.0可以解决。 如果使用张鸿洋大神的okhttputils 改成这样就行 implementation 'com.zhy:okhttputils:2.6.2'implementation 'com.squareup 阅读全文
posted @ 2024-08-01 10:40 only_books 阅读(1) 评论(0) 推荐(0) 编辑
摘要: private class ArticleWebViewClient extends WebViewClient { @Override public void onPageFinished(WebView view, String url) { super.onPageFinished(view, 阅读全文
posted @ 2024-06-21 13:25 only_books 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 建议使用RecyclerView 阅读全文
posted @ 2024-06-11 18:22 only_books 阅读(1) 评论(0) 推荐(0) 编辑
摘要: import android.content.Context;import android.content.res.TypedArray;import android.graphics.Canvas;import android.graphics.Paint;import android.graph 阅读全文
posted @ 2024-06-11 18:21 only_books 阅读(2) 评论(0) 推荐(0) 编辑
摘要: public void finishActivity (int requestCode) Since: API Level 1Force finish another activity that you had previously started with startActivityForResu 阅读全文
posted @ 2024-06-05 16:21 only_books 阅读(5) 评论(0) 推荐(0) 编辑
摘要: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag 我在LinkMovementMethod onClick事件中点击跳转新的activity 一直闪 阅读全文
posted @ 2024-06-04 10:58 only_books 阅读(2) 评论(0) 推荐(0) 编辑
摘要: //存储public static void saveObjectsToFile(List<? extends Serializable> objects, String filename) throws IOException { File file1 = BaseApplication.getI 阅读全文
posted @ 2024-06-04 10:06 only_books 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 解决方法 :使用radioBotton.setChecked()方法来解决 参考:https://www.jianshu.com/p/f69cd82cd85a 阅读全文
posted @ 2024-05-21 09:24 only_books 阅读(9) 评论(0) 推荐(0) 编辑
摘要: imageview.setColorFilter(Color.parseColor("#60000000"), PorterDuff.Mode.SRC_ATOP);参考https://blog.51cto.com/u_12468355/3387539 阅读全文
posted @ 2024-05-15 15:44 only_books 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 在edittex里设置android:imeOptions="actionSend"android:inputType="text"设置deittext多行显示editText.setSingleLine(false); editText.setMaxLines(4)参考https://blog.5 阅读全文
posted @ 2024-04-28 14:44 only_books 阅读(8) 评论(0) 推荐(0) 编辑