Android Open Source - MaterialDemo Detail Activity






From Project

Back to project page MaterialDemo.

License

The source code is released under:

Apache License

If you think the Android project MaterialDemo 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.epam.dziashko.aliaksei.materialdemo;
/*from  w  w  w .j  a v a  2s .  com*/
import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.ImageView;

import com.squareup.picasso.Picasso;

public class DetailActivity extends ActionBarActivity {


    public static final String EXTRA_DATA = "data";

    @Override public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.detail);

        Toolbar toolbar = (Toolbar) findViewById(R.id.my_awesome_toolbar);
        setSupportActionBar(toolbar);

        toolbar.setNavigationIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
        toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override public void onClick(View v) {
                NavUtils.navigateUpFromSameTask(DetailActivity.this);
            }
        });

        ImageView imageView = (ImageView) findViewById(R.id.detail_image);

        Picasso.with(this).load(getIntent().getStringExtra(EXTRA_DATA)).into(imageView);
    }
}




Java Source Code List

com.epam.dziashko.aliaksei.materialdemo.ApplicationTest.java
com.epam.dziashko.aliaksei.materialdemo.DetailActivity.java
com.epam.dziashko.aliaksei.materialdemo.MainActivity.java
com.epam.dziashko.aliaksei.materialdemo.adapter.BaseArrayAdapter.java
com.epam.dziashko.aliaksei.materialdemo.adapter.Function.java
com.epam.dziashko.aliaksei.materialdemo.adapter.IBaseAdapter.java
com.epam.dziashko.aliaksei.materialdemo.data.Data.java
com.epam.dziashko.aliaksei.materialdemo.fragment.GridFragment.java
com.epam.dziashko.aliaksei.materialdemo.fragment.PagerFragment.java
com.epam.dziashko.aliaksei.materialdemo.fragment.RecyclerViewFragment.java
com.epam.dziashko.aliaksei.materialdemo.fragment.ToolbarFragment.java
com.epam.dziashko.aliaksei.materialdemo.view.SlidingTabLayout.java
com.epam.dziashko.aliaksei.materialdemo.view.SlidingTabStrip.java