Commit c4706238 by zhengnw@sobot.com

album 1.0.2

parent 660b1c80
......@@ -287,10 +287,6 @@ public class MainActivity extends SobotBaseActivity {
}
private void openAlbum() {
SobotAlbum.initialize(AlbumConfig.newBuilder(this)
.setAlbumLoader(new SobotMediaLoader())
.setLocale(Locale.getDefault())
.build());
SobotAlbum.album(MainActivity.this)
.multipleChoice()
.columnCount(4)
......
......@@ -22,7 +22,7 @@ dependencies {
compileOnly 'com.google.android.material:material:1.4.+'
compileOnly 'androidx.appcompat:appcompat:1.0.0'
compileOnly 'androidx.recyclerview:recyclerview:1.0.0'
api 'com.sobot.library:widget_x:1.2.1'
api 'com.sobot.library:widget_x:1.2.3'
api 'com.sobot.library:picture_x:1.2.0'
}
......
......@@ -12,7 +12,7 @@ task androidSourcesJar(type: Jar) {
ext {
PUBLISH_GROUP_ID = "com.sobot.library" //项目包名
PUBLISH_ARTIFACT_ID = 'album' //项目名
PUBLISH_VERSION = '1.0.1' //版本号
PUBLISH_VERSION = '1.0.2' //版本号
}
......
......@@ -42,6 +42,7 @@ import com.sobot.album.api.choice.VideoChoice;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Locale;
/**
* 图片选择器
......@@ -98,23 +99,14 @@ public final class SobotAlbum {
private static AlbumConfig sAlbumConfig;
/**
* Initialize Album.
*
* @param albumConfig {@link AlbumConfig}.
*/
public static void initialize(AlbumConfig albumConfig) {
if (sAlbumConfig == null) sAlbumConfig = albumConfig;
else
Log.w("Album", new IllegalStateException("Illegal operation, only allowed to configure once."));
}
/**
* Get the album configuration.
*/
public static AlbumConfig getAlbumConfig() {
if (sAlbumConfig == null) {
sAlbumConfig = AlbumConfig.newBuilder(null).build();
sAlbumConfig = AlbumConfig.newBuilder(null).setAlbumLoader(new SobotMediaLoader())
.setLocale(Locale.getDefault()).build();
}
return sAlbumConfig;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment