Click the button in Android to get the score of star rating bar

scene Effect     Note: Blog: https://blog.csdn.net/badao_liumang_qizhi Pay attention to the public address Domineering procedural ape Get programming related ebooks, tutorials and free downloads. Realization Change the layout to LinearLayout and set it to vertical layout through Android: orientation = "vertical" > then add a Rat ...

Posted by cyberplasma on Mon, 06 Jan 2020 10:37:51 -0800

Android different Chinese character number alignment

Use spaces in the Android layout to align text. So how to represent a space in Android? Blank space: &ා160; Narrow space: &; The space width of a Chinese character: &ා160; &ා160; &ා8210; [when two spaces (&ා160; &ා160;) occupy the width of a Chinese character, two spaces are slightly narrower tha ...

Posted by Huijari on Mon, 06 Jan 2020 04:20:26 -0800

Kotlin okhttp simple package

The first time I wrote a blog, I felt a little excited. Mainly make a record of the process of learning Kotlin. After all, a good memory is better than a bad pen. Although I haven't done it all the time, this may be the beginning. Add dependency: implementation 'com.squareup.okhttp3:okhttp:3.1.2' implementation 'org.jet ...

Posted by Buddha443556 on Mon, 06 Jan 2020 03:43:08 -0800

Android like person click event

This is what we want to achieve. First of all, I want to introduce a project on github, https://github.com/nimengbo/TextViewSpanClickable This project is to achieve this effect. Here I'm just going to make an introduction of its use /** * Created by Abner on 15/6/17. * QQ 230877476 * Email nimengbo@gmail.com * Alterna ...

Posted by dwfait on Mon, 06 Jan 2020 03:22:28 -0800

Using ProgressBar in Android - displaying progress bar through Handler and Message

scene Progress bar effect     Note: Blog: https://blog.csdn.net/badao_liumang_qizhi Pay attention to the public address Domineering procedural ape Get programming related ebooks, tutorials and free downloads. Realization Change the layout to relative, then add a ProgressBar and add the id attribute. Then pass android:max="100"   Set prog ...

Posted by kael.shipman on Sun, 05 Jan 2020 22:10:16 -0800

Android learning (22)Path "path drawing (to achieve the drawing function)

Android learning (22)Path "path drawing (to achieve the drawing function) Path: path, which can be used to draw at will, and can be used to make drawing software Using Path and SurfaceView to realize drawing function 1. Layout a custom control and a clear button in xml <?xml version="1.0" encoding="utf-8"?> <L ...

Posted by lilleman on Sun, 05 Jan 2020 19:59:27 -0800

What should be paid attention to when using RecycleView

Although RecycleView is very powerful, such as efficient, such as highly decoupled, such as generic restrictions, such as efficient refreshing and animation effects when adding or deleting item s, it is not so stupid when it is powerful. Here's a summary of the points that need attention. 1. First, the RecycleView does not def ...

Posted by wgordonw1 on Sun, 05 Jan 2020 19:50:54 -0800

HttpURLConnection networking request tool class

package com.example.abnerming.httputil.net; import android.os.Handler; import android.os.Message; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; /** ...

Posted by varzosu on Sun, 05 Jan 2020 15:49:09 -0800

WebView dynamic injection JavaScript script

Demo address: https://gitee.com/chenyangqi/YouMeDai Background introduction stay Android interacts with JavaScript In this paper, we learned about the interaction between native and JS, but if we want to develop a good web page interaction with others, it is obvious that this web side does not define a jsBridge for us, which is a rogue who grab ...

Posted by fox_m on Sun, 05 Jan 2020 13:53:09 -0800

FlowLayout: application of flow layout

I. application Flow layout means that the control is automatically added to the right according to the width of the ViewGroup. If there is not enough space left in the current row, it is automatically added to the next row. It is often used in search history and hot search interfaces. Two, implementation 1.FlowLayout.java J ...

Posted by johnSTK on Sun, 05 Jan 2020 11:57:22 -0800