How can I display a text perday in my android app
<p>I'm building a quotes app and i want the app to display a text on the startup page of my app, but i cant seems to get it right. Here is the code i tried...</p>

<pre><code>public class MainActivityFragment extends Fragment {
    public MainActivityFragment() {
    }
    final Handler h = new Handler();
    TextView lv, nam, cate;
    String randomQuotes, qNames, category;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_main, container, false);
        lv = (TextView)rootView.findViewById(R.id.quotes);
        nam = (TextView)rootView.findViewById(R.id.name);
        btn = (Button)rootView.findViewById(R.id.share);
        //List of quotes
        ListView allQuote = (ListView)rootView.findViewById(R.id.liv);

        //Display a text on screen in every 24hours
        final Random rand = new Random();
        h.post(new Runnable(){
            @Override
            public void run(){
                int x = rand.nextInt(AllQuotes.LIFE.length);
                lv.setText(AllQuotes.LIFE[x]);
                nam.setText(AllQuotes.NAMELIFE[x]);
                h.postDelayed(this, 60000 * 24);
            }
        });


        return rootView;
}
</code></pre>

<p>Thanks in advance!</p>