Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
keyboard
LatinIME
Commits
a262144d
Commit
a262144d
authored
10 years ago
by
Tadashi G. Takaoka
Browse files
Options
Downloads
Patches
Plain Diff
Add ViewCompatUtils.setElevation
Bug: 16210054 Change-Id: I632158951a60ab527246410caefd9fbe471dd859
parent
689064d0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/src/com/android/inputmethod/compat/ViewCompatUtils.java
+10
-0
10 additions, 0 deletions
java/src/com/android/inputmethod/compat/ViewCompatUtils.java
with
10 additions
and
0 deletions
java/src/com/android/inputmethod/compat/ViewCompatUtils.java
+
10
−
0
View file @
a262144d
...
...
@@ -31,6 +31,9 @@ public final class ViewCompatUtils {
private
static
final
Method
METHOD_setPaddingRelative
=
CompatUtils
.
getMethod
(
View
.
class
,
"setPaddingRelative"
,
int
.
class
,
int
.
class
,
int
.
class
,
int
.
class
);
// Note that View.setElevation(float) has been introduced in API level 21.
private
static
final
Method
METHOD_setElevation
=
CompatUtils
.
getMethod
(
View
.
class
,
"setElevation"
,
float
.
class
);
private
ViewCompatUtils
()
{
// This utility class is not publicly instantiable.
...
...
@@ -51,4 +54,11 @@ public final class ViewCompatUtils {
}
CompatUtils
.
invoke
(
view
,
null
,
METHOD_setPaddingRelative
,
start
,
top
,
end
,
bottom
);
}
public
static
void
setElevation
(
final
View
view
,
final
float
elevation
)
{
if
(
METHOD_setElevation
==
null
)
{
return
;
}
CompatUtils
.
invoke
(
view
,
null
,
METHOD_setElevation
,
elevation
);
}
}
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