Instead of a Button, you can use a TextView and add a click listener in the java code.
I.e.
in the activity layout xml:
<TextView
android:id="@+id/btn_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimaryDark"
android:text="@string/btn_text"
android:gravity="center"
android:textColor="@color/colorAccent"
android:fontFamily="sans-serif-medium"
android:textAllCaps="true" />
in the activity java file:
TextView btnTextView = (TextView) findViewById(R.id.btn_text_view);
btnTextView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// handler code
}
});