A nine graph display controls
WTFPL License
A simple use of nine pictures show the control
Step 1. Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
Step 2. Add the dependency
dependencies {
compile 'com.github.HotBitmapGG:NineImageView:V1.1'
}
name | format | instructions |
---|---|---|
nineImageHorizontalSpace | dimension | Horizontal Space |
nineImageVerticalSpace | dimension | Vertical Space |
nineImageRadius | dimension | View Radius |
nineImageRatio | float | View Ratio |
nineImageColumns | integer | View Columns Number |
<com.hotbitmapgg.nineimagelibrary.NineImageView
android:id="@+id/multi_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
app:nineImageHorizontalSpace="4dp"
app:nineImageRatio="0.8"
app:nineImageVerticalSpace="4dp" />
NineImageView nineImageView = (NineImageView) findViewById(R.id.multi_image);
//set the picture url set
nineImageView.setImageUrls(imageUrls);
nineImageView.setOnClickItemListener(new NineImageView.OnClickItemListener() {
@Override
public void onClick(int i, ArrayList<String> url) {
//set the picture click event,then do you have to do operation
}
});
The control of the image to load depends on the glide load library if you need to use other image You can directly copy under the lib files to your project, the framework for the image to replace it.
An android developer in Wuhan.
If you want to make friends with me, You can focus on my weibo.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
You just DO WHAT THE FUCK YOU WANT TO.