Search in sources :

Example 1 with SlantedTextView

use of com.haozhang.lib.SlantedTextView in project SlantedTextView by HeZaiJin.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
    fab.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG).setAction("Action", null).show();
        }
    });
    SlantedTextView stv = (SlantedTextView) findViewById(R.id.test);
//        stv.setText("PHP")
//                .setTextColor(Color.WHITE)
//                .setSlantedBackgroundColor(Color.BLACK)
//                .setTextSize(18)
//                .setSlantedLength(50)
//                .setMode(SlantedTextView.MODE_LEFT_BOTTOM);
}
Also used : SlantedTextView(com.haozhang.lib.SlantedTextView) FloatingActionButton(android.support.design.widget.FloatingActionButton) SlantedTextView(com.haozhang.lib.SlantedTextView) View(android.view.View) Toolbar(android.support.v7.widget.Toolbar)

Aggregations

FloatingActionButton (android.support.design.widget.FloatingActionButton)1 Toolbar (android.support.v7.widget.Toolbar)1 View (android.view.View)1 SlantedTextView (com.haozhang.lib.SlantedTextView)1