๐นโ๐ญโ๐ฎโ๐ธโ ๐ฑโ๐ฎโ๐งโ๐ทโ๐ฆโ๐ทโ๐พโ ๐ผโ๐ฎโ๐ฑโ๐ฑโ ๐ญโ๐ชโ๐ฑโ๐ตโ ๐พโ๐ดโ๐บโ ๐นโ๐ดโ ๐บโ๐ธโ๐ชโ ๐จโ๐ดโ๐ฒโ๐ตโ๐ฑโ๐ชโ๐ฝโ ๐บโ๐ฎโ ๐จโ๐ดโ๐ฒโ๐ตโ๐ดโ๐ณโ๐ชโ๐ณโ๐นโ๐ธโ ๐ฉโ๐ฎโ๐ทโ๐ชโ๐จโ๐นโ๐ฑโ๐พโ ๐ผโ๐ฎโ๐นโ๐ญโ๐ดโ๐บโ๐นโ ๐ผโ๐ทโ๐ฎโ๐นโ๐ฎโ๐ณโ๐ฌโ ๐ฆโ ๐จโ๐บโ๐ธโ๐นโ๐ดโ๐ฒโ ๐ฆโ๐ฉโ๐ฆโ๐ตโ๐นโ๐ชโ๐ทโ ๐ซโ๐ดโ๐ทโ ๐นโ๐ญโ๐ชโ๐ฒโ. ๐ชโ๐ฆโ๐ทโ๐ฑโ๐ฎโ๐ชโ๐ทโ, ๐พโ๐ดโ๐บโ ๐ญโ๐ฆโ๐ปโ๐ชโ ๐นโ๐ดโ ๐ผโ๐ทโ๐ฎโ๐นโ๐ชโ ๐ฆโ ๐จโ๐บโ๐ธโ๐นโ๐ดโ๐ฒโ ๐ฆโ๐ฉโ๐ฆโ๐ตโ๐นโ๐ชโ๐ทโ ๐ซโ๐ดโ๐ทโ ๐ฆโ ๐ธโ๐ฎโ๐ฒโ๐ตโ๐ฑโ๐ชโ ๐จโ๐บโ๐ธโ๐นโ๐ดโ๐ฒโ ๐ฑโ๐ฎโ๐ธโ๐นโ๐ปโ๐ฎโ๐ชโ๐ผโ. ๐งโ๐บโ๐นโ ๐ณโ๐ดโ๐ผโ ๐ดโ๐ณโ๐ผโ๐ฆโ๐ทโ๐ฉโ๐ธโ, ๐พโ๐ดโ๐บโ ๐ฏโ๐บโ๐ธโ๐นโ ๐ญโ๐ฆโ๐ปโ๐ชโ ๐นโ๐ดโ ๐ผโ๐ทโ๐ฎโ๐นโ๐ชโ ๐จโ๐ดโ๐ฉโ๐ชโ ๐ซโ๐ดโ๐ทโ ๐ปโ๐ฎโ๐ชโ๐ผโ ๐ฎโ๐ณโ ๐ฝโ๐ฒโ๐ฑโ. ๐นโ๐ญโ๐ฎโ๐ธโ ๐ฑโ๐ฎโ๐งโ๐ทโ๐ฆโ๐ทโ๐พโ ๐ตโ๐ทโ๐ดโ๐ปโ๐ฎโ๐ฉโ๐ชโ๐ธโ ๐ฒโ๐ฆโ๐ณโ๐พโ ๐จโ๐บโ๐ธโ๐นโ๐ดโ๐ฒโ ๐จโ๐ดโ๐ฒโ๐ตโ๐ดโ๐ณโ๐ชโ๐ณโ๐นโ๐ธโ ๐ธโ๐บโ๐จโ๐ญโ ๐ฆโ๐ธโ ๐ฑโ๐ฎโ๐ธโ๐นโ๐ปโ๐ฎโ๐ชโ๐ผโ๐ธโ,๐ธโ๐ตโ๐ฎโ๐ณโ๐ณโ๐ชโ๐ทโ,๐ทโ๐ฆโ๐ฉโ๐ฎโ๐ดโ๐งโ๐บโ๐นโ๐นโ๐ดโ๐ณโ & ๐ฒโ๐ดโ๐ทโ๐ชโ.
- 4 types of listviews
- 2 type of spinner
- 2 lined radiobutton (special)
- 4 styles of radiobutton
- Simple & easiest ever
In your project build.gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
In your module (app) build.gradle
dependencies {
implementation 'com.github.ErrorxCode:EasyWidgets:2.0'
}
2 lined RadioButton
<com.easywidgets.radio.EasyRadioButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="This is title"
app:description="This is description"
app:isR2L="true"/>
[Note] : Use EasyRadioGroup
insted of default RadioGroup
for this.
Special Radiobuttons
<RadioButton
style="@style/ClassicQuiz"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Correct option" />
All you have to do is just apply the styles. These are the following styles
- ClassicQuiz
- ModernQuiz
- ClassicBlue
- ClassicRed
- ModernRed
- ModernBlue
Note : Don't use tag attribute when using these styles
RadioButtonUtils
If you are using ModernQuiz
or ClassicQuiz
style as options for the quiz app, then you can make use of this class. This class help you to highlight options.
if selected option is correct, then call EasyRadioUtils.setCorrect(Radiobutton button)
passing radiobutton to make it look correct. To highlight wrong option,
call EasyRadioUtils.setWrong(RadioButton button);
passing the current selected radiobutton. If you want to add sound effect to options then use EasyRadioUtils.setSoundEffect(group,true,true,true);.
Spinner
Spinner spinner = findViewById(R.id.spinner); // Use default spinner,Just need to use this adapter.
SpinnerAdapter adapter = new SpinnerAdapter(this,new String[]{"High","Ultra","Extreme"},new String[]{"This will give you 30 FPS","This will give you 40 FPS","This will give you 60 FPS"});
// or
SpinnerAdapter adapter = new SpinnerAdapter(this,new String[]{"High","Ultra","Extreme"},new int[]{R.mipmap.ic_launcher,R.drawable.ic_launcher_background});
spinner.setAdapter(adapter);
Listview
Listview listview = findViewById(R.id.listview); // Use default spinner,Just need to use this adapter.
EasyListAdapter adapter = new EasyListAdapter(this,new String[]{"High","Ultra","Extreme"},new String[]{"This will give you 30 FPS","This will give you 40 FPS","This will give you 60 FPS"});
// or
EasyListAdapter adapter = new EasyListAdapter(this,new String[]{"High","Ultra","Extreme"},new int[]{R.mipmap.icon1,R.drawable.icon2},null);
// or
ArrayList<EasyListObject> items = new ArrayList<>();
items.add(new EasyListObject(R.drawable.icon1,"Title1","Heading1","Description1.."));
items.add(new EasyListObject(R.drawable.icon2,"Title2","Heading2","Description2.."));
items.add(new EasyListObject(R.drawable.icon1,"Title3","Heading3","Description3.."));
ListAdapter adapter = new ListAdapter(this,list);
listview.setAdapter(adapter);
[Note] : If using adapter for listview with icons, you have to either pass String arry for 3rd line (heading) or null.
Thank you for using my library. Have a nice day :)