Recently, I used TextPathView to record

  . introduce use TextPathView is a custom control that transforms text into path animation and then displays it. The effect is shown above. Gradle compile 'com.yanzhikai:TextPathView:0.1.3' minSdkVersion 16 If you encounter a problem that disappears after playing, turn off hardware acceleration, which may not support t ...

Posted by nonexistence on Thu, 19 Dec 2019 22:37:49 +0100

Remove padding from CardView under Android 5.0

Today, I encountered a CardView adaptation problem. On Android 5.0 and below, the CardView will have an extra margin. See the following figure for details: Android 4.2 effects Maybe you'll think, did you accidentally set the margin? Well, look at the code <android.support.v7.widget.CardView android:layout_width="200dp" ...

Posted by onicsoft on Thu, 19 Dec 2019 21:39:37 +0100

Android gets current location information through GPS or NetWork

demo download address: https://download.csdn.net/download/sinat_35349353/10706484 Just completed a project (intranet project) that needs to obtain location information through GPS, so it can still judge that there is a network connection when acquiring providers according to LocationManager. The provider obtained by debug is [ ...

Posted by t_galan on Wed, 18 Dec 2019 17:25:47 +0100

RxJava from entry to never leave (7) - groupBy

In RxJava, groupBy divides an Observable into several Observable sets. Each of them transmits a subsequence of the original Observable. Which data item is transmitted by which Observable is determined by a function. This function specifies a Key for each item, and the data with the same Key will be transmitted by the same Observ ...

Posted by raker7 on Tue, 17 Dec 2019 19:00:50 +0100

Android studio version 3.1 and butterknife version 8.8.1 are incompatible. The pro test is effective

Due to importing other people's projects and changing the version number of gradle, the project always reported an error. Finally, it was found that the problem was in ButterKnife when I looked up the data. Some people had NullPointerException, and my error was as follows: gradle version number classpath  'com.android.tools ...

Posted by seanstuart on Tue, 17 Dec 2019 17:25:45 +0100

Common project dependency summary

Every time I take over a new project, I see a lot of dependencies without comments. Some of them are hard to remember. I have to look up their meanings on the Internet for a long time every time, so I will read them when I write this article for later development to improve the development efficiency. Edited on October 12, 2 ...

Posted by texhead on Mon, 16 Dec 2019 23:17:32 +0100

Android:EditText set password visible or invisible

Urgently, set the password visible and invisible properties of EditText in the click event: et_password.setTransformationMethod(HideReturnsTransformationMethod.getInstance()); //Password not visible et_password.setTransformationMethod(PasswordTransformationMethod.getInstance());//Password visible   Body: (Ref https://blog.c ...

Posted by Moron on Mon, 16 Dec 2019 22:23:26 +0100

recyclerview general adapter of mvvm mode

Recently, I plan to refactor the project. I plan to use mvvm mode. I try to write a general adapter for recyclerview in mvvm mode. It's refreshing and pleasant to use package demo.xinchuang.com.mvvmdemo; import android.content.Context; import android.databinding.DataBindingUtil; import a ...

Posted by Ghostgator on Mon, 16 Dec 2019 20:05:35 +0100

Auto rotate ViewPager

1. overview github address: https://github.com/luoshenzhi/AutoPlayViewPager I didn't want to build the wheel again, but I didn't feel satisfied after trying several, so I had to do it myself 1.1 characteristics The code is less intrusive. Just change the class name without changing the adapter Draw indicators by code, n ...

Posted by xhelle on Sun, 15 Dec 2019 21:07:46 +0100

Simplest state switching layout

Simplest state switching layout Function introduction Loading data Data load failed Data load is empty Network load failed Retry click event Support custom layout Rendering display The simplest way to use it 1.Add it in your root build.gradle at the end of repositories: allprojects { repositories { ... maven { ...

Posted by hypuk on Sun, 15 Dec 2019 18:20:07 +0100