我需要在圖像上傳操作啓動到數據庫時在我的用戶界面中設置當前日期。我在Adapter上的上傳按鈕代碼和片段上的方法。我怎樣才能調用代碼?再一次,我只需要在我的應用程序中顯示當前日期。謝謝如何在TextView中設置當前日期
public MyViewHolder(View view) {
super(view);
input_tgl = (TextView) view.findViewById(R.id.input_tgl_terima);
String dateApp = new SimpleDateFormat("dd-MMM-yyyy").format(new Date());
final String strDateApp = dateApp.replaceAll("-", " ");