有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java如何在其他页面的文本视图中显示logcat?

我这里有个问题。如何在其他页面的文本视图中显示日志cat? 下面显示了日志cat的代码

试试看。爪哇

                Log.e("MENU A","Total Price: RM "+price);

价格是双重类型。。。 如何在另一页的文本视图中显示价格? 现在我可以在eclipse页面底部的log cat中显示总价。 我应该声明新的文本视图吗

我想在一个名为测试的页面中显示价格。xml。尝试java是用于测试的流程页面。xml

请帮帮我


共 (1) 个答案

  1. # 1 楼答案

    查看开发人员培训站点,了解如何开始另一项活动

    http://developer.android.com/training/basics/firstapp/starting-activity.html

    /** Called when the user clicks the Send button */
    public void sendMessage(View view) {
        Intent intent = new Intent(this, DisplayMessageActivity.class);
        EditText editText = (EditText) findViewById(R.id.edit_message);
        String message = editText.getText().toString();
        intent.putExtra(EXTRA_MESSAGE, message);
        startActivity(intent);
    }