Skip to content

Tag: android

RecyclerView new items adding issue

I have a RecyclerView, it has 30 items and when I scroll to the end to load another 30 items, it goes to the first item. I tried to get current visible item then scroll to it when new items are added But it is not that smooth. I tried to scroll to listmap.size() but it will force the RecyclerView

MVVM – where should I call for user location?

currently, I’m building an app which will show for the user recent forecast. For make an api call, I have to provide longitude and latitude as parameter. For now, I have written some code about getting langitude, and longitude, but I don’t receive proper data. As I written those methods in MainAct…

Error while sending data with POST request in Android

I always get the same error while sending username and password to server. I need to send data as content type:form-data, because server isn’t responding on any other type. I tested in postman and it’s ok, but when I am trying to send it in code, it’s not working. Can someone help me, thanks…

How to show result with Int on calculator?

I am making the calculator app. It shows double at the result even when I don’t use double. Example) 1+1 = 2.0 But I want like 1+1= 2 Of course, I want to keep double when there is double like 1.2+1.3= 2.5 How should I have to edit? I tried to edit like this, but there is an error. MainActivity