1 | package org.greenstone.android.tipple.base;
|
---|
2 |
|
---|
3 | import android.content.Context;
|
---|
4 | import android.content.Intent;
|
---|
5 | import android.view.Display;
|
---|
6 | import android.view.View;
|
---|
7 | import android.view.ViewGroup;
|
---|
8 | import android.widget.Button;
|
---|
9 | import android.widget.LinearLayout;
|
---|
10 |
|
---|
11 | public class ARLauncherView extends LinearLayout {
|
---|
12 | protected Button ar_mode_button_;
|
---|
13 | //private ArDirection direction;***
|
---|
14 |
|
---|
15 | public ARLauncherView(final Context context) {
|
---|
16 | super(context);
|
---|
17 |
|
---|
18 | LayoutParams layout_params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT, 1);
|
---|
19 | //direction = new ArDirection(context, layout_params);**********>
|
---|
20 |
|
---|
21 | ar_mode_button_ = new Button(context);
|
---|
22 | ar_mode_button_.setLayoutParams(layout_params);
|
---|
23 | ar_mode_button_.setText("AR Mode");
|
---|
24 | ar_mode_button_.setEnabled(true);
|
---|
25 |
|
---|
26 | ar_mode_button_.setOnClickListener(new View.OnClickListener() {
|
---|
27 | public void onClick(View v) {
|
---|
28 | context.startActivity(new Intent(context, ARActivity.class));
|
---|
29 | }
|
---|
30 | });
|
---|
31 |
|
---|
32 | addView(ar_mode_button_);
|
---|
33 | }
|
---|
34 | } |
---|