Digital scroll control
In a previous project, there is a gold coin attribute. When you want to add gold coins, you need to scroll like a slot machine, find the information on the Internet, summarize it, and share it with you.
Let's start with the picture (git doesn't work, let's imagine)
Usage method
1. Create attrs.xml file under res/values to c ...
Posted by DrFishNips on Thu, 02 Jan 2020 15:11:44 -0800
Optimization code of Android Support Annotations annotation Library
Introduction:
Android Support Annotations is an annotation library introduced from version 19.1, which can optimize code, increase readability, and reduce code error reporting
Use:
1: boot pack
implementation 'com.android.support:support-annotations:23.4.0'
2:Support Annotations classification
2.1:Nullness annotation
@ ...
Posted by stu215 on Thu, 02 Jan 2020 09:41:07 -0800
Android video seamless switching, using MediaPlayer and TextureView
Requirement description
For example, when advertising is played, each video lasts for 15 seconds. When switching between videos, machines with poor performance may have a black screen for a period of time, and the experience is not good. Next, we need to solve the problem of black screen.
Solution
Two surfaceView modes are ...
Posted by josephicon on Thu, 02 Jan 2020 08:26:59 -0800
Android progress bar / waiting to load - rotate small dot effect
Progress bar / wait to load - rotate small dot effect
1 Effect Picture
The static image doesn't work, so update the article and attach the github address.
2, thinking
12 small circle points stacked (i=0,1,...11)
Animation 1: rotate from 0 degree to 30*i degree
Animation 2: rotate from 30*i degrees to 360 degrees
Since ...
Posted by frizzo on Thu, 02 Jan 2020 04:17:25 -0800
State mode
introduce
The behavior of a state pattern is parallel and irreplaceable. Policy pattern behaviors are independent and replaceable. State pattern is intended to change the behavior of an object when its internal state changes.
UML
Example
Press the program button to select the selection mode when the power is turned on. ...
Posted by billo on Thu, 02 Jan 2020 02:50:26 -0800
Percentage + background icon progress bar
Recently, there is a demand for project development, in fact, it is the commonly used percentage progress bar. There are a lot of materials on this function, not to mention much. The function I mentioned below is to add a background icon to the percentage text on the basis of the original. The effect chart is as follows:
Onl ...
Posted by Scummy12 on Wed, 01 Jan 2020 16:08:04 -0800
Glide for Android (image loading)
1. Add dependency
dependencies {
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:support-v4:23.2.1'
}
2. Usage
ImageView imageView = (ImageView)findViewById(R.id.imageView)
Glide.with(this)
.load(url)//Picture address
.crossFade()//Open animation
//.dontAnimate()//Close ...
Posted by iron999mike on Wed, 01 Jan 2020 12:00:57 -0800
Android - no solution for custom classes can be found when compiling AIDL created by Android studio
Please indicate the source of Reprint: https://blog.csdn.net/l1028386804/article/details/82728536
When using AS to create ADIL files, AS will generate an aidl folder and a package with the same package name for us under the main folder. Generally, we will put all classes or files related to ADIL under this package. However, if ...
Posted by alex57 on Wed, 01 Jan 2020 07:38:39 -0800
The record of the shift of the click event of < li > label binding on the Android
First, record the details:
Recently, I participated in a project, and need to count the consumption details of users in the past six months.
The mui framework is used.
The js part is as follows:
function initMonth() {
var html="";
var x=1;
html +='<ul id="monthList">'
for (var i=0;i<=5;i++){
...
Posted by kodlcan on Wed, 01 Jan 2020 06:41:01 -0800
weex 04 custom components and Text components
Customize a general header component, which contains a text component. In this way, other modules can directly import registration references when using header.
Custom components
Create a new top header.vue file
Complete the following code in top_header.vue
<template>
<div class="topheader">
<t ...
Posted by igorlopez on Wed, 01 Jan 2020 03:06:44 -0800