Some changes

This commit is contained in:
tom79 2019-09-28 18:49:38 +02:00
parent 58b017ed7d
commit ec8eacf521
4 changed files with 14 additions and 2 deletions

View File

@ -459,7 +459,7 @@ public class PixelfedListAdapter extends RecyclerView.Adapter implements OnPostA
theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
holder.quick_reply_container.setVisibility(View.VISIBLE);
holder.pf_description.setText(status.getContentSpan(), TextView.BufferType.SPANNABLE);
holder.pf_date.setText(Helper.dateToString(status.getCreated_at()));
holder.pf_date.setText(Helper.longDateToString(status.getCreated_at()));
holder.quick_reply_text.setHint(R.string.leave_a_comment);
holder.quick_reply_button.setText(R.string.post);
holder.pf_comment.setOnClickListener(new View.OnClickListener() {

View File

@ -811,6 +811,17 @@ public class Helper {
return dateFormat.format(date);
}
/**
* Convert a date in String
*
* @param date Date
* @return String
*/
public static String longDateToString(Date date) {
DateFormat df = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.SHORT, Locale.getDefault());
return df.format(date);
}
/**
* Convert a date in String -> format yyyy-MM-dd HH:mm:ss
*

View File

@ -103,7 +103,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="top|start"
android:hint="@string/toot_placeholder"
android:hint="@string/pixelfed_compose_placeholder"
android:inputType="textMultiLine|textCapSentences"
android:minLines="6" />
</ScrollView>

View File

@ -1231,4 +1231,5 @@
<string name="add_photo_pixelfed">Click here to add photos</string>
<string name="add_photo_indication_pixelfed">Accepted Formats: jpeg, png, gif \n\nMax File Size: 15 MB \n\nAlbums can contain up to 4 photos or videos</string>
<string name="upload_media">Upload media</string>
<string name="pixelfed_compose_placeholder">Add an optional caption</string>
</resources>