Android 我想把这些信息从上到下交换,

Android 我想把这些信息从上到下交换,,android,firebase,firebase-authentication,firebase-cloud-messaging,Android,Firebase,Firebase Authentication,Firebase Cloud Messaging,在这种情况下,我需要帮助。我正在尝试向我的客户发送广播消息。t这意味着我只想以消息的形式向用户发送输入,而不想从他们那里获取输入。所以我所做的,就是在我的项目中使用云消息传递,现在我可以在firebase中获取输入并显示在我的文本视图中。但现在我想存储它,并将它逐行交换到下方,我只想显示我的消息,也只想显示我最后的10条消息,所以后面的部分将是无用的,我尝试了交换,但它在我的图表中不起作用 我将在这里展示我的活动 MainActivity.java package com.intraday.ge

在这种情况下,我需要帮助。我正在尝试向我的客户发送广播消息。t这意味着我只想以消息的形式向用户发送输入,而不想从他们那里获取输入。所以我所做的,就是在我的项目中使用云消息传递,现在我可以在firebase中获取输入并显示在我的文本视图中。但现在我想存储它,并将它逐行交换到下方,我只想显示我的消息,也只想显示我最后的10条消息,所以后面的部分将是无用的,我尝试了交换,但它在我的图表中不起作用

我将在这里展示我的活动

MainActivity.java

package com.intraday.geeks;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.iid.FirebaseInstanceId;

public class MainActivity extends AppCompatActivity {
    private FirebaseAuth mAuth;



    private static final String TAG = "MainActivity";

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

        mAuth=FirebaseAuth.getInstance();


        TextView textView1 =(TextView)findViewById(R.id.callOne);
        TextView textView2 =(TextView)findViewById(R.id.CallTwo);
        TextView textView3 =(TextView)findViewById(R.id.callThree);
        TextView textView4 =(TextView)findViewById(R.id.callFour);
        TextView textView5 =(TextView)findViewById(R.id.callFive);
        TextView textView6 =(TextView)findViewById(R.id.callSix);
        TextView textView7 =(TextView)findViewById(R.id.callSeven);
        TextView textView8 =(TextView)findViewById(R.id.CallEight);


        if(getIntent().getExtras()!=null){
            for(String key : getIntent().getExtras().keySet())
            {
                if (key.equals("a")){
                    textView1.setText(getIntent().getExtras().getString(key));
                    String variable1 = textView1.getText().toString();



                }
            }


        }



    }



    @Override
    public void onStart() {
        super.onStart();



        FirebaseUser currentUser = mAuth.getCurrentUser();
        if (currentUser==null){
            Intent authIntent = new Intent(MainActivity.this, Login.class);
            startActivity(authIntent);
            finish();
        }
    }
}
主要活动

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:background="#5d1b8f"
    android:orientation="vertical"

    android:layout_height="match_parent"
    tools:context="com.intraday.geeks.MainActivity">

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <TextView
        android:id="@+id/callOne"
        android:layout_width="fill_parent"
        android:layout_height="75dp"
        android:background="#dc2619"
        android:text="Tips are only Available In Live Market 9:15Am to 3:15Pm"
        style="@style/Base.AlertDialog.AppCompat"
        android:textSize="20dp"
        android:textColor="#ffff"
        />

    <TextView
        android:id="@+id/CallTwo"
        android:layout_width="fill_parent"
        android:textSize="20dp"
        android:layout_height="75dp"
        android:textColor="#ffff"
        android:text="Tips are only Available In Live Market 9:15Am to 3:15Pm"
        style="@style/Base.AlertDialog.AppCompat">

    </TextView>

    <TextView
        android:id="@+id/callThree"
        android:layout_width="fill_parent"
        android:textSize="20dp"
        android:background="#dc2619"
        android:layout_height="75dp"
        android:textColor="#ffff"
        android:text="Tips are only Available In Live Market 9:15Am to 3:15Pm"
        style="@style/Base.AlertDialog.AppCompat">

    </TextView>

    <TextView
        android:id="@+id/callFour"
        android:layout_width="fill_parent"
        android:layout_height="75dp"
        android:textColor="#ffff"
        android:textSize="20dp"
        android:text="Tips are only Available In Live Market 9:15Am to 3:15Pm"
        style="@style/Base.AlertDialog.AppCompat">

    </TextView>

    <TextView
    android:id="@+id/callFive"
    android:layout_width="fill_parent"
    android:layout_height="75dp"
    android:textColor="#ffff"
        android:background="#dc2619"
        android:textSize="20dp"
    android:text="Tips are only Available In Live Market 9:15Am to 3:15Pm"
    style="@style/Base.AlertDialog.AppCompat">

</TextView>


    <TextView
        android:id="@+id/callSix"
        android:layout_width="fill_parent"
        android:layout_height="75dp"
        android:textColor="#ffff"

        android:textSize="20dp"
        android:text="Tips are only Available In Live Market 9:15Am to 3:15Pm"
        style="@style/Base.AlertDialog.AppCompat">

    </TextView>


    <TextView
        android:id="@+id/callSeven"
        android:layout_width="fill_parent"
        android:layout_height="75dp"
        android:textColor="#ffff"
        android:textSize="20dp"
        android:background="#dc2619"
        android:text="Tips are only Available In Live Market 9:15Am to 3:15Pm"
        style="@style/Base.AlertDialog.AppCompat">

    </TextView>

    <TextView
        android:id="@+id/CallEight"
        android:layout_width="fill_parent"
        android:layout_height="75dp"
        android:textColor="#ffff"
        android:textSize="20dp"
        android:text="Tips are only Available In Live Market 9:15Am to 3:15Pm"
        style="@style/Base.AlertDialog.AppCompat">

    </TextView>






</LinearLayout>

</ScrollView>


search::从firebase到listview@Eminem我已经准备好了,兄弟。。你能帮帮我吗。。我会付钱的我不会付钱,但我至少需要3小时才能完成我的任务job@Eminem请给我你的邮件或whatsapp号码与你联系,我会在3点后给你留言hrs@dont我会帮你的