Commit 3daae609 by chengxiuhong

test main

parent a298da3f
package com.oo.eye.activity; package com.oo.eye.activity;
import android.bluetooth.BluetoothAdapter; import android.os.Bundle;
import android.os.BatteryManager;
import android.view.View; import android.view.View;
import android.widget.ImageView;
import android.widget.TextClock;
import android.widget.TextView; import android.widget.TextView;
import com.app.baselibrary.base.common.BaseActivity; import com.app.baselibrary.base.common.BaseActivity;
...@@ -21,197 +18,125 @@ import com.oo.eye.bean.EyeHistroyBean; ...@@ -21,197 +18,125 @@ import com.oo.eye.bean.EyeHistroyBean;
import com.oo.eye.manager.DaemonSender; import com.oo.eye.manager.DaemonSender;
import com.oo.eye.mvp.PresenterFactory; import com.oo.eye.mvp.PresenterFactory;
import com.oo.eye.mvp.contract.EyeTestContract; import com.oo.eye.mvp.contract.EyeTestContract;
import com.oo.seex.sys_state.Config;
import com.oo.seex.sys_state.StateListener;
import com.oo.seex.sys_state.state.bean.BaseState;
import com.oo.seex.sys_state.state.bean.BatteryState;
import com.oo.seex.sys_state.state.bean.BluetoothState;
import com.oo.seex.sys_state.state.bean.WifiState;
import butterknife.BindView; import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick; import butterknife.OnClick;
/** /**
*/ */
public class AfterEyeTestActivity extends BaseActivity implements StateListener, EyeTestContract.View{ public class AfterEyeTestActivity extends BaseActivity implements EyeTestContract.View {
private EyeTestContract.Presenter mPresenter; @BindView(R.id.tv_after_title)
TextView mTvAfterTitle;
@BindView(R2.id.system_time_tv) @BindView(R.id.tv_after_name)
TextClock mSystemTimeTv; TextView mTvAfterName;
@BindView(R.id.tv_after_time)
@BindView(R2.id.bluetooth_img) TextView mTvAfterTime;
ImageView mBluetoothImg; @BindView(R.id.tv_after_save)
TextView mTvAfterSave;
@BindView(R2.id.wifi_img) @BindView(R.id.tv_after_give_up)
ImageView mWifiImg; TextView mTvAfterGiveUp;
@BindView(R.id.tv_after_result_left)
@BindView(R2.id.battery_img) TextView mTvAfterResultLeft;
ImageView mBatteryImg; @BindView(R.id.tv_after_result_right)
TextView mTvAfterResultRight;
@BindView(R2.id.battery_tv) private EyeTestContract.Presenter mPresenter;
TextView mBatteryTv;
@BindView(R2.id.tv_after_lift) private EyeHistroyBean mEyeTestBean;
TextView mLiftTv; private double mLeftEye;
@BindView(R2.id.tv_after_name) private double mRightEye;
TextView mNameTv; private int mLeftLine;
@BindView(R2.id.tv_after_result) private int mRightLine;
TextView mResultTv;
@Override
private EyeHistroyBean mEyeTestBean; protected int getLayoutId() {
private double mLeftEye; return R.layout.activity_after_eye_test;
private double mRightEye; }
private int mLeftLine;
private int mRightLine; @Override
@Override protected void init() {
protected int getLayoutId() { PresenterFactory.createEyeTestPresenter(this);
return R.layout.activity_after_eye_test; DaemonSender.closeEyeTest(this);
} mEyeTestBean = EyeConfig.getInstance().getCuurentBean();
if (mEyeTestBean == null) {
@Override mEyeTestBean = new EyeHistroyBean();
protected void init() { mEyeTestBean.setType(2);
PresenterFactory.createEyeTestPresenter(this); }
DaemonSender.closeEyeTest(this); mLeftEye = getIntent().getDoubleExtra("leftEye", 0);
mEyeTestBean = EyeConfig.getInstance().getCuurentBean(); mRightEye = getIntent().getDoubleExtra("rightEye", 0);
if(mEyeTestBean == null){ mLeftLine = getIntent().getIntExtra("leftLine", 0);
mEyeTestBean = new EyeHistroyBean(); mRightLine = getIntent().getIntExtra("rightLine", 0);
mEyeTestBean.setType(2); if (mEyeTestBean != null && mEyeTestBean.getLeft_eye() > 0 && mEyeTestBean.getRight_eye() > 0) {
} double left = CalculateUtils.sub(mLeftEye, mEyeTestBean.getLeft_eye(), 1);
mLeftEye = getIntent().getDoubleExtra("leftEye",0); double right = CalculateUtils.sub(mRightEye, mEyeTestBean.getRight_eye(), 1);
mRightEye = getIntent().getDoubleExtra("rightEye",0); int count = (int) CalculateUtils.add(CalculateUtils.mul(left, 10, 1),
mLeftLine = getIntent().getIntExtra("leftLine",0); CalculateUtils.mul(right, 10, 1), 1);
mRightLine = getIntent().getIntExtra("rightLine",0); String text = "少于1";
if(mEyeTestBean != null && mEyeTestBean.getLeft_eye() > 0 && mEyeTestBean.getRight_eye() > 0 ) { if (count > 0) {
double left = CalculateUtils.sub(mLeftEye,mEyeTestBean.getLeft_eye(),1); text = count + "";
double right = CalculateUtils.sub(mRightEye,mEyeTestBean.getRight_eye(),1); }
int count = (int)CalculateUtils.add(CalculateUtils.mul(left,10,1), }
CalculateUtils.mul(right,10,1),1); mTvAfterName.setText(getString(R.string.after_eye_test_name, EyeConfig.getInstance().getName())
String text= "少于1"; + "(用户" + SnUtils.getSN() + ")");
if(count > 0){ int selectId = PreferencesUtils.getInt(EyeConfig.EYE_SETTING_KEY, 0);
text = count+""; String text = String.valueOf(mLeftEye) + " | " + String.valueOf(mRightEye);
} if (selectId == 1) {
mLiftTv.setText(getString(R.string.after_eye_test_prompt1, "" + text)); text = String.valueOf(Eye.transformSmall(mLeftEye)) + " | "
}else{ + String.valueOf(Eye.transformSmall(mRightEye));
mLiftTv.setText(getString(R.string.after_eye_test_prompt2)); }
} mTvAfterResultLeft.setText(mLeftEye+"");
mNameTv.setText(getString(R.string.after_eye_test_name,EyeConfig.getInstance().getName()) mTvAfterResultRight.setText(mRightEye+"");
+"(用户"+SnUtils.getSN()+")"); }
int selectId = PreferencesUtils.getInt( EyeConfig.EYE_SETTING_KEY,0);
String text = String.valueOf(mLeftEye) + " | " + String.valueOf(mRightEye); protected void onResume() {
if(selectId == 1){ super.onResume();
text = String.valueOf(Eye.transformSmall(mLeftEye)) + " | " NibiruUtils.switchVR(false);
+ String.valueOf(Eye.transformSmall(mRightEye)); }
}
mResultTv.setText(getString(R.string.after_eye_test_result,text));
} @Override
protected void onResume() { protected void onPause() {
super.onResume(); super.onPause();
NibiruUtils.switchVR(false); }
}
@OnClick(R2.id.tv_after_save)
void onClickSave(View view) {
@Override mPresenter.postEyeTestData(this, SnUtils.getSN(),
protected void onPause() { mLeftEye, mRightEye, mLeftLine, mRightLine);
super.onPause(); }
}
@OnClick(R2.id.tv_after_give_up)
@OnClick(R2.id.tv_after_save) void onClickGiveUp(View view) {
void onClickSave(View view){ finish();
mPresenter.postEyeTestData(this,SnUtils.getSN(), }
mLeftEye,mRightEye, mLeftLine,mRightLine);
} public void setPresenter(EyeTestContract.Presenter presenter) {
mPresenter = presenter;
@OnClick(R2.id.tv_after_give_up) }
void onClickGiveUp(View view){
finish(); public void postEyeTestDataSuccee() {
} mEyeTestBean.setLeft_eye(mLeftEye);
mEyeTestBean.setRight_eye(mRightEye);
public void setPresenter(EyeTestContract.Presenter presenter){ mEyeTestBean.setLeft_line(mLeftLine);
mPresenter = presenter; mEyeTestBean.setRight_line(mRightLine);
} EyeConfig.getInstance().setCuurentBean(mEyeTestBean);
if (EyeConfig.getInstance().getInitBean() == null) {
public void postEyeTestDataSuccee(){ EyeConfig.getInstance().setInitBean(mEyeTestBean);
mEyeTestBean.setLeft_eye(mLeftEye); }
mEyeTestBean.setRight_eye(mRightEye); ToastUtil.showLongMessage("数据保存成功");
mEyeTestBean.setLeft_line(mLeftLine); finish();
mEyeTestBean.setRight_line(mRightLine); }
EyeConfig.getInstance().setCuurentBean(mEyeTestBean);
if(EyeConfig.getInstance().getInitBean() == null){ public void postEyeTestDataFail(String msg) {
EyeConfig.getInstance().setInitBean(mEyeTestBean); ToastUtil.showLongMessage("数据保存失败,请重试");
} }
ToastUtil.showLongMessage("数据保存成功");
finish(); @Override
} protected void onCreate(Bundle savedInstanceState) {
public void postEyeTestDataFail(String msg){ super.onCreate(savedInstanceState);
ToastUtil.showLongMessage("数据保存失败,请重试"); // TODO: add setContentView(...) invocation
} ButterKnife.bind(this);
}
@Override
public void onSysStateChange(int flag, BaseState state) {
switch (flag) {
case Config.FLAG_BATTERY_STATE:
BatteryState batteryState = (BatteryState) state;
if (mBatteryTv != null)
mBatteryTv.setText(batteryState.getLevel() + "%");
if (batteryState.getStatus() == BatteryManager.BATTERY_STATUS_CHARGING) {
mBatteryImg.setImageResource(R.mipmap.power_1);
} else {
if (batteryState.getLevel() < 20) {
mBatteryImg.setImageResource(R.mipmap.power_4);
} else if (batteryState.getLevel() < 80) {
mBatteryImg.setImageResource(R.mipmap.power_3);
} else {
mBatteryImg.setImageResource(R.mipmap.power_2);
}
}
break;
case Config.FLAG_BLUETOOTH_STATE:
BluetoothState bluetoothState = (BluetoothState) state;
mBluetoothImg.setVisibility(View.VISIBLE);
switch (bluetoothState.getState()) {
case BluetoothAdapter.STATE_ON:
mBluetoothImg.setImageResource(R.mipmap.bluetooth_1);
break;
case BluetoothAdapter.STATE_OFF:
mBluetoothImg.setVisibility(View.GONE);
break;
case BluetoothAdapter.STATE_TURNING_OFF:
mBluetoothImg.setImageResource(R.mipmap.bluetooth_2);
break;
case BluetoothAdapter.STATE_TURNING_ON:
mBluetoothImg.setImageResource(R.mipmap.bluetooth_2);
break;
}
break;
case Config.FLAG_TIME_STATE:
break;
case Config.FLAG_WIFI_STATE:
WifiState wifiState = (WifiState) state;
mWifiImg.setImageResource(R.mipmap.wifi_4);
mWifiImg.setVisibility(wifiState.isOpen() ? View.VISIBLE : View.GONE);
if (wifiState.isOpen()) {
if (!wifiState.isConnect()) {
mWifiImg.setImageResource(R.mipmap.wifi_3);
} else {
switch (wifiState.getStrength()) {
case 0:
case 1:
case 2:
mWifiImg.setImageResource(R.mipmap.wifi_2);
break;
case 3:
case 4:
mWifiImg.setImageResource(R.mipmap.wifi_1);
break;
}
}
}
break;
}
}
} }
...@@ -5,9 +5,11 @@ import android.content.Context; ...@@ -5,9 +5,11 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.net.ConnectivityManager; import android.net.ConnectivityManager;
import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.view.View; import android.view.View;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import com.app.baselibrary.base.common.BaseActivity; import com.app.baselibrary.base.common.BaseActivity;
import com.app.baselibrary.commonUtil.LogUtil; import com.app.baselibrary.commonUtil.LogUtil;
...@@ -18,6 +20,7 @@ import com.oo.eye.manager.DaemonSender; ...@@ -18,6 +20,7 @@ import com.oo.eye.manager.DaemonSender;
import com.oo.eye.manager.OOMsg; import com.oo.eye.manager.OOMsg;
import butterknife.BindView; import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick; import butterknife.OnClick;
...@@ -26,147 +29,154 @@ import butterknife.OnClick; ...@@ -26,147 +29,154 @@ import butterknife.OnClick;
public class BeforeEyeTestActivity extends BaseActivity { public class BeforeEyeTestActivity extends BaseActivity {
@BindView(R2.id.ll_before_eye_start1) @BindView(R.id.ll_before_eye_start1)
LinearLayout startLayout1; RelativeLayout mLlBeforeEyeStart1;
@BindView(R.id.ll_before_eye_prepare1)
@BindView(R2.id.ll_before_eye_prepare1) LinearLayout mLlBeforeEyePrepare1;
LinearLayout prepareLayout1; // private DaemonReceiver mDaemonReceiver;
private DaemonReceiver mDaemonReceiver; private ActionReceiver mActionReceiver;
private ActionReceiver mActionReceiver; private Handler mHandler;
private Handler mHandler ; @Override
protected int getLayoutId() {
@Override return R.layout.activity_before_eye_test;
protected int getLayoutId() { }
return R.layout.activity_before_eye_test;
} @Override
protected void init() {
@Override mHandler = new Handler();
protected void init() { // mDaemonReceiver = new DaemonReceiver();
mHandler = new Handler(); // mDaemonReceiver.registerScreenActionReceiver(this);
mDaemonReceiver = new DaemonReceiver(); mActionReceiver = new ActionReceiver();
mDaemonReceiver.registerScreenActionReceiver(this); mActionReceiver.registerScreenActionReceiver(this);
mActionReceiver = new ActionReceiver(); DaemonSender.startEyeTest(this);
mActionReceiver.registerScreenActionReceiver(this); }
DaemonSender.startEyeTest(this);
} @Override
protected void onResume() {
@Override super.onResume();
protected void onResume() { NibiruUtils.switchVR(false);
super.onResume(); }
NibiruUtils.switchVR(false);
} @Override
protected void onDestroy() {
@Override super.onDestroy();
protected void onDestroy() { DaemonSender.closeEyeTestMotor(this);
super.onDestroy(); // if (mDaemonReceiver != null) {
DaemonSender.closeEyeTestMotor(this); // mDaemonReceiver.unRegisterScreenActionReceiver(this);
if(mDaemonReceiver != null){ // }
mDaemonReceiver.unRegisterScreenActionReceiver(this); if (mActionReceiver != null) {
} mActionReceiver.unRegisterScreenActionReceiver(this);
if(mActionReceiver != null){ }
mActionReceiver.unRegisterScreenActionReceiver(this); }
}
} @OnClick(R2.id.tv_eye_test_start1)
public void click(View view) {
@OnClick(R2.id.tv_eye_test_start1) mLlBeforeEyeStart1.setVisibility(View.GONE);
public void click(View view){ mLlBeforeEyePrepare1.setVisibility(View.VISIBLE);
startLayout1.setVisibility(View.GONE); speak("调节测视距离,请等待");
prepareLayout1.setVisibility(View.VISIBLE); // DaemonSender.startEyeTestMotor(this);
speak("调节测视距离,请等待"); Intent intent2 = new Intent(BeforeEyeTestActivity.this,EyeTestActivity.class);
DaemonSender.startEyeTestMotor(this); startActivity(intent2);
// Intent intent2 = new Intent(BeforeEyeTestActivity.this,EyeTestActivity.class); finish();
// startActivity(intent2); }
// finish();
} @Override
protected void onCreate(Bundle savedInstanceState) {
public class DaemonReceiver extends BroadcastReceiver { super.onCreate(savedInstanceState);
private boolean isRegisterReceiver = false; // TODO: add setContentView(...) invocation
@Override ButterKnife.bind(this);
public void onReceive(Context context, Intent intent) { }
if(intent != null){
int type = intent.getIntExtra(OOMsg.ARG_SEEX_ACTION,0); // public class DaemonReceiver extends BroadcastReceiver {
switch (type){ // private boolean isRegisterReceiver = false;
case OOMsg.EYE_TEST_MOTOR_FINISH: //
mHandler.postDelayed(new Runnable() { // @Override
@Override // public void onReceive(Context context, Intent intent) {
public void run() { // if (intent != null) {
Intent intent2 = new Intent(BeforeEyeTestActivity.this,EyeTestActivity.class); // int type = intent.getIntExtra(OOMsg.ARG_SEEX_ACTION, 0);
startActivity(intent2); // switch (type) {
finish(); // case OOMsg.EYE_TEST_MOTOR_FINISH:
} // mHandler.postDelayed(new Runnable() {
},1000); // @Override
break; // public void run() {
} // Intent intent2 = new Intent(BeforeEyeTestActivity.this, EyeTestActivity.class);
// startActivity(intent2);
} // finish();
// }
} // }, 1000);
// break;
public void registerScreenActionReceiver(Context mContext) { // }
if (!isRegisterReceiver) { //
isRegisterReceiver = true; // }
//
IntentFilter filter = new IntentFilter(); // }
filter.addAction(OOMsg.OO_INTENT_ACTION); //
mContext.registerReceiver(DaemonReceiver.this, filter); // public void registerScreenActionReceiver(Context mContext) {
} // if (!isRegisterReceiver) {
} // isRegisterReceiver = true;
//
public void unRegisterScreenActionReceiver(Context mContext) { // IntentFilter filter = new IntentFilter();
if (isRegisterReceiver) { // filter.addAction(OOMsg.OO_INTENT_ACTION);
isRegisterReceiver = false; // mContext.registerReceiver(DaemonReceiver.this, filter);
mContext.unregisterReceiver(DaemonReceiver.this); // }
} // }
} //
} // public void unRegisterScreenActionReceiver(Context mContext) {
// if (isRegisterReceiver) {
class ActionReceiver extends BroadcastReceiver { // isRegisterReceiver = false;
// mContext.unregisterReceiver(DaemonReceiver.this);
private String TAG = "TrainTaskService__ActionReceiver"; // }
private boolean isRegisterReceiver = false; // }
// }
@Override
public void onReceive(final Context context, Intent intent) { class ActionReceiver extends BroadcastReceiver {
String action = intent.getAction();
LogUtil.e(TAG, "action..." + action); private String TAG = "TrainTaskService__ActionReceiver";
if (action.equals(Intent.ACTION_SCREEN_OFF)) { private boolean isRegisterReceiver = false;
//如果,灭屏,就进行暂停操作。
startLayout1.setVisibility(View.VISIBLE); @Override
prepareLayout1.setVisibility(View.GONE); public void onReceive(final Context context, Intent intent) {
} else if (action.equals(Intent.ACTION_SCREEN_ON)) { String action = intent.getAction();
startLayout1.setVisibility(View.VISIBLE); LogUtil.e(TAG, "action..." + action);
prepareLayout1.setVisibility(View.GONE); if (action.equals(Intent.ACTION_SCREEN_OFF)) {
} //如果,灭屏,就进行暂停操作。
mLlBeforeEyeStart1.setVisibility(View.VISIBLE);
} mLlBeforeEyePrepare1.setVisibility(View.GONE);
} else if (action.equals(Intent.ACTION_SCREEN_ON)) {
public void registerScreenActionReceiver(Context mContext) { mLlBeforeEyeStart1.setVisibility(View.VISIBLE);
if (!isRegisterReceiver) { mLlBeforeEyePrepare1.setVisibility(View.GONE);
isRegisterReceiver = true; }
IntentFilter filter = new IntentFilter(); }
filter.addAction(Intent.ACTION_SCREEN_OFF);
filter.addAction(Intent.ACTION_SCREEN_ON); public void registerScreenActionReceiver(Context mContext) {
filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); if (!isRegisterReceiver) {
LogUtil.e(TAG, "reg broadcast..."); isRegisterReceiver = true;
mContext.registerReceiver(ActionReceiver.this, filter);
} IntentFilter filter = new IntentFilter();
} filter.addAction(Intent.ACTION_SCREEN_OFF);
filter.addAction(Intent.ACTION_SCREEN_ON);
public void unRegisterScreenActionReceiver(Context mContext) { filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
if (isRegisterReceiver) { LogUtil.e(TAG, "reg broadcast...");
isRegisterReceiver = false; mContext.registerReceiver(ActionReceiver.this, filter);
LogUtil.e(TAG, "unReg broadcast..."); }
mContext.unregisterReceiver(ActionReceiver.this); }
}
} public void unRegisterScreenActionReceiver(Context mContext) {
} if (isRegisterReceiver) {
private void speak(String text){ isRegisterReceiver = false;
DaemonSender.sendDBTTS(this,text); LogUtil.e(TAG, "unReg broadcast...");
} mContext.unregisterReceiver(ActionReceiver.this);
}
}
}
private void speak(String text) {
DaemonSender.sendDBTTS(this, text);
}
} }
...@@ -42,7 +42,7 @@ public class EyeTestActivity extends BaseActivity{ ...@@ -42,7 +42,7 @@ public class EyeTestActivity extends BaseActivity{
private E mSelectE; private E mSelectE;
@BindView(R2.id.rl_eye_test_center_time1) @BindView(R2.id.rl_eye_test_center_time1)
LinearLayout timeLayout1; RelativeLayout timeLayout1;
@BindView(R2.id.tv_eye_test_center_time1) @BindView(R2.id.tv_eye_test_center_time1)
TextView timeText1; TextView timeText1;
...@@ -59,7 +59,7 @@ public class EyeTestActivity extends BaseActivity{ ...@@ -59,7 +59,7 @@ public class EyeTestActivity extends BaseActivity{
View maskView2; View maskView2;
@BindView(R2.id.rl_eye_test_center_time2) @BindView(R2.id.rl_eye_test_center_time2)
LinearLayout timeLayout2; RelativeLayout timeLayout2;
@BindView(R2.id.tv_eye_test_center_time2) @BindView(R2.id.tv_eye_test_center_time2)
TextView timeText2; TextView timeText2;
......
...@@ -38,5 +38,6 @@ public class SinglePeopleTestActivity extends BaseActivity { ...@@ -38,5 +38,6 @@ public class SinglePeopleTestActivity extends BaseActivity {
@OnClick(R.id.begin_test) @OnClick(R.id.begin_test)
public void onClick() { public void onClick() {
startActivity(BeforeEyeTestActivity.class);
} }
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"> <item android:state_pressed="true">
<shape> <shape>
<solid android:color="@color/gray_white" /> <solid android:color="#205B64" />
<corners android:radius="@dimen/dp_4"/> <corners android:radius="@dimen/dp_4"/>
</shape> </shape>
</item> </item>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<item> <item>
<shape> <shape>
<solid android:color="@color/gray_white" /> <solid android:color="@color/e_test_color" />
<corners android:radius="@dimen/dp_4"/> <corners android:radius="@dimen/dp_4"/>
</shape> </shape>
</item> </item>
......
...@@ -8,4 +8,5 @@ ...@@ -8,4 +8,5 @@
<size android:width="50dp" <size android:width="50dp"
android:height="50dp"/> android:height="50dp"/>
<stroke android:color="@color/text_color" android:width="1px"></stroke>
</shape> </shape>
\ No newline at end of file
...@@ -2,179 +2,136 @@ ...@@ -2,179 +2,136 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/line_color"
android:paddingBottom="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin"
android:background="@drawable/etest_bg_default"> android:paddingTop="@dimen/activity_vertical_margin">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="欧欧视力检测报告单"
android:textColor="@color/white"
android:textSize="18sp"/>
<LinearLayout
android:id="@+id/notice_LL"
android:layout_width="wrap_content"
android:layout_height="15dp"
android:layout_alignParentRight="true"
android:layout_gravity="right">
<TextClock
android:id="@+id/system_time_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:format24Hour="HH:mm"
android:gravity="center"
android:textColor="@color/white"
android:textSize="10dp"/>
<ImageView
android:id="@+id/bluetooth_img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"/>
<ImageView
android:id="@+id/wifi_img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"/>
<ImageView
android:id="@+id/battery_img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"/>
<TextView <RelativeLayout
android:id="@+id/battery_tv" android:layout_width="346dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="5dp"
android:textColor="@color/white"
android:textSize="10dp"/>
</LinearLayout>
<LinearLayout
android:id="@+id/rl_after_eye_test_center"
android:layout_width="330dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:layout_centerHorizontal="true"
android:background="@drawable/etest_bg_record"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_centerHorizontal="true"> android:background="@color/white"
android:orientation="vertical"
android:padding="@dimen/dp_20">
<TextView <TextView
android:id="@+id/tv_after_lift" android:id="@+id/tv_after_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="15dp" android:layout_centerHorizontal="true"
android:layout_marginLeft="12dp" android:layout_marginTop="@dimen/dp_20"
android:gravity="center" android:text="视力检测报告单"
android:text="@string/after_eye_test_prompt1" android:textColor="@color/text_color"
android:textColor="#585E60" android:textSize="@dimen/sp_24" />
android:textSize="16dp"/>
<TextView <TextView
android:id="@+id/tv_after_name" android:id="@+id/tv_after_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" android:layout_below="@+id/tv_after_title"
android:layout_marginLeft="12dp" android:layout_marginLeft="@dimen/dp_22"
android:layout_marginTop="@dimen/dp_22"
android:gravity="center" android:gravity="center"
android:text="@string/after_eye_test_name" android:text="姓 名: 游客11"
android:textColor="#585E60" android:textColor="@color/text_color"
android:textSize="16dp"/> android:textSize="16dp" />
<TextView
android:id="@+id/tv_after_result" <LinearLayout
android:id="@+id/test_result_lay"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" android:layout_below="@+id/tv_after_name"
android:layout_marginLeft="12dp" android:layout_marginLeft="@dimen/dp_22"
android:gravity="center" android:orientation="horizontal">
android:text="@string/after_eye_test_result"
android:textColor="#585E60" <TextView
android:textSize="16dp"/> android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_8"
android:gravity="center"
android:text="检测结果: 左眼-"
android:textColor="@color/text_color"
android:textSize="16dp" />
<TextView
android:layout_marginLeft="@dimen/dp_5"
android:id="@+id/tv_after_result_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_8"
android:gravity="center"
android:text="5.1"
android:textStyle="bold"
android:textColor="@color/text_color"
android:textSize="@dimen/sp_28" />
<TextView
android:layout_marginLeft="@dimen/dp_20"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_8"
android:gravity="center"
android:text="右眼-"
android:textColor="@color/text_color"
android:textSize="16dp" />
<TextView
android:layout_marginLeft="@dimen/dp_5"
android:id="@+id/tv_after_result_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_8"
android:gravity="center"
android:text="5.1"
android:textStyle="bold"
android:textColor="@color/text_color"
android:textSize="@dimen/sp_28" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_marginTop="12dp"
android:background="@drawable/imaginary_line"/>
<TextView <TextView
android:id="@+id/tv_after_time"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="12dp" android:layout_below="@+id/test_result_lay"
android:layout_marginLeft="12dp" android:layout_marginLeft="@dimen/dp_22"
android:layout_marginTop="@dimen/dp_8"
android:gravity="center" android:gravity="center"
android:text="@string/after_eye_test_suggest" android:text="检测时间: 2018-09-09 13:21:55"
android:textColor="#585E60" android:textColor="@color/text_color"
android:textSize="16dp"/> android:textSize="16dp" />
<TextView
android:id="@+id/tv_after_suggest1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginLeft="12dp"
android:text="@string/after_eye_test_suggest1"
android:textColor="#585E60"
android:textSize="16dp"/>
<TextView <TextView
android:id="@+id/tv_after_suggest2" android:id="@+id/tv_after_save"
android:layout_width="wrap_content" android:layout_width="120dip"
android:layout_height="wrap_content" android:layout_height="@dimen/dp_40"
android:layout_marginTop="5dp" android:layout_below="@+id/tv_after_time"
android:layout_marginLeft="12dp" android:layout_marginLeft="@dimen/dp_22"
android:text="@string/after_eye_test_suggest2" android:layout_marginTop="25dp"
android:textColor="#585E60" android:background="@drawable/after_btn_bg"
android:textSize="16dp"/> android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:gravity="center"
android:text="继续测试"
android:textColor="@color/white"
android:textSize="15dp" />
<TextView <TextView
android:id="@+id/tv_after_suggest3" android:id="@+id/tv_after_give_up"
android:layout_width="wrap_content" android:layout_width="120dip"
android:layout_height="wrap_content" android:layout_height="@dimen/dp_40"
android:layout_marginTop="5dp" android:layout_below="@+id/tv_after_time"
android:layout_marginLeft="12dp" android:layout_marginLeft="30dp"
android:text="@string/after_eye_test_suggest3"
android:textColor="#585E60"
android:textSize="16dp"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_marginTop="25dp" android:layout_marginTop="25dp"
android:layout_marginBottom="23dp" android:layout_toRightOf="@+id/tv_after_save"
android:layout_gravity="center_horizontal"> android:background="@drawable/after_btn_bg"
<TextView android:clickable="true"
android:id="@+id/tv_after_save" android:focusable="true"
android:layout_width="80dp" android:focusableInTouchMode="true"
android:layout_height="match_parent" android:gravity="center"
android:gravity="center" android:text="完成"
android:clickable="true" android:textColor="@color/white"
android:focusable="true" android:textSize="15dp" />
android:focusableInTouchMode="true" </RelativeLayout>
android:text="@string/save"
android:textColor="@color/white"
android:textSize="14dp"
android:background="@drawable/after_btn_bg"/>
<TextView
android:id="@+id/tv_after_give_up"
android:layout_width="80dp"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:gravity="center"
android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:text="@string/give_up"
android:textColor="@color/white"
android:textSize="14dp"
android:background="@drawable/after_btn_bg"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout> </RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:background="@color/line_color"
android:paddingTop="@dimen/activity_vertical_margin" android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin"
android:background="@drawable/etest_bg_default"> android:paddingTop="@dimen/activity_vertical_margin">
<TextView <RelativeLayout
android:id="@+id/tv_before_eye_top1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="60dp"
android:layout_centerHorizontal="true"
android:text="@string/before_eye_test_prepare"
android:textColor="@color/white"
android:textSize="16dp"/>
<LinearLayout
android:id="@+id/ll_before_eye_start1" android:id="@+id/ll_before_eye_start1"
android:layout_width="wrap_content" android:layout_width="346dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tv_before_eye_top1"
android:layout_marginTop="29dp"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:gravity="center" android:layout_centerVertical="true"
android:orientation="vertical"> android:background="@color/white"
android:orientation="vertical"
android:padding="@dimen/dp_20">
<TextView <TextView
android:layout_width="wrap_content" android:id="@+id/tv_after_title"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:lineSpacingExtra="3dp" android:layout_height="wrap_content"
android:gravity="center" android:layout_centerHorizontal="true"
android:text="@string/before_eye_test_prompt" android:layout_marginTop="@dimen/dp_20"
android:textColor="@color/white" android:text="根据C视标开口方向
android:textSize="16dp"/> 点击键盘相应按键"
android:textColor="@color/text_color"
android:textSize="@dimen/sp_24" />
<LinearLayout
android:id="@+id/test_result_lay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_after_title"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_margin="@dimen/dp_20"
android:orientation="horizontal">
<TextView <ImageView
android:id="@+id/tv_eye_test_start1" android:layout_width="wrap_content"
android:layout_width="120dp" android:layout_height="wrap_content"
android:layout_height="50dp" android:src="@drawable/copy" />
android:layout_marginTop="13dp"
android:clickable="true" <ImageView
android:focusable="true" android:layout_marginLeft="@dimen/dp_20"
android:gravity="center" android:layout_gravity="center_vertical"
android:text="@string/before_eye_test_start_btn" android:layout_width="wrap_content"
android:textColor="@color/e_test_color" android:layout_height="wrap_content"
android:textSize="16dp" android:src="@drawable/guide" />
android:background="@drawable/white_bg"/>
<ImageView
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dp_20"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/key" />
</LinearLayout>
<TextView
android:id="@+id/tv_eye_test_start1"
android:layout_width="120dip"
android:layout_height="@dimen/dp_40"
android:layout_below="@+id/test_result_lay"
android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/dp_22"
android:background="@drawable/after_btn_bg"
android:clickable="true"
android:gravity="center"
android:text="开始测试"
android:textColor="@color/white"
android:textSize="15dp" />
</RelativeLayout>
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_before_eye_prepare1" android:id="@+id/ll_before_eye_prepare1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tv_before_eye_top1" android:layout_centerInParent="true"
android:layout_marginTop="50dp" android:layout_marginTop="50dp"
android:layout_centerHorizontal="true"
android:gravity="center" android:gravity="center"
android:orientation="vertical" android:orientation="vertical"
android:visibility="gone"> android:visibility="gone">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:lineSpacingExtra="@dimen/dp_6" android:gravity="center"
android:gravity="center" android:lineSpacingExtra="@dimen/dp_6"
android:text="@string/eye_test_prepare" android:text="@string/eye_test_prepare"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="22dp"/> android:textSize="22dp" />
</LinearLayout> </LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="horizontal" android:background="@color/white"
android:keepScreenOn="true" android:keepScreenOn="true"
android:weightSum="2"> android:orientation="horizontal"
android:weightSum="2">
<RelativeLayout <RelativeLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1">
android:background="@drawable/etest_bg_default">
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_centerHorizontal="true"-->
<!--android:layout_above="@+id/rl_eye_test_center1"-->
<!--android:layout_marginBottom="30dp"-->
<!--android:text="@string/before_eye_test_prepare"-->
<!--android:textColor="@color/white"-->
<!--android:textSize="12sp"/>-->
<RelativeLayout <RelativeLayout
android:id="@+id/rl_eye_test_center1" android:id="@+id/rl_eye_test_center1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_centerInParent="true"> android:layout_centerInParent="true">
<LinearLayout
<RelativeLayout
android:id="@+id/rl_eye_test_center_time1" android:id="@+id/rl_eye_test_center_time1"
android:layout_width="115dp" android:layout_width="match_parent"
android:layout_height="115dp" android:layout_height="match_parent"
android:layout_centerInParent="true" android:background="#60000000">
android:gravity="center_horizontal"
android:orientation="vertical"> <RelativeLayout
<TextView android:layout_width="240dip"
android:id="@+id/tv_eye_test_center_ready1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="请闭上您的右眼" android:layout_centerInParent="true"
android:textColor="@color/white" android:background="@color/white"
android:textSize="10sp"/> android:gravity="center_horizontal"
<TextView android:orientation="vertical"
android:id="@+id/tv_eye_test_center_time1" android:padding="@dimen/dp_20">
android:layout_width="80dp"
android:layout_height="80dp" <LinearLayout
android:layout_marginTop="10dp" android:id="@+id/tv_name_lay_left"
android:gravity="center" android:layout_width="wrap_content"
android:text="5" android:layout_height="wrap_content"
android:textColor="#585E60" android:layout_centerHorizontal="true"
android:textSize="24sp" android:orientation="horizontal">
android:background="@drawable/circle_white_bg"/>
</LinearLayout> <TextView
android:id="@+id/tv_name_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="游客11,"
android:textColor="@color/text_color"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="开始测试"
android:textColor="@color/text_color"
android:textSize="20sp" />
</LinearLayout>
<TextView
android:id="@+id/tv_eye_test_center_ready1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_name_lay_left"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_8"
android:text="请轻轻遮住右眼"
android:textColor="@color/text_color"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_eye_test_center_time1"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_below="@+id/tv_eye_test_center_ready1"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:background="@drawable/circle_white_bg"
android:gravity="center"
android:text="5"
android:textColor="#585E60"
android:textSize="24sp" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/rl_eye_test_center_e1" android:id="@+id/rl_eye_test_center_e1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:visibility="gone"> android:visibility="gone">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_above="@+id/rl_eye_test_e1" android:layout_above="@+id/rl_eye_test_e1"
android:layout_marginBottom="20dp" android:layout_marginBottom="20dp"
android:gravity="center_horizontal"> android:gravity="center_horizontal">
<TextView <TextView
android:id="@+id/tv_eye_vision1" android:id="@+id/tv_eye_vision1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="10sp"/> android:textSize="10sp" />
<TextView <TextView
android:id="@+id/tv_eye_vision_count1" android:id="@+id/tv_eye_vision_count1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="10sp"/> android:textSize="10sp" />
<TextView <TextView
android:id="@+id/tv_eye_vision_allow1" android:id="@+id/tv_eye_vision_allow1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="10sp"/> android:textSize="10sp" />
<TextView <TextView
android:id="@+id/tv_eye_vision_right1" android:id="@+id/tv_eye_vision_right1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="10sp"/> android:textSize="10sp" />
<TextView <TextView
android:id="@+id/tv_eye_vision_error1" android:id="@+id/tv_eye_vision_error1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="10sp"/> android:textSize="10sp" />
</LinearLayout> </LinearLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/rl_eye_test_e1" android:id="@+id/rl_eye_test_e1"
android:layout_width="115dp" android:layout_width="115dp"
android:layout_height="115dp" android:layout_height="115dp"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:background="@drawable/white_bg"> android:background="@drawable/white_bg">
<ImageView <ImageView
android:id="@+id/iv_eye_test_center_e1" android:id="@+id/iv_eye_test_center_e1"
android:layout_centerInParent="true"
android:layout_width="20dp" android:layout_width="20dp"
android:layout_height="20dp"/> android:layout_height="20dp"
android:layout_centerInParent="true" />
</RelativeLayout> </RelativeLayout>
</RelativeLayout> </RelativeLayout>
</RelativeLayout> </RelativeLayout>
<View <View
android:id="@+id/view_eye_test_mask1" android:id="@+id/view_eye_test_mask1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#000000" android:background="#000000"
android:visibility="gone"/> android:visibility="gone" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="30dp"
android:text="当前测视距离为5米"
android:textColor="@color/text_color"
android:textSize="12sp" />
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1">
android:background="@drawable/etest_bg_default">
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_centerHorizontal="true"-->
<!--android:layout_above="@+id/rl_eye_test_center2"-->
<!--android:layout_marginBottom="30dp"-->
<!--android:text="@string/before_eye_test_prepare"-->
<!--android:textColor="@color/white"-->
<!--android:textSize="12sp"/>-->
<RelativeLayout <RelativeLayout
android:id="@+id/rl_eye_test_center2" android:id="@+id/rl_eye_test_center2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_centerInParent="true"> android:layout_centerInParent="true">
<LinearLayout
<RelativeLayout
android:id="@+id/rl_eye_test_center_time2" android:id="@+id/rl_eye_test_center_time2"
android:layout_width="115dp" android:layout_width="match_parent"
android:layout_height="115dp" android:layout_height="match_parent"
android:layout_centerInParent="true" android:background="#60000000">
android:gravity="center_horizontal"
android:orientation="vertical"> <RelativeLayout
<TextView android:layout_width="240dip"
android:id="@+id/tv_eye_test_center_ready2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="请闭上您的左眼" android:layout_centerInParent="true"
android:textColor="@color/white" android:background="@color/white"
android:textSize="10sp"/> android:gravity="center_horizontal"
<TextView android:orientation="vertical"
android:id="@+id/tv_eye_test_center_time2" android:padding="@dimen/dp_20">
android:layout_width="80dp"
android:layout_height="80dp" <LinearLayout
android:layout_marginTop="10dp" android:id="@+id/tv_name_lay_right"
android:gravity="center" android:layout_width="wrap_content"
android:text="5" android:layout_height="wrap_content"
android:textColor="#585E60" android:layout_centerHorizontal="true"
android:textSize="24sp" android:orientation="horizontal">
android:background="@drawable/circle_white_bg"/>
</LinearLayout> <TextView
android:id="@+id/tv_name_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="游客11,"
android:textColor="@color/text_color"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="开始测试"
android:textColor="@color/text_color"
android:textSize="20sp" />
</LinearLayout>
<TextView
android:id="@+id/tv_eye_test_center_ready2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_name_lay_right"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_8"
android:text="请闭上您的左眼"
android:textColor="@color/text_color"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_eye_test_center_time2"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_below="@+id/tv_eye_test_center_ready2"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:background="@drawable/circle_white_bg"
android:gravity="center"
android:text="5"
android:textColor="#585E60"
android:textSize="24sp" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/rl_eye_test_center_e2" android:id="@+id/rl_eye_test_center_e2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:visibility="gone"> android:visibility="gone">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_above="@+id/rl_eye_test_e2" android:layout_above="@+id/rl_eye_test_e2"
android:layout_marginBottom="20dp" android:layout_marginBottom="20dp"
android:gravity="center_horizontal"> android:gravity="center_horizontal">
<TextView <TextView
android:id="@+id/tv_eye_vision2" android:id="@+id/tv_eye_vision2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="10sp"/> android:textSize="10sp" />
<TextView <TextView
android:id="@+id/tv_eye_vision_count2" android:id="@+id/tv_eye_vision_count2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="10sp"/> android:textSize="10sp" />
<TextView <TextView
android:id="@+id/tv_eye_vision_allow2" android:id="@+id/tv_eye_vision_allow2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="10sp"/> android:textSize="10sp" />
<TextView <TextView
android:id="@+id/tv_eye_vision_right2" android:id="@+id/tv_eye_vision_right2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="10sp"/> android:textSize="10sp" />
<TextView <TextView
android:id="@+id/tv_eye_vision_error2" android:id="@+id/tv_eye_vision_error2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="10sp"/> android:textSize="10sp" />
</LinearLayout> </LinearLayout>
<RelativeLayout <RelativeLayout
...@@ -213,13 +307,24 @@ ...@@ -213,13 +307,24 @@
android:layout_height="115dp" android:layout_height="115dp"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:background="@drawable/white_bg"> android:background="@drawable/white_bg">
<ImageView <ImageView
android:id="@+id/iv_eye_test_center_e2" android:id="@+id/iv_eye_test_center_e2"
android:layout_centerInParent="true"
android:layout_width="20dp" android:layout_width="20dp"
android:layout_height="20dp"/> android:layout_height="20dp"
android:layout_centerInParent="true" />
</RelativeLayout> </RelativeLayout>
</RelativeLayout> </RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="30dp"
android:text="当前测视距离为5米"
android:textColor="@color/text_color"
android:textSize="12sp" />
</RelativeLayout> </RelativeLayout>
<View <View
...@@ -227,6 +332,6 @@ ...@@ -227,6 +332,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#000000" android:background="#000000"
android:visibility="gone"/> android:visibility="gone" />
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -95,6 +95,8 @@ ...@@ -95,6 +95,8 @@
android:layout_width="0dip" android:layout_width="0dip"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:background="@drawable/white_bg" android:background="@drawable/white_bg"
android:orientation="vertical"> android:orientation="vertical">
...@@ -108,8 +110,6 @@ ...@@ -108,8 +110,6 @@
<TextView <TextView
android:layout_width="@dimen/dimen_130" android:layout_width="@dimen/dimen_130"
android:layout_height="match_parent" android:layout_height="match_parent"
android:clickable="true"
android:focusable="true"
android:gravity="center" android:gravity="center"
android:text="单人测试" android:text="单人测试"
android:textColor="@color/e_test_color" android:textColor="@color/e_test_color"
...@@ -124,6 +124,8 @@ ...@@ -124,6 +124,8 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
android:layout_weight="1" android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:background="@drawable/white_bg" android:background="@drawable/white_bg"
android:orientation="vertical"> android:orientation="vertical">
...@@ -138,8 +140,6 @@ ...@@ -138,8 +140,6 @@
android:id="@+id/tv_eye_test_histroy" android:id="@+id/tv_eye_test_histroy"
android:layout_width="@dimen/dimen_130" android:layout_width="@dimen/dimen_130"
android:layout_height="match_parent" android:layout_height="match_parent"
android:clickable="true"
android:focusable="true"
android:gravity="center" android:gravity="center"
android:text="多人测试" android:text="多人测试"
android:textColor="@color/e_test_color" android:textColor="@color/e_test_color"
...@@ -150,6 +150,8 @@ ...@@ -150,6 +150,8 @@
<LinearLayout <LinearLayout
android:id="@+id/lin_eye_test_statistics" android:id="@+id/lin_eye_test_statistics"
android:layout_width="0dip" android:layout_width="0dip"
android:clickable="true"
android:focusable="true"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
android:layout_weight="1" android:layout_weight="1"
...@@ -166,8 +168,6 @@ ...@@ -166,8 +168,6 @@
<TextView <TextView
android:layout_width="@dimen/dimen_130" android:layout_width="@dimen/dimen_130"
android:layout_height="match_parent" android:layout_height="match_parent"
android:clickable="true"
android:focusable="true"
android:gravity="center" android:gravity="center"
android:text="临时测试" android:text="临时测试"
android:textColor="@color/e_test_color" android:textColor="@color/e_test_color"
...@@ -181,6 +181,8 @@ ...@@ -181,6 +181,8 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
android:layout_weight="1" android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:background="@drawable/white_bg" android:background="@drawable/white_bg"
android:orientation="vertical"> android:orientation="vertical">
...@@ -194,8 +196,6 @@ ...@@ -194,8 +196,6 @@
<TextView <TextView
android:layout_width="@dimen/dimen_130" android:layout_width="@dimen/dimen_130"
android:layout_height="match_parent" android:layout_height="match_parent"
android:clickable="true"
android:focusable="true"
android:gravity="center" android:gravity="center"
android:text="结果报表" android:text="结果报表"
android:textColor="@color/e_test_color" android:textColor="@color/e_test_color"
......
...@@ -78,13 +78,14 @@ ...@@ -78,13 +78,14 @@
android:orientation="vertical"> android:orientation="vertical">
<EditText <EditText
android:layout_width="120dip" android:id="@+id/key_test"
android:layout_width="140dip"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_6" android:layout_marginLeft="@dimen/dp_6"
android:background="@null" android:background="@null"
android:hint="按关键词查找" android:hint="输入学员编号后4位"
android:textColorHint="@color/hint_text_color" android:textColorHint="@color/hint_text_color"
android:textSize="@dimen/sp_18" /> android:textSize="@dimen/sp_16" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -34,13 +34,14 @@ ...@@ -34,13 +34,14 @@
android:orientation="vertical"> android:orientation="vertical">
<EditText <EditText
android:layout_width="120dip" android:id="@+id/key_test"
android:layout_width="140dip"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_6" android:layout_marginLeft="@dimen/dp_6"
android:background="@null" android:background="@null"
android:hint="按关键词查找" android:hint="输入学员编号后4位"
android:textColorHint="@color/hint_text_color" android:textColorHint="@color/hint_text_color"
android:textSize="@dimen/sp_18" /> android:textSize="@dimen/sp_16" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -115,13 +115,14 @@ ...@@ -115,13 +115,14 @@
android:orientation="vertical"> android:orientation="vertical">
<EditText <EditText
android:layout_width="120dip" android:id="@+id/key_test"
android:layout_width="140dip"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_6" android:layout_marginLeft="@dimen/dp_6"
android:background="@null" android:background="@null"
android:hint="按关键词查找" android:hint="输入学员编号后4位"
android:textColorHint="@color/hint_text_color" android:textColorHint="@color/hint_text_color"
android:textSize="@dimen/sp_18" /> android:textSize="@dimen/sp_16" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment