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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arjun Sundaram
Terminal user interface- command line
Commits
7f2385b0
Commit
7f2385b0
authored
9 years ago
by
Francesco
Browse files
Options
Downloads
Patches
Plain Diff
bugfix
parent
c6405c8e
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/src/main/java/ohi/andre/consolelauncher/LauncherActivity.java
+7
-3
7 additions, 3 deletions
...main/java/ohi/andre/consolelauncher/LauncherActivity.java
app/src/main/java/ohi/andre/consolelauncher/tuils/Tuils.java
+12
-6
12 additions, 6 deletions
app/src/main/java/ohi/andre/consolelauncher/tuils/Tuils.java
with
19 additions
and
9 deletions
app/src/main/java/ohi/andre/consolelauncher/LauncherActivity.java
+
7
−
3
View file @
7f2385b0
...
@@ -188,9 +188,10 @@ public class LauncherActivity extends Activity implements Reloadable {
...
@@ -188,9 +188,10 @@ public class LauncherActivity extends Activity implements Reloadable {
protected
void
onStart
()
{
protected
void
onStart
()
{
super
.
onStart
();
super
.
onStart
();
if
(
openKeyboardOnStart
)
if
(
ui
!=
null
&&
openKeyboardOnStart
)
{
ui
.
onStart
();
ui
.
onStart
();
}
}
}
@Override
@Override
protected
void
onResume
()
{
protected
void
onResume
()
{
...
@@ -213,14 +214,17 @@ public class LauncherActivity extends Activity implements Reloadable {
...
@@ -213,14 +214,17 @@ public class LauncherActivity extends Activity implements Reloadable {
protected
void
onDestroy
()
{
protected
void
onDestroy
()
{
super
.
onDestroy
();
super
.
onDestroy
();
if
(
main
!=
null
)
{
main
.
destroy
();
main
.
destroy
();
}
}
}
@Override
@Override
public
void
onBackPressed
()
{
public
void
onBackPressed
()
{
if
(
main
!=
null
)
if
(
main
!=
null
)
{
main
.
onBackPressed
();
main
.
onBackPressed
();
}
}
}
@Override
@Override
public
boolean
onKeyLongPress
(
int
keyCode
,
KeyEvent
event
)
{
public
boolean
onKeyLongPress
(
int
keyCode
,
KeyEvent
event
)
{
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/ohi/andre/consolelauncher/tuils/Tuils.java
+
12
−
6
View file @
7f2385b0
...
@@ -379,12 +379,18 @@ public class Tuils {
...
@@ -379,12 +379,18 @@ public class Tuils {
return
true
;
return
true
;
}
}
public
static
String
trimSpaces
(
String
s
)
{
public
static
CharSequence
trimWhitespaces
(
CharSequence
source
)
{
while
(
s
.
startsWith
(
SPACE
))
s
=
s
.
substring
(
1
);
if
(
source
==
null
)
while
(
s
.
endsWith
(
SPACE
))
return
""
;
s
=
s
.
substring
(
0
,
s
.
length
()
-
1
);
return
s
;
int
i
=
source
.
length
();
// loop back to the first non-whitespace character
while
(--
i
>=
0
&&
Character
.
isWhitespace
(
source
.
charAt
(
i
)))
{
}
return
source
.
subSequence
(
0
,
i
+
1
);
}
}
public
static
String
getSDK
()
{
public
static
String
getSDK
()
{
...
...
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