Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
Course Queries Syllabus Queries 2 years ago
Posted on 16 Aug 2022, this text provides information on Syllabus Queries related to Course Queries. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
I am new to in firebase and android also. In my app students can share his question and answer about syllabus. For this i set the time time and date string in firebase database and by the POJO class i retrieve the date and time in String format like Date: 06-April-2019 and time:01:38:24. Till now i used setText in TextView by model.getTime and model.getDate. So this like be a update(TextView) 06-April-2019 01:38:24 now i want to chnage it by Timeago like minute ago, hour ago, day ago, month ago, year ago
Sorry for bad english. and thanx in advance
protected void onBindViewHolder(@NonNull UserViewHolder holder, int position, @NonNull final question model) { final String PostKey=getRef(position).getKey();//get key by this line holder.userfullname.setText(model.getFirstname()+" "+model.getLastname()); holder.time.setText(" "+model.getTime());//***TextView 06-April-2019*** holder.date.setText(" "+model.getDate());//*TextView 01:38:24* holder.description.setText(model.getDescription()); }
With System.currentTimeMillis(); you get the Milliseconds they have passed since 1/1/1970 as long.
So what u wand we can achieve with 2 more custom functions in your adapter.
The first one take ur date and time and convert it to miliseconds.
private long millisFromDateAndTime(String date, String time){ SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MMMM-yyyy"); SimpleDateFormat timeFormat = new SimpleDateFormat("kk:mm:ss"); try { Date mDate = dateFormat.parse(date); Date mTime = timeFormat.parse(time); long dateInMilliseconds = mDate.getTime(); long timeInMilliseconds = mTime.getTime(); return timeInMilliseconds + dateInMilliseconds; } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } return 0; }
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Course Queries 4 Answers
Course Queries 5 Answers
Course Queries 1 Answers
Course Queries 3 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.