Java Code Examples for com.pluscubed.logcat.helper.SaveLogHelper#getLastModifiedDate()
The following examples show how to use
com.pluscubed.logcat.helper.SaveLogHelper#getLastModifiedDate() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LogFileAdapter.java From java-n-IDE-for-Android with Apache License 2.0 | 5 votes |
@NonNull @Override public View getView(int position, View view, @NonNull ViewGroup parent) { Context context = parent.getContext(); if (view == null) { LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); view = inflater.inflate(resId, parent, false); } CheckBox box = (CheckBox) view.findViewById(android.R.id.checkbox); RadioButton button = (RadioButton) view.findViewById(android.R.id.button1); TextView text1 = (TextView) view.findViewById(android.R.id.text1); TextView text2 = (TextView) view.findViewById(android.R.id.text2); CharSequence filename = objects.get(position); text1.setText(filename); if (multiMode) { box.setChecked(checkedItems[position]); } else { button.setChecked(checked == position); } Date lastModified = SaveLogHelper.getLastModifiedDate(filename.toString()); DateFormat dateFormat = DateFormat.getDateTimeInstance(); text2.setText(dateFormat.format(lastModified)); return view; }
Example 2
Source File: LogFileAdapter.java From javaide with GNU General Public License v3.0 | 5 votes |
@NonNull @Override public View getView(int position, View view, @NonNull ViewGroup parent) { Context context = parent.getContext(); if (view == null) { LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); view = inflater.inflate(resId, parent, false); } CheckBox box = (CheckBox) view.findViewById(android.R.id.checkbox); RadioButton button = (RadioButton) view.findViewById(android.R.id.button1); TextView text1 = (TextView) view.findViewById(android.R.id.text1); TextView text2 = (TextView) view.findViewById(android.R.id.text2); CharSequence filename = objects.get(position); text1.setText(filename); if (multiMode) { box.setChecked(checkedItems[position]); } else { button.setChecked(checked == position); } Date lastModified = SaveLogHelper.getLastModifiedDate(filename.toString()); DateFormat dateFormat = DateFormat.getDateTimeInstance(); text2.setText(dateFormat.format(lastModified)); return view; }
Example 3
Source File: LogFileAdapter.java From matlog with GNU General Public License v3.0 | 5 votes |
@NonNull @Override public View getView(int position, View view, @NonNull ViewGroup parent) { Context context = parent.getContext(); if (view == null) { LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); view = inflater.inflate(resId, parent, false); } CheckBox box = view.findViewById(android.R.id.checkbox); RadioButton button = view.findViewById(android.R.id.button1); TextView text1 = view.findViewById(android.R.id.text1); TextView text2 = view.findViewById(android.R.id.text2); CharSequence filename = objects.get(position); text1.setText(filename); if (multiMode) { box.setChecked(checkedItems[position]); } else { button.setChecked(checked == position); } Date lastModified = SaveLogHelper.getLastModifiedDate(filename.toString()); DateFormat dateFormat = DateFormat.getDateTimeInstance(); text2.setText(dateFormat.format(lastModified)); return view; }