mirror of
https://gitlab.com/oeffi/oeffi.git
synced 2025-07-19 00:39:51 +00:00
LineView: Show full line name on long press.
This commit is contained in:
parent
aa7ce11dd0
commit
18229f3f05
1 changed files with 11 additions and 0 deletions
|
@ -21,6 +21,7 @@ import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import de.schildbach.oeffi.R;
|
import de.schildbach.oeffi.R;
|
||||||
|
import de.schildbach.oeffi.util.CheatSheet;
|
||||||
import de.schildbach.pte.dto.Line;
|
import de.schildbach.pte.dto.Line;
|
||||||
import de.schildbach.pte.dto.Line.Attr;
|
import de.schildbach.pte.dto.Line.Attr;
|
||||||
import de.schildbach.pte.dto.Style;
|
import de.schildbach.pte.dto.Style;
|
||||||
|
@ -121,8 +122,18 @@ public class LineView extends TextView {
|
||||||
}
|
}
|
||||||
|
|
||||||
setText(text);
|
setText(text);
|
||||||
|
if (lines.size() == 1) {
|
||||||
|
final String name = lines.iterator().next().name;
|
||||||
|
if (name != null)
|
||||||
|
CheatSheet.setup(this, name);
|
||||||
|
else
|
||||||
|
CheatSheet.remove(this);
|
||||||
|
} else {
|
||||||
|
CheatSheet.remove(this);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
setText(null);
|
setText(null);
|
||||||
|
CheatSheet.remove(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue