Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
Terminal user interface- command line
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arjun Sundaram
Terminal user interface- command line
Commits
6308e87e
Commit
6308e87e
authored
9 years ago
by
Francesco Andreuzzi
Browse files
Options
Downloads
Patches
Plain Diff
physicalEnter
parent
0e21ec90
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/src/main/java/ohi/andre/consolelauncher/tuils/TerminalAdapter.java
+8
-2
8 additions, 2 deletions
...java/ohi/andre/consolelauncher/tuils/TerminalAdapter.java
with
8 additions
and
2 deletions
app/src/main/java/ohi/andre/consolelauncher/tuils/TerminalAdapter.java
+
8
−
2
View file @
6308e87e
...
@@ -64,7 +64,7 @@ public class TerminalAdapter {
...
@@ -64,7 +64,7 @@ public class TerminalAdapter {
private
OnNewInputListener
mInputListener
;
private
OnNewInputListener
mInputListener
;
public
TerminalAdapter
(
TextView
terminalView
,
EditText
inputView
,
TextView
prefixView
,
TextView
submitView
,
SkinManager
skinManager
,
public
TerminalAdapter
(
TextView
terminalView
,
EditText
inputView
,
TextView
prefixView
,
TextView
submitView
,
SkinManager
skinManager
,
String
hint
)
{
String
hint
,
final
boolean
physicalEnter
)
{
if
(
terminalView
==
null
||
inputView
==
null
||
prefixView
==
null
||
skinManager
==
null
)
if
(
terminalView
==
null
||
inputView
==
null
||
prefixView
==
null
||
skinManager
==
null
)
throw
new
UnsupportedOperationException
();
throw
new
UnsupportedOperationException
();
...
@@ -103,7 +103,9 @@ public class TerminalAdapter {
...
@@ -103,7 +103,9 @@ public class TerminalAdapter {
this
.
mInputView
.
setOnEditorActionListener
(
new
TextView
.
OnEditorActionListener
()
{
this
.
mInputView
.
setOnEditorActionListener
(
new
TextView
.
OnEditorActionListener
()
{
@Override
@Override
public
boolean
onEditorAction
(
TextView
v
,
int
actionId
,
KeyEvent
event
)
{
public
boolean
onEditorAction
(
TextView
v
,
int
actionId
,
KeyEvent
event
)
{
if
(
actionId
==
EditorInfo
.
IME_ACTION_GO
||
actionId
==
EditorInfo
.
IME_ACTION_DONE
)
{
if
(
actionId
==
EditorInfo
.
IME_ACTION_GO
||
actionId
==
EditorInfo
.
IME_ACTION_DONE
||
(
physicalEnter
&&
actionId
==
EditorInfo
.
IME_ACTION_UNSPECIFIED
))
{
onNewInput
();
onNewInput
();
return
true
;
return
true
;
}
else
}
else
...
@@ -185,6 +187,10 @@ public class TerminalAdapter {
...
@@ -185,6 +187,10 @@ public class TerminalAdapter {
}
}
}
}
public
void
simulateEnter
()
{
onNewInput
();
}
public
void
setupScroller
()
{
public
void
setupScroller
()
{
this
.
mTerminalView
.
setMovementMethod
(
new
ScrollingMovementMethod
());
this
.
mTerminalView
.
setMovementMethod
(
new
ScrollingMovementMethod
());
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment