TG Telegram Group & Channel
🔴 ANDROID PROGRAMMING CHANNEL | United States America (US)
Create: Update:

fun Get_date(){
binding?.progressWheel!!.visibility=View.GONE
val bottomshit = BottomSheetDialog(requireActivity(), R.style.BottomSheetDialogTheme)
val view = LayoutInflater.from(requireActivity()).inflate(R.layout.bottomsheet_date, null)
val date=view.findViewById<PersianLinearDatePicker>(R.id.datePicker)
val Im_back=view.findViewById<ImageView>(R.id.Im_back)
date.setOnDateChangedListener { year, month, day ->

val d:String
val m:String
when (day) {
1 -> {
d="01"
}
2 -> {
d="02"
}
3 -> {
d="03"
}
4 -> {
d="04"
}
5 -> {
d="05"
}
6 -> {
d="06"
}
7 -> {
d="07"
}
8 -> {
d="08"
}
9 -> {
d="09"
}
else -> {
d= day.toString()
}
}

when (month) {
1 -> {
m="01"
}
2 -> {
m="02"
}
3 -> {
m="03"
}
4 -> {
m="04"
}
5 -> {
m="05"
}
6 -> {
m="06"
}
7 -> {
m="07"
}
8 -> {
m="08"
}
9 -> {
m="09"
}
else -> {
m= month.toString()
}
}

var y:String = year.toString()
var sum= y+"/"+m+"/"+d
binding?.TvDate?.text=sum
}
Im_back.setOnClickListener {
bottomshit.dismiss()
}
bottomshit.setContentView(view)
bottomshit.show()
}

fun Get_date(){
binding?.progressWheel!!.visibility=View.GONE
val bottomshit = BottomSheetDialog(requireActivity(), R.style.BottomSheetDialogTheme)
val view = LayoutInflater.from(requireActivity()).inflate(R.layout.bottomsheet_date, null)
val date=view.findViewById<PersianLinearDatePicker>(R.id.datePicker)
val Im_back=view.findViewById<ImageView>(R.id.Im_back)
date.setOnDateChangedListener { year, month, day ->

val d:String
val m:String
when (day) {
1 -> {
d="01"
}
2 -> {
d="02"
}
3 -> {
d="03"
}
4 -> {
d="04"
}
5 -> {
d="05"
}
6 -> {
d="06"
}
7 -> {
d="07"
}
8 -> {
d="08"
}
9 -> {
d="09"
}
else -> {
d= day.toString()
}
}

when (month) {
1 -> {
m="01"
}
2 -> {
m="02"
}
3 -> {
m="03"
}
4 -> {
m="04"
}
5 -> {
m="05"
}
6 -> {
m="06"
}
7 -> {
m="07"
}
8 -> {
m="08"
}
9 -> {
m="09"
}
else -> {
m= month.toString()
}
}

var y:String = year.toString()
var sum= y+"/"+m+"/"+d
binding?.TvDate?.text=sum
}
Im_back.setOnClickListener {
bottomshit.dismiss()
}
bottomshit.setContentView(view)
bottomshit.show()
}


>>Click here to continue<<

🔴 ANDROID PROGRAMMING CHANNEL




Share with your best friend
VIEW MORE

United States America Popular Telegram Group (US)