Powerful and flexible xxx, Please feel free to use this.(Welcome to Star and Fork)
Sample
Features
- 1 item
- 2 item
- 3 item
- 4 item
Document
Download
This library already included in JCenter & MavenCentral
Usage(How to use this library)
Gradle:
compile 'com.lsqboy.common-adapter:common-adapter:0.0.1'
-
appcompat-v7
version >= 23.0.0 (Requirements)
eclipse
[CommonAdapter
ListView mListView = (ListView) findViewById(R.id.list_view);
//common adapter 简单使用教程
mListView.setAdapter(new CommonAdapter<String>(this, getData(), android.R.layout.simple_list_item_1) {
@Override
public void convert(ViewHolder helper, String model) {
helper.setText(android.R.id.text1, model);
}
});
Data
private List<String> getData() {
mStringList = new ArrayList<>();
for (int i = 0; i < 50; i++) {
mStringList.add("string Item" + i);
}
return mStringList;
}
manifest (可选)
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.CAMERA" />
<application
...
>
...
<activity android:name="me.iwf.photopicker.PhotoPickerActivity"
android:theme="@style/Theme.AppCompat.NoActionBar"
/>
<activity android:name="me.iwf.photopicker.PhotoPagerActivity"
android:theme="@style/Theme.AppCompat.NoActionBar"/>
</application>
</manifest>
Custom style (可选)
<style name="actionBarTheme" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
<item name="android:textColorPrimary">@android:color/primary_text_light</item>
<item name="actionBarSize">@dimen/actionBarSize</item>
</style>
<style name="customTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="actionBarTheme">@style/actionBarTheme</item>
<item name="colorPrimary">#FFA500</item>
<item name="actionBarSize">@dimen/actionBarSize</item>
<item name="colorPrimaryDark">#CCa500</item>
</style>
Proguard (可选)
# Glide
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
# support-design
-dontwarn android.support.design.**
-keep class android.support.design.** { *; }
-keep interface android.support.design.** { *; }
-keep public class android.support.design.R$* { *; }
ChangeLog(可选)
- 1 item
- 2 item
- 3 item
Extension library (可选)
- 1 item
- 2 item
- 3 item
Thanks
- 1 item
- 2 item
- 3 item
Let us know!
We’d be really happy if you could send us links to your projects where you use our component. Just send an email to g.lsqboy@gmail.com And do let us know if you have any questions or suggestion regarding the animation.
P.S. We’re going to publish more awesomeness wrapped in code and a tutorial on how to make UI for iOS (Android) better than better. Stay tuned!
Author
jackson_lian
Blog: http:lsqboy.com
License
Copyright 2017 Jackson_lian
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.