[Solved] creat empty array of strings

Don’t create individual string array.You can use Arraylist to make a dynamic String array. ArrayList<String> images =new ArrayList<String>(); to insert values.Just use add() method. For example,You want to store iamgeUrls then : images.add(image1); images.add(image2); And to retrieve data use get() method.Example : images.get(position); //where position is the index of imageUrl you want to retrieve. 0 … Read more

[Solved] passing data from service to fragment giving null point

Instead of passing data indirectly i used the direct way and i set like this in service Intent intent = new Intent(); intent.setAction(MY_ACTION); intent.putExtra(“DATAPASSED”, activeAudio.getTitle()); intent.putExtra(“ALBUM_DATA”,activeAudio.getAlbum()); sendBroadcast(intent); in my fragment @Override public void onStart() { super.onStart(); myReceiver = new MyReceiver(); IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(MediaService.MY_ACTION); getActivity().registerReceiver(myReceiver, intentFilter); } private class MyReceiver extends BroadcastReceiver { … Read more

[Solved] what is this image gallery called in android [closed]

Its called Carousel See this: carousel layout android If you want 3 D Carousel, you can see this post You would need to create a custom class for your images, which extends ImageView. EXAMPLE: public class CarouselImageView extends ImageView implements Comparable<carouselimageview> { private int index; private float currentAngle; private float x; private float y; private … Read more

[Solved] java.lang.NumberFormatException: For input string: “2019-11-27”

LocalDate and ThreeTenABP String dateString = “2019-11-27”; LocalDate date = LocalDate.parse(dateString); int epochDay = (int) date.toEpochDay(); System.out.println(epochDay); This snippet outputs: 18227 The documentation explains: The Epoch Day count is a simple incrementing count of days where day 0 is 1970-01-01 (ISO). So my suggestion is that this number is fine for feeding into your BarEntry … Read more

[Solved] Only the last element is shown in Firebase database

What your code doing is just replacing the current text in the TextView with the factdata.getFactDetail(). For example you have 3 elements 1, 2, and 3. Then you want to display the element inside the TextView. With your code, this is what happen First iteration: element = elements[0]; // element = 1 factViewBox.setText(element); // TextView … Read more

[Solved] Facebook API PHP or Android

A profile picture is basically just a Photo object in API terms, and as such can be liked as described here: https://developers.facebook.com/docs/graph-api/reference/photo/likes#Creating solved Facebook API PHP or Android

[Solved] Changing the look and feel of default .setError(“I dont like your pink color”); [closed]

OK, I’ll assume that you mean EditText.setError() Extend TextView in your own custom class and override setError() to do whatever you want. You could start with the Android source to see the default implementation. EditText source 2 solved Changing the look and feel of default .setError(“I dont like your pink color”); [closed]

[Solved] application show unfortunately CustumMenuActivity has stopped

So problem shouldn’t be tricky. Your problem is: Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is ‘android.R.id.list’ It means that you ListView should have id attibute android.R.id.list <ListView android:id=”@android:id/list” … /> Similar topic: runtime exception ListView whose id attribute is ‘android.R.id.list’ 0 solved application show unfortunately CustumMenuActivity has stopped

[Solved] Where to store app data?

I recommend for you the SharedPreferences. This is an in Android simple class, that stores you data in Key-Value sets. Here is the code: SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); This initialize your SharedPreferences. If you want to write/change a value, do this: SharedPreferences.Editor editor = sharedPref.edit(); editor.putInt(“KEY_TO_VALUE”, 123); editor.commit(); You also can put in there other … Read more