All Projects → alfredayibonte → QuestionnaireView

alfredayibonte / QuestionnaireView

Licence: MIT license
A simple view to be able to display question and various field (Radio, EditText, checkbox ) for answers

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to QuestionnaireView

Materialdrawer
The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.
Stars: ✭ 11,498 (+33717.65%)
Mutual labels:  android-development, android-ui
Glidetoast
GlideToast is a android library to implement flying Toast Animation
Stars: ✭ 162 (+376.47%)
Mutual labels:  android-development, android-ui
Notzz App
📝 A Simple Note-Taking App built to demonstrate the use of Modern Android development tools - (Kotlin, Coroutines, State Flow, Hilt-Dependency Injection, Jetpack DataStore, Architecture Components, MVVM, Room, Material Design Components).
Stars: ✭ 158 (+364.71%)
Mutual labels:  android-development, android-ui
Fancyshowcaseview
An easy-to-use customisable show case view with circular reveal animation.
Stars: ✭ 1,662 (+4788.24%)
Mutual labels:  android-development, android-ui
Modern Android Development
Modern Android Development tools & key points
Stars: ✭ 219 (+544.12%)
Mutual labels:  android-development, android-ui
Ibackdrop
A library to simply use Backdrop in your project (make it easy). Read more ->
Stars: ✭ 137 (+302.94%)
Mutual labels:  android-development, android-ui
awesome-android-libraries
😎 A curated list of awesome Android libraries
Stars: ✭ 135 (+297.06%)
Mutual labels:  android-development, android-ui
Cameraxdemo
A sample camera app with CameraX API from Android Jetpack
Stars: ✭ 112 (+229.41%)
Mutual labels:  android-development, android-ui
Bottomsheet
BottomSheet dialog library for Android
Stars: ✭ 219 (+544.12%)
Mutual labels:  android-development, android-ui
Advancedrecycleview
♻ RecycleView with multiple view types, inner horizontal RecycleView and layout animation
Stars: ✭ 172 (+405.88%)
Mutual labels:  android-development, android-ui
Easyadapter
Recyclerview adapter library- Create adapter in just 3 lines of code
Stars: ✭ 122 (+258.82%)
Mutual labels:  android-development, android-ui
Awesome Android Complete Reference
Awesome Android references for everything like best practices, performance optimization, etc.
Stars: ✭ 2,701 (+7844.12%)
Mutual labels:  android-development, android-ui
Anychart Android
AnyChart Android Chart is an amazing data visualization library for easily creating interactive charts in Android apps. It runs on API 19+ (Android 4.4) and features dozens of built-in chart types.
Stars: ✭ 1,762 (+5082.35%)
Mutual labels:  android-development, android-ui
Textwriter
Animate your texts like never before
Stars: ✭ 140 (+311.76%)
Mutual labels:  android-development, android-ui
Android Inappbilling
A sample which uses Google's Play Billing Library and it does InApp Purchases and Subscriptions.
Stars: ✭ 114 (+235.29%)
Mutual labels:  android-development, android-ui
Customrefreshview
一个支持网络错误重试,无数据页(可自定义),无网络界面(可自定义)的上拉加载更多,下拉刷新控件
Stars: ✭ 160 (+370.59%)
Mutual labels:  android-development, android-ui
Mediapicker
Easy customizable picker for all your needs in Android application
Stars: ✭ 105 (+208.82%)
Mutual labels:  android-development, android-ui
Android Complexify
An Android library which makes checking the quality of user's password a breeze.
Stars: ✭ 111 (+226.47%)
Mutual labels:  android-development, edittext
Awesomedialog
A Beautiful Dialog Library for Kotlin Android
Stars: ✭ 163 (+379.41%)
Mutual labels:  android-development, android-ui
Customfloatingactionbutton
This view is for replacement of standard Floating Action Button from Google Support Library. It is easy to use, customizable and you can also add text to button
Stars: ✭ 222 (+552.94%)
Mutual labels:  android-development, android-ui

QuestionnaireView

A simple view to be able to display question and various field (Radio, EditText, checkbox ) for answers

Including in your project

allprojects {
	repositories {
		maven { url 'https://jitpack.io' }
	}
}
dependencies {
	compile 'com.github.alfredayibonte:QuestionnaireView:0.1.1'
}

Usage

public class MainActivity extends AppCompatActivity implements
        RadioListAdapter.OnRadioItemClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        QuestionnaireView questionnaireView = (QuestionnaireView)findViewById(R.id.questionnaire);
        questionnaireView.setQuestion("What is the name of this library ?");
        questionnaireView.setViewType(AnswerType.RADIO);
        CharSequence[] answers = new CharSequence[]{
                        "Questionnaire", "QuestionnaireView", "Question"};
        questionnaireView.setAnswers(answers);
        questionnaireView.addRadioItemListener(this);
    }

    @Override
    public void onRadioItemClick(List<Answer> answers) {
        Log.e("radio answers: ", answers.toString());
    }
}
public class MainActivity extends AppCompatActivity implements TextWatcher {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        QuestionnaireView questionnaireView = (QuestionnaireView)findViewById(R.id.questionnaire);
        questionnaireView.setQuestion("<h1 style='color: red;'>What is the name of this library ?</h1>");
        questionnaireView.setViewType(AnswerType.EDITTEXT);
        questionnaireView.addTextChangedListener(this);
    }

    @Override
    public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {

    }

    @Override
    public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
        Log.e(MainActivity.class.getSimpleName(), charSequence.toString());
    }

    @Override
    public void afterTextChanged(Editable editable) {

    }
}

APIs offered by QuestionnaireView.

APIs Usage
setQuestion(String text) Set the question on a webview
setViewType(int viewType) Set the viewType to either RADIO, EDITTEXT or CHECKLIST
addRadioItemListener(OnRadioItemClickListener listener) Sets a listener for radioButton
addCheckItemListener(OnCheckItemClickListener listener) Sets a listener for check list
addOnEditorActionListener(OnEditorActionListener listener) Sets a listener for EditText
addTextChangedListener(TextWatcher watcher) Sets a watcher for EditText
setAnswers(CharSequence[] answers) Sets all possible answers for radio and checklist
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].