[Solved] TextView isn’t updated with JSON Response

GetYouTubeUserCommentsTask task = new GetYouTubeUserCommentsTask(null, viewCount); // passing null. And you have public GetYouTubeUserCommentsTask(Handler replyTo, String username) { this.replyTo = replyTo; // replyTo is null this.username = username; } replyTo is null. You need to Initialize the handler replyTo 10 solved TextView isn’t updated with JSON Response

[Solved] Listview filling from database

Your question is a bit too generic and not clearly defined. That’s probably why it got down voted. I’d say your best bet is to start with the documentation. Start by reading about ListView and possibly Adapter and try it yourself. If you still have problems, ask a specific question about something you don’t understand … Read more

[Solved] how to change spinner text size and color, not in the popup window?

Use the below adapter constructor for customizing spinner in the way you required. spinnerAdapter = new ArrayAdapter(this, R.layout.row_spinner /* The resource ID for a layout file containing a layout to use when instantiating views. */ ,android.R.id.text1, array); And you can set the layout resource defining the drop down views using spinnerAdapter.setDropDownViewResource(R.layout.layout_spinner); Sample layouts row_spinner <?xml … Read more

[Solved] Java/Android, Multiple Classes

You should have every activity in a separate file. If you have helper classes that that are only used in one activity you can use an inner class or put it below the other one (not public). Activities should be separate files. What you could do is put code that has to be in the … Read more

[Solved] How to use SharedPreferences to change view visibility in login and logout

To place info into SharedPreferences you should write following: SharedPreferences sp = getSharedPreferences(PREFERNCES_FILE, MODE_PRIVATE); sp.edit().putString(PREFERENCES_LOGIN, login).apply(); Variables PREFERNCES_FILE and PREFERENCES_LOGIN should be defined as String: public static final String PREFERNCES_FILE = “my_preferences_file”; public static final String PREFERENCES_LOGIN = “login”; On logout there should be: sp.edit().remove(PREFERENCES_LOGIN).apply(); Then to check if there is allready some info call: … Read more

[Solved] Android fragment null pointer exception on rootView [closed]

Would you mind moving Intent checkTTSIntent = new Intent(); checkTTSIntent.setAction(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA); startActivityForResult(checkTTSIntent, MY_DATA_CHECK_CODE); To the onViewCreated methode? And where is the part where you setOnInitListener to the fragment implementation? 7 solved Android fragment null pointer exception on rootView [closed]