fix: show individual chips
This commit is contained in:
parent
380e4ff77e
commit
68ec3499ea
|
@ -239,16 +239,21 @@ public class EditTimelinesFragment extends MastodonRecyclerFragment<TimelineDefi
|
||||||
|
|
||||||
private boolean setTagListContent(NachoTextView editText, @Nullable List<String> tags) {
|
private boolean setTagListContent(NachoTextView editText, @Nullable List<String> tags) {
|
||||||
if (tags == null || tags.isEmpty()) return false;
|
if (tags == null || tags.isEmpty()) return false;
|
||||||
editText.setText(String.join(",", tags));
|
editText.setText(tags);
|
||||||
editText.chipifyAllUnterminatedTokens();
|
editText.chipifyAllUnterminatedTokens();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private NachoTextView prepareChipTextView(NachoTextView nacho) {
|
private NachoTextView prepareChipTextView(NachoTextView nacho) {
|
||||||
nacho.addChipTerminator(',', BEHAVIOR_CHIPIFY_ALL);
|
//I’ll Be Back
|
||||||
nacho.addChipTerminator('\n', BEHAVIOR_CHIPIFY_ALL);
|
nacho.setChipTerminators(
|
||||||
nacho.addChipTerminator(' ', BEHAVIOR_CHIPIFY_ALL);
|
Map.of(
|
||||||
nacho.addChipTerminator(';', BEHAVIOR_CHIPIFY_ALL);
|
',', BEHAVIOR_CHIPIFY_ALL,
|
||||||
|
'\n', BEHAVIOR_CHIPIFY_ALL,
|
||||||
|
' ', BEHAVIOR_CHIPIFY_ALL,
|
||||||
|
';', BEHAVIOR_CHIPIFY_ALL
|
||||||
|
)
|
||||||
|
);
|
||||||
nacho.enableEditChipOnTouch(true, true);
|
nacho.enableEditChipOnTouch(true, true);
|
||||||
nacho.setOnFocusChangeListener((v, hasFocus) -> nacho.chipifyAllUnterminatedTokens());
|
nacho.setOnFocusChangeListener((v, hasFocus) -> nacho.chipifyAllUnterminatedTokens());
|
||||||
return nacho;
|
return nacho;
|
||||||
|
|
Loading…
Reference in New Issue