Skip to content

Tag: android

What code solution to these ranges in java [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year. Improve this question Hello I would like to make a method that takes a given weight and windspeed …

Cannot resolve class TextView, ImageView, LinearLayout,

When I want to create TextView, ImageView and … in my file xml, everything turns red and tag style appears instead of height and width the I have to copy and paste any features manually. The app will run although everything is red, like the attached photo. I also have cleared the cache through File -&gt…

Loop Object from a single Array

im sending a Json Array from Activity A to Activity B, and i want to populate that Json Array into Spinner in Activity B. but when i Log the json array from Activity A, the data becomes a single object “NVAKSINATOR” : [{“NVAKSINATOR”:”[{“NVAKSINATOR”:”20800&#824…

How to arrange list item in spinner in ascending order

How to arrange items in list descending instead of the image: to be like this: and this is the below adapter I use: and this is the setupPrice() method which I need to arrange the entities in: Answer You can implement a Comparator like this for your Sm class before passing it into the adapter. Just like what …

Call method in Fragment from some class

I’ve been working on Android App in AndroidStudio. Application has Fragment, let’s call it MainFragment, and seperate Java Class file, let’s call it SQLiteControler.class The problem is when i try to call method from Fragment in SQLiteController im getting null object reference as error Here…