On iconFont

Why go up? Because the package I found on the Internet doesn't work very well. My friend said that he would come to work tomorrow and send it to me. If it works well, it will work. If he doesn't feel particularly good, he will be a eunuch This article refers to https://www.jianshu.com/p/06365b31dff1 I won't talk about how to enter the Al ...

Posted on Fri, 01 May 2020 12:37:12 -0700 by flyhoney

RecyclerView divider customization

We use the addItemDecoration(ItemDecoration fromHtml) of RecyclerView to create a new class to see what it is public class CategoryItemDecoration extends RecyclerView.ItemDecoration { @Override public void onDraw(Canvas c, RecyclerView parent, RecyclerView.State state) { } @Override public void getItemOffsets(Rect outRect ...

Posted on Fri, 01 May 2020 11:15:56 -0700 by qadeer_ahmad

Cloud integration (single chat + conversation list)

Download it according to the SDK provided by rongyun official, and then conduct the package guiding operation according to the documents provided by rongyun official, and then start our code realization journey of single chat: Add: <provider android:name="android.support.v4.content.FileProvider" ...

Posted on Thu, 30 Apr 2020 17:35:37 -0700 by phpete2

A encapsulated countdown control

This time, it brings a countdown control named TimingTextView, which still has only one file. Copy and paste are available. If you don't say much, you can say it TimingTextView.java: public class TimingTextView extends TextView { private static final int TIME_START = 0x001; private static final int TIME_FINISH = 0x002; private ...

Posted on Thu, 30 Apr 2020 14:53:16 -0700 by cdinca

Android EditText failed to hide system soft keyboard when setting InputType property

In recent projects, you need to make a custom soft keyboard. The basic implementation idea is to set the current Activity property in Android manifest: android:windowSoftInputMode = "statehidden| statealwaysheidden". EditText sets OnTouchListener listening, and then sets the InputType property of EditText in l ...

Posted on Thu, 30 Apr 2020 14:03:12 -0700 by cottonbuds2005

DrawerLayout+NavigationView main interface of imitating Moby bike

In the past, SlidingMenu was usually used, but there were too many properties to set, which made it cumbersome to use. Later, the official DrawerLayout came out, which made the sideslip control positive, and the function effect was better. Here is the main interface that I use DrawerLayout+NavigationView to imitate Moby bike. visual effect: ...

Posted on Thu, 30 Apr 2020 12:14:29 -0700 by Eclesiastes

A sliding scoring control

This time it brings a sliding scoring control. When doing the scoring function, you often need a control to drag a finger to score. In fact, this kind of control has a lot of 100 degrees. I wrote one a long time ago, and I'll share it with you here. The control is named SlideToGradeLayout. There is only one file. Copy and paste are available ...

Posted on Thu, 30 Apr 2020 09:52:15 -0700 by fross

62. (android Development) upload files using okhttp

To develop android mobile client, you often need to upload files to the server, such as: photos in your mobile phone. Using okhttp would be a good choice. It is easy to use and efficient to run. First, add implementation 'com. Square up. Okhttp3: okhttp: 3.8.1' in the dependencies of app/build.gradle. You can refer to the following code apply p ...

Posted on Thu, 30 Apr 2020 09:25:31 -0700 by danbot26

Android CrashHandler writes its own exception capture class

Catalog (?)[-] call test When writing code, we may throw various exceptions. Some of these exceptions are found and solved during our test, but some of them are unknown to us. We need to understand and solve them in time, whether it's the logic problem of the code or some bug s at the bottom of Android itself. When the user crashe ...

Posted on Thu, 30 Apr 2020 09:25:38 -0700 by kaveman50

The user-defined CreateChooser can send mails with attachments.

scene When we need to send email in our application requirements. We usually do not implement an email App ourselves, but forward it to other apps through implicit Intent. We just need to add some corresponding data. The official Android document tells us that we can send email through the following three actions: ...

Posted on Thu, 30 Apr 2020 08:48:20 -0700 by Scriptmaker