Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
Course Queries Syllabus Queries 2 years ago
Posted on 16 Aug 2022, this text provides information on Syllabus Queries related to Course Queries. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
Till now I am getting JSON and putting them in 3 different spinners. But the problem is that how to make 2nd spinner data based on the 1st spinner and 3rd spinner data based on the 2nd spinner.
This is my code for JSON. try { // Locate the NodeList name jsonarray = jsonobject.getJSONArray("results"); for (int i = 0; i < jsonarray.length(); i++) { jsonobject = jsonarray.getJSONObject(i); Results worldpop = new Results(); worldpop.setSyllabus(jsonobject.optString("syllabus")); worldpop.setGrade(jsonobject.optString("grade")); worldpop.setSubject(jsonobject.optString("subject")); //worldpop.setFlag(jsonobject.optString("flag")); world.add(worldpop); worldlist.add(jsonobject.optString("syllabus")); worldlist2.add(jsonobject.optString("grade")); worldlist3.add(jsonobject.optString("subject")); } } catch (Exception e) { Log.e("Error", e.getMessage()); e.printStackTrace(); } return null; } @Override protected void onPostExecute(Void args) { // Locate the spinner in activity_main.xml final Spinner mySpinner = (Spinner) findViewById(R.id.syllabus); Spinner mySpinner2 = (Spinner) findViewById(R.id.grade); Spinner mySpinner3 = (Spinner) findViewById(R.id.subject); // Spinner adapter LinkedHashSet<String> listToSet = new LinkedHashSet<String>(worldlist); //Creating Arraylist without duplicate values final List<String> worldlistnew = new ArrayList<String>(listToSet); mySpinner .setAdapter(new ArrayAdapter< REPLY 0 views 0 likes 0 shares Facebook Twitter Linked In WhatsApp
Here is the answer. In this example depending on first spinner second spinner values gets changes. and it will also change the text in the actitivty, which ever value you are selecting in second spinner. If this helps you please vote.
import android.os.Bundle; import android.app.Activity; import android.content.Intent; import android.text.Html; import android.view.Menu; import android.view.View.OnClickListener; import java.util.ArrayList; import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemSelectedListener; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ImageView; import android.widget.Spinner; import android.widget.TextView; public s://forum.tuteehub.com/tag/class">class Courses extends Activity { Spinner s1,s2; TextView seats_t,t2,hod_det; ImageView im1; String s; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.courses); s1 = (Spinner) findViewById(R.id.grad); s2 = (Spinner) findViewById(R.id.streams); seats_t=(TextView)findViewById(R.id.about1); t2=(TextView)findViewById(R.id.hodname1); hod_det=(TextView)findViewById(R.id.hoddetails); im1=(ImageView)findViewById(R.id.hodimage); t2. REPLY 0 views 0 likes 0 shares Facebook Twitter Linked In WhatsApp
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Course Queries 4 Answers
Course Queries 5 Answers
Course Queries 1 Answers
Course Queries 3 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.