All Questions
304
questions
0
votes
1
answer
52
views
Activity loading after 5-6 seconds in Android
I am working on an app and here it takes 5-6 sec to load the activity when I open the app, I know it is because of the dates I have got of 10 years in the viewpager but how do I fix that and load it ...
0
votes
1
answer
210
views
how to get date without depending on systems date [duplicate]
i want to get the date and time without using the systems date
i am using android studio emulator changing emulators date.
ex: todays date is 2 Feb 2023 but i change my devices date to 26 Feb 2023. i ...
0
votes
0
answers
25
views
How to calculate amount of days passed from one date to another in Android Studio with java? [duplicate]
I picked 27th jan 2023
This app calculates which week of the semester the selected date is. It works fine. But I need to add more functionality.
I picked 27th jan 2023 and I need to calculate amount ...
0
votes
1
answer
1k
views
how to change date formate this coming data api 2023-01-02 formate 02-01-2023 [duplicate]
2023-01-02 are coming from this text api. Not sure how to change them to 02-01-2023```
TextView txt_Date_Number;
txt_Date_Number.setText(post.Date_Number);
txt_Date_Number = findViewById(R.id....
0
votes
0
answers
141
views
Android Calendar doesn't add Day
val dayCalendar = Calendar.getInstance()
dayCalendar.time = entryDateC.time
for (day in 1..howManyDays) {
dayCalendar.add(Calendar.DAY_OF_MONTH, 1)
if (!disabledDays.contains(...
0
votes
1
answer
345
views
How to store day time slots that generates weekly
Let's say i have an app with a calendar each day is divided into time-slots, example :
Monday : 8-10h 10-12h 12-14h
Tuesday : 8-10h 10-12h 12-14h
and every time slot has an event and the calender is ...
0
votes
3
answers
1k
views
Generate 72 hours of timeslots with 15 minutes of interval in android
I am trying to generate an array of 72 hours timeslots with 15 minutes of interval but it starts with 00:00 after 24 hours, so basically it prints whole 24 hours timeslots 3 times, but i want to start ...
1
vote
1
answer
120
views
Calculating TimeInMillis value for alternate days for the next 30 days gives me wrong dates in Kotlin
I wanted to get the TimeInMillis value for alternate dates for the next 30 days from any selected date. I tried to get value for the dates using a for loop. But the code always returns the last 3 ...
0
votes
3
answers
3k
views
Getting Date with Start time of the Day
I am using below function to take the today's date :
fun getCurrentDateTime(dateFormat: String): String {
val Datetime: String
val c = Calendar.getInstance()
val dateformat = ...
1
vote
4
answers
964
views
How to get day of the week, day of month, month and year?
The below code is to check the day of the week, now I want to check the date, month, year ...how to modify it?
import java.util.Calendar
ImageView imageView;
Calendar cal = Calendar.getInstance();
...
0
votes
1
answer
548
views
Filter json response accordingly to time stamp in kotlin
Hey I have json response coming from retrofit. I want to filter accordingly to sentAt property. I want to compare latest time and move block accordingly to that. Right now in my json there is 4 items/...
1
vote
1
answer
55
views
How do I disable future dates in MyCalender DialogFragment in android studios?
This is my code in this MyCalendar.java. I want to disable the future dates in my android application. I am a beginner in android studios so I am not familiar with most of its function. Can some one ...
0
votes
2
answers
488
views
Android Calendar.getTime().getTime() always returning -1 day
I creating calendar instance by providing timezone and then setting day, month and year to calendar. But when I am trying to gettime in millisecond then it always returning dateTime in millisecond -1 ...
0
votes
1
answer
43
views
Android: How to show Datepicker for March only
Is it possible to show dates of MARCH month only inside datepicker? eg: user can only select/view dates from march month and can't change months.
Thanks
<DatePicker
android:layout_width="...
3
votes
2
answers
847
views
How to store 24 Hour format in list in Android Kotlin
Hey I want to return a list of time object of 24 hours of time frame. It means i need a logic to get hours in a list starting from 00.00 to 23.00. Inside the list [00.00,01.00,02.00,.....23.00]
. If i ...