Last active
September 26, 2015 07:28
-
-
Save nowke/83fa3b0f8b340866ea2c to your computer and use it in GitHub Desktop.
Detail Activity - with ScrollView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package in.nowke.appbarmiddlelayout; | |
import android.os.Build; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.support.v7.widget.Toolbar; | |
import android.view.Menu; | |
import android.view.MenuItem; | |
import android.view.View; | |
public class DetailActivity extends AppCompatActivity { | |
private Toolbar toolbar; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_detail); | |
toolbar = (Toolbar) findViewById(R.id.toolbar); | |
setSupportActionBar(toolbar); | |
getSupportActionBar().setDisplayHomeAsUpEnabled(true); | |
getSupportActionBar().setDisplayShowTitleEnabled(false); | |
} | |
@Override | |
public boolean onCreateOptionsMenu(Menu menu) { | |
// Inflate the menu; this adds items to the action bar if it is present. | |
getMenuInflater().inflate(R.menu.menu_detail, menu); | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment