[Solved] Android App crashed with parse in a for loop

Make a check for parseObjects == null as i believe you are getting parseObjects as null. qp.findInBackground(new FindCallback<ParseObject>() { @Override public void done(List<ParseObject> parseObjects, ParseException e) { if (e != null) e.printStackTrace(); if(parseObjects!=null) { for (int i = 0; i < parseObjects.size(); i++) { Photo pp = new Photo(); ParseObject o = parseObjects.get(i); pp.isActive = … Read more

[Solved] Android ProgressBar onclick

I went with a custom seekbar https://github.com/JesusM/HoloCircleSeekBar/blob/master/lib/src/main/java/com/jesusm/holocircleseekbar/lib/HoloCircleSeekBar.java This is a circular seekbar, as per my requirements solved Android ProgressBar onclick

[Solved] Drop down menu UI

use popup window for this type of options: llBack.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { showPopupMenu(); } }); and the showPopupMenu() method is: public void showPopupMenu() { LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE); View popupView = inflater.inflate(R.layout.add_file_lay, this.container, false); popupWindow = new PopupWindow(popupView, popupwidth, WindowManager.LayoutParams.WRAP_CONTENT, true); popupWindow.setOutsideTouchable(true); popupWindow.setBackgroundDrawable(new BitmapDrawable()); popUpwindowinIt(popupView); popupWindow.showAsDropDown(findViewById(R.id.places), 0, 0); } … Read more

[Solved] My app resets data when it is minimized

onStart is called every time the app starts. onCreate on the other hand, is only called when the app starts or after the activity process has been killed and restarted. Usually the last scenario means after onStop is called and the activity process is killed, but it isn’t destroyed yet. Move that code to onCreate, … Read more

[Solved] problems with adding action button in android tutorial

I had the following error: The styles.xml at v14 looked the following <!– Base application theme for API 14+. This theme completely replaces AppBaseTheme from BOTH res/values/styles.xml and res/values-v11/styles.xml on API 14+ devices. –> <style name=”AppBaseTheme” parent=”Theme.AppCompat.Light.DarkActionBar”> <!– API 14 theme customizations can go here. –> </style> The search button was not visible because the … Read more

[Solved] why we use this code please can any one tell me

https://developer.android.com/training/permissions/requesting.html Beginning in Android 6.0 (API level 23), users grant permissions to apps while the app is running, not when they install the app. This approach streamlines the app install process, since the user does not need to grant permissions when they install or update the app. It also gives the user more control over … Read more

[Solved] EditText does not work on FragmentActivity in Android

Try following code Just add your all code on onCreateView() method. @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_layout, container, false); context=getActivity(); btnTest=(Button)context.findViewById(R.id.button1); edtTest=(EditText)context.findViewById(R.id.editText1); edtTest.setText(“Test text”); final AlertDialog.Builder builder = new AlertDialog.Builder(context); builder.setTitle(“Test”); btnTest.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub String str=edtTest.getText().toString(); … Read more

[Solved] There is no error in the code but the button doesn’t perform any action

Try to move the following lines out of the OnClickListener, they should be in the onCreate method: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_register); //… inputUsername = findViewById(R.id.inputUsername); inputEmail = findViewById(R.id.inputEmail); inputPassword = findViewById(R.id.inputPassword); inputCpassword = findViewById(R.id.inputCpassword); btnRegister = findViewById(R.id.btnRegister); btnRegister.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { validations(); } }); // … … Read more