【问题标题】:Android Studio How to print on screen a variable content (number)Android Studio 如何在屏幕上打印可变内容(数字)
【发布时间】:2014-10-14 02:06:39
【问题描述】:
private EditText InputWiek;     //First input
    private EditText InputTspocz;   //Second input
    private TextView textout;

    float Wiek = InputWiek;
    float Tspocz = InputTspocz;

    int Tmax = 220-Wiek;
    int RT = Tmax-Tspocz;
    int Tburn = 70*RT/100+Tspocz;

    public void buttonOnClick(View v) {

        Button button=(Button) v;

        InputWiek = (EditText) findViewById(R.id.idWiek);
        InputTspocz = (EditText) findViewById(R.id.idTspocz)
        textout = (TextView) findViewById(R.id.txtOutput;
        textout.setText(Tburn.getText()));                    //A little scrap here :/




    }
}

【问题讨论】:

  • Log.d(getClass().getSimpleName(), "Stuff you wanna write out");
  • 在 textout = ..their is a missing ) befor ;下一行是 a ) to mutch

标签: java android eclipse android-activity android-studio


【解决方案1】:

你可以使用String.valeuOf(Tburn)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-03-07
    • 1970-01-01
    • 1970-01-01
    • 2013-05-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多