App Resource -- inline complex XML resource
Some resource types are combinations of multiple complex resources represented by XML files. An example is animation vector drawable, which is a paintable resource, encapsulating vector drawable and animation. This requires at least three XML files.
res/drawable/avd.xml
<?xml version="1.0" encoding="utf-8"?>
<animate ...
Posted by tegwin15 on Wed, 01 Jan 2020 02:41:48 -0800
Practice of Android Dagger (IV) MVVM mode Kotlin
introduce
Learn some basic knowledge first
@Binds
@IntoSet @IntoMap @IntoXXXX
Let's first introduce how to design MVVM when it is not dagger2
If you don't know how to use databinding, the following video is recommended
Android Data Binding practice - Beginner Level
Android Data Binding practice - Advanced
Let's p ...
Posted by cosmicsea on Wed, 01 Jan 2020 00:19:28 -0800
Android project practice (51): talking about green Dao
Well known database framework
Steps to use GreenDao:
1. Add dependency to build.gradle file in app directory
compile 'org.greenrobot:greendao:3.2.0'
Add plug-in at the top
apply plugin: 'org.greenrobot.greendao'
2. Configuration of build.gradle file in root directory
dependencies {
classpath 'org.greenrobot:greendao-gradle ...
Posted by Solemn on Tue, 31 Dec 2019 23:47:03 -0800
Development of mobile App based on html5 plus + Mui (1)
Use Html5 plus + Mui for mobile App development. It's been a while. I'm free these days to make an information App to share with you.
Today's main sharing homepage is realized. First, let's see the following effects:
This interface is mainly divided into: title, content classification list, search and setting buttons.
Title
<header c ...
Posted by cottonbuds2005 on Tue, 31 Dec 2019 22:29:30 -0800
Android ListView click item to realize check box radio selection and deselection
Foreword
ListView with CheckBox implementation radio selection is often used in Android development. The common practice is to use a bean to record the state of the CheckBox, and judge the state of the bean every time you get the view. Let's use the click item to implement.
Design sketch
In the figure, a bottom dialog po ...
Posted by ruach on Tue, 31 Dec 2019 22:16:54 -0800
AssetManager reads multiple picture resources under assets and outputs them to ImageView animation
AssetManager reads multiple picture resources under assets and outputs them to ImageView animation
There are several key points and links to note:
1. AssetManager reads the original image resource file placed in the assets directory in advance and assembles it into the Bitmap array of Android.
The file structure is shown in th ...
Posted by TheDeadPool on Tue, 31 Dec 2019 21:39:39 -0800
LinearLayoutCompat under v7 package
In normal development, we often have the requirement that each Item layout should be distinguished by using a split line in the layout, as shown in the following code:
The effect is shown in Figure 1-1
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
...
Posted by ashebrian on Tue, 31 Dec 2019 18:42:06 -0800
The first line of code
1, Create and load layouts
app/src/main/res/new/directory, create a directory named layout, and right-click / layout resource file/
Add button code
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height=" ...
Posted by sloede on Tue, 31 Dec 2019 16:09:26 -0800
Factory method mode of design mode popularization
This article is a note after reading "analysis and practice of Android source code design pattern"
Definition
Define an interface for creating objects, and let the subclass decide the instantiation category.
Usage scenarios
When some complex objects need to be generated, the specific scenarios still need to ...
Posted by anita999 on Tue, 31 Dec 2019 14:04:20 -0800
Record mobile payment (WeChat payment, Alipay payment)
1. Wechat payment
Play Naughty
Download or add dependencies first, Wechat lib or dependency , and then add it in Android manifest. Remember to build wxapi in the root directory. The name can't be changed. Remember to have the payment authority after applying for wechat payment account. Besides, wechat signature may need to ...
Posted by scott212 on Tue, 31 Dec 2019 13:57:21 -0800