结果屏幕上缺少值

ars1skjm  于 2021-08-20  发布在  Java
关注(0)|答案(0)|浏览(148)

目前正在开发一款用于测量车身高度的ar应用程序,该应用程序为高度和内接缝高度创建了ar环境(基本上可用于2件事),但只获得了内接缝答案,如果您想在今天获得解决方案,则高度答案为空,因此即将完成。。。
measuremalehight.java

Button buttonHeightValueMale = findViewById(R.id.nextButtonHeightMale);
                buttonHeightValueMale.setOnClickListener(v -> {

                    Intent toHeight = new Intent(MeasureMaleHeight.this, MeasureMaleInseamHeight.class);
                    Bundle heightMale = new Bundle();
                    heightMale.putString("HeightMale", sbHeightMale.toString());
                    toHeight.putExtras(heightMale);
                    MeasureMaleHeight.this.startActivity(toHeight);
                });

measuremaleinseamheight.java

Button buttonInseamValueMale = findViewById(R.id.nextButtonInseamMale);
                buttonInseamValueMale.setOnClickListener(v -> {

                    Intent toInseam = new Intent(MeasureMaleInseamHeight.this, ResultScreenMale.class);
                    Bundle inseamMale = new Bundle();
                    inseamMale.putString("InseamMale", sb.toString());
                    toInseam.putExtras(inseamMale);
                    MeasureMaleInseamHeight.this.startActivity(toInseam);
                });

resultscreenmeane.java

TextView tvHeight;
TextView tvInseam;

StringBuilder saddleFormula = new StringBuilder();
int saddleNum = (int) 0.88;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_result_screen_male);

    Bundle inseamResultMale = getIntent().getExtras();
    if (inseamResultMale != null)
    {
        String receiveInseamMale = inseamResultMale.getString("InseamMale");
        TextView tvInseamMale = findViewById(R.id.inseamResultMale);
        tvInseamMale.setText(receiveInseamMale);
    }

    Bundle heightResultMale = getIntent().getExtras();
    if (heightResultMale != null)
    {
        String receiveHeightMale= heightResultMale.getString("HeightMale");
        TextView tvHeightMale = findViewById(R.id.heightResultMale);
        tvHeightMale.setText(receiveHeightMale);
    }

    Button buttonBackMale = findViewById(R.id.buttonBackMale);
    buttonBackMale.setOnClickListener(v -> {
        Intent toHome1 = new Intent(ResultScreenMale.this, HomeScreen.class);
        ResultScreenMale.this.startActivity(toHome1);
    });
    //TextView tvSaddleHeight;
    //StringBuilder saddleHeight = new StringBuilder();
    //tvSaddleHeight = findViewById(R.id.saddleResult);
    //saddleHeight.append(receiveHeight);
    //int inseamValue = Integer.parseInt(String.valueOf(saddleHeight));
    //inseamValue = inseamValue * saddleNum;
    //tvSaddleHeight.setText(inseamValue);
}

}

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题