Android:文本未应用于卡

Android:文本未应用于卡,android,Android,因此,我正在尝试创建一个应用程序,用户将在两个edittext字段中输入一些文本,当按下submit按钮时,它将关闭编辑窗口,然后将一张新卡添加到主活动的列表中。我已经设置了我所有的代码,一切正常。但是,没有添加任何卡片,当应用程序启动时,有一张卡片的任何地方都没有文本 我的代码: MainActivity.java: //The following lines of code are in onCreate() and setContentView() has been //called /

因此,我正在尝试创建一个应用程序,用户将在两个edittext字段中输入一些文本,当按下submit按钮时,它将关闭编辑窗口,然后将一张新卡添加到主活动的列表中。我已经设置了我所有的代码,一切正常。但是,没有添加任何卡片,当应用程序启动时,有一张卡片的任何地方都没有文本

我的代码: MainActivity.java:

//The following lines of code are in onCreate() and setContentView() has been
//called

//Get the intent that launched the activity
Intent i = getIntent();

//Get the strings from the intent
String sig = i.getStringExtra("signature");
String lMessage = i.getStringExtra("long_message");

//Init mCardView
mCardView = (CardUI) findViewById(R.id.cardsview);

//Allow swipe to delete for cards
mCardView.setSwipeable(true);

//Add new card with the two extra strings from the edit text fields
mCardView.addCard(new MyCard(sig, lMessage));

//Draw the cards
mCardView.refresh();
AddText.java

//The following lines of code are in onCreate() and setContentView() has been
//called

//Find edit text's and button
EditText name = (EditText) findViewById(R.id.enter_name);
EditText message = (EditText) findViewById(R.id.enter_message);
button = (Button) findViewById(R.id.add_signature);

//Get the string from the edit text...whatever it may be.
final String signature = name.getText().toString();
final String longMessage = message.getText().toString();

button.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        //Make a new intent to start main activity
        Intent intent = new Intent(getApplication(), YearbookMain.class); 

        //Put extras into intent
        intent.putExtra("signature", signature);
        intent.putExtra("long_message", longMessage);

        //Start intent
        startActivity(intent);
    }
});
再说一次,我没有遇到任何崩溃,只是卡没有被编辑。我已经尝试了我能想到的一切,所以我希望有人能想到别的东西


谢谢

CardUI不是Android API的一部分。你的问题也不是关于Java的。请使用适当的标记。我没有足够的等级来创建自定义标记。我只是用这个库在安卓系统中制作一些东西,所以我认为它是关于主题的。库?快速谷歌搜索会返回5个以上模仿谷歌卡片用户界面的库。我想你没有回答我的问题:我正在试图找到一个解决方案,解释为什么输入的文本没有添加到卡片上。如果我想在谷歌搜索东西时得到帮助,我会在谷歌上搜索。没有冒犯的意思。