Android Open Source - ui-showcase-for-android Empty Data Activity






From Project

Back to project page ui-showcase-for-android.

License

The source code is released under:

Apache License

If you think the Android project ui-showcase-for-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.github.ksoichiro.uishowcase;
/* w w  w .j  a va 2s. c om*/
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;

/**
 * @author Soichiro Kashima
 */
public class EmptyDataActivity extends ActionBarActivity {

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

        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setHomeButtonEnabled(true);

        findViewById(R.id.create).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(EmptyDataActivity.this, "Congratulations!", Toast.LENGTH_SHORT).show();
            }
        });
    }

    @Override
    public boolean onOptionsItemSelected(final MenuItem menu) {
        if (menu.getItemId() == android.R.id.home) {
            finish();
            return true;
        }
        return false;
    }

}




Java Source Code List

com.github.ksoichiro.uishowcase.AboutActivity.java
com.github.ksoichiro.uishowcase.ApplicationTest.java
com.github.ksoichiro.uishowcase.CoachMarkActivity.java
com.github.ksoichiro.uishowcase.EmptyDataActivity.java
com.github.ksoichiro.uishowcase.MainActivity.java