Android Right to Left Toolbar

MainActivity.java

public class MainActivity extends AppCompatActivity {

    Toolbar toolbar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        toolbar= (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        ViewCompat.setLayoutDirection(toolbar,ViewCompat.LAYOUT_DIRECTION_RTL);
    }
}

References
https://github.com/mhdr/AndroidSamples/tree/master/064