android - How to set CheckBox or Radio button at same place in layout screen? -


fisrt have json data

[{"test_id":"6","question_text":"what length of train?","answer_set_id":"1","correct_answer":"4","correct_answer_text":null,answer_choice_1":"45 km\/hr","answer_choice_2":"50 km\/hr","answer_choice_3":"54 km\/hr","answer_choice_4":"55 km\/hr","answer_type":"checkbox"},  {"test_id":"6","question_text":" speed of train is:","answer_set_id":"2","correct_answer":"2","answer_choice_1":"45 km\/hr","answer_choice_2":"50 km\/hr","answer_choice_3":"54 km\/hr","answer_choice_4":"55 km\/hr","answer_type":"radio"},}  

parse json of answer type show checkbox or radio button @ same place. if checkbox show 4 checkbox in layout if radio show 4 radio button @ same place means replace checkbox @ radio button , vice versa. how please me guys??

you can inflate view

how inflate 1 view layout

or set views android:visibility="gone" or android:visibility="visible"


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -