package com.stx.openeyes.view.activity; import android.os.Bundle; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.View; import com.stx.openeyes.R; public class FunctionActivity extends AppCompatActivity { private static final String TAG = "FunctionActivity"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_function); setToolBar(); } private void setToolBar() { Toolbar tb = (Toolbar) findViewById(R.id.tb_function); setSupportActionBar(tb); ActionBar supportActionBar = getSupportActionBar(); supportActionBar.setDisplayShowTitleEnabled(false); supportActionBar.setDisplayHomeAsUpEnabled(true); tb.setNavigationOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); } }