in Education by
I am able to modify my first spinner but not sure how to do the second one in java. Here is what I am trying, I get no blanent errors but my apk fc's when I launch the activity. Could someone help me with what java code should like when you overide two things in the same layout and the same acvity? Thanks in advance. (now back to searching for an example) package com.wbhome.mytrial; import android.os.Bundle; import android.widget.ArrayAdapter; import android.widget.Spinner; public class m5isoActivity extends m5Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.scores); Spinner localSpinner = (Spinner)findViewById(R.id.iso_pbar_spinner); ArrayAdapter adapter = ArrayAdapter.createFromResource(this, R.array.iso_pbar_list, R.layout.my_normal_spinner_style); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); localSpinner.setAdapter(adapter); } { Spinner localSpinner = (Spinner)findViewById(R.id.iso_sp_spinner); ArrayAdapter adapter = ArrayAdapter.createFromResource(this, R.array.iso_sp_list, R.layout.my_normal_spinner_style); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); localSpinner.setAdapter(adapter);} } JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
I don't think your compiler works, it should points red warnings (errors), because you're creating two Spinners with the same name and the same thing for ArrayAdapter. At least change the variable's names.

Related questions

0 votes
    When two threads access the same ArrayList object what is the outcome of the program? (a) Both are able ... Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    What will happen if two thread of the same priority are called to be processed simultaneously? (a) Anyone ... Multithreading of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    What happens when we access the same variable defined in two interfaces implemented by the same class? (a) ... Packages of Java Select the correct answer from above options...
asked Feb 23, 2022 in Education by JackTerrance
0 votes
    When does Exceptions in Java arises in code sequence? (a) Run Time (b) Compilation Time (c) Can Occur ... Exception Handling of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Java code is embedded under which tag in JSP? (a) Declaration (b) Scriptlet (c) Expression (d) Comment This ... JSP & API of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    What are the two types of Streams offered by java 8? (a) sequential and parallel (b) sequential and random ... & Miscellaneous of Java Select the correct answer from above options...
asked Feb 23, 2022 in Education by JackTerrance
0 votes
    I have two modules. App and module Test. Module app contains MainActivity with button. Module Test contains ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 30, 2022 in Education by JackTerrance
0 votes
    Which of these method is used to tell the calling thread to give up a monitor and go to sleep until ... division Multithreading of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of this access specifies can be used for a class so that its members can be accessed by a different class ... & Packages of Java Select the correct answer from above options...
asked Feb 23, 2022 in Education by JackTerrance
0 votes
    Which mode allows us to run program interactively while watching source code and variables during execution? (a) ... Servlet of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    The semicolon (;) at the end of the code is the thing which is got me lost. private View. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    The semicolon (;) at the end of the code is the thing which is got me lost. private View. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    The semicolon (;) at the end of the code is the thing which is got me lost. private View. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    Which part of code gets executed whether exception is caught or not? (a) finally (b) try (c) catch (d ... Exception Handling of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of this package is used for analyzing code during run-time? (a) java.applet (b) java.awt (c) ... Interfaces & Packages of Java Select the correct answer from above options...
asked Feb 23, 2022 in Education by JackTerrance
...