Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
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
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
16c12682
Commit
16c12682
authored
10 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
fine-tune rotate button size and positino
parent
107f24ad
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
contrib/mobile/Android/src/org/geuz/onelab/ModelFragment.java
+11
-2
11 additions, 2 deletions
...rib/mobile/Android/src/org/geuz/onelab/ModelFragment.java
with
11 additions
and
2 deletions
contrib/mobile/Android/src/org/geuz/onelab/ModelFragment.java
+
11
−
2
View file @
16c12682
...
...
@@ -26,6 +26,7 @@ import android.widget.ProgressBar;
import
android.widget.RelativeLayout
;
import
android.widget.SeekBar
;
import
android.widget.TextView
;
import
android.util.TypedValue
;
public
class
ModelFragment
extends
Fragment
{
...
...
@@ -101,7 +102,7 @@ public class ModelFragment extends Fragment{
RelativeLayout
topRightLayout
=
new
RelativeLayout
(
container
.
getContext
());
ImageButton
rotationButton
=
new
ImageButton
(
container
.
getContext
());
rotationButton
.
setBackgroundResource
(
R
.
drawable
.
icon_rotate
);
rotationButton
.
setLayoutParams
(
new
LinearLayout
.
LayoutParams
(
6
5
,
6
5
));
rotationButton
.
setLayoutParams
(
new
LinearLayout
.
LayoutParams
(
6
0
,
6
0
));
rotationButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
v
)
{
boolean
rotate
=
!
_glView
.
getRotate
();
...
...
@@ -112,7 +113,15 @@ public class ModelFragment extends Fragment{
topRightLayout
.
addView
(
rotationButton
);
RelativeLayout
.
LayoutParams
layoutParams
=
new
RelativeLayout
.
LayoutParams
(
RelativeLayout
.
LayoutParams
.
WRAP_CONTENT
,
RelativeLayout
.
LayoutParams
.
WRAP_CONTENT
);
layoutParams
.
setMargins
(
20
,
140
,
20
,
0
);
TypedValue
tv
=
new
TypedValue
();
int
actionBarHeight
=
80
;
if
(
container
.
getContext
().
getTheme
().
resolveAttribute
(
android
.
R
.
attr
.
actionBarSize
,
tv
,
true
)){
actionBarHeight
=
TypedValue
.
complexToDimensionPixelSize
(
tv
.
data
,
getResources
().
getDisplayMetrics
());
}
layoutParams
.
setMargins
(
0
,
actionBarHeight
+
20
,
20
,
0
);
layoutParams
.
addRule
(
RelativeLayout
.
ALIGN_PARENT_TOP
);
layoutParams
.
addRule
(
RelativeLayout
.
ALIGN_PARENT_RIGHT
);
glViewLayout
.
addView
(
topRightLayout
,
layoutParams
);
...
...
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