mirror of
https://github.com/MatomoCamp/matomocamp-companion-android.git
synced 2024-09-19 16:13:46 +02:00
Mirror the drawer shadow image for RTL configuration
This commit is contained in:
parent
c33f7b23e3
commit
bc27d4af49
3 changed files with 11 additions and 1 deletions
|
@ -231,7 +231,7 @@ public class MainActivity extends AppCompatActivity {
|
||||||
// Setup drawer layout
|
// Setup drawer layout
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
drawerLayout = findViewById(R.id.drawer_layout);
|
drawerLayout = findViewById(R.id.drawer_layout);
|
||||||
drawerLayout.setDrawerShadow(ContextCompat.getDrawable(this, R.drawable.drawer_shadow), GravityCompat.START);
|
drawerLayout.setDrawerShadow(ContextCompat.getDrawable(this, R.drawable.drawer_shadow_start), GravityCompat.START);
|
||||||
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.main_menu, R.string.close_menu) {
|
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.main_menu, R.string.close_menu) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
7
app/src/main/res/drawable-ldrtl/drawer_shadow_start.xml
Normal file
7
app/src/main/res/drawable-ldrtl/drawer_shadow_start.xml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:drawable="@drawable/drawer_shadow"
|
||||||
|
android:fromDegrees="180"
|
||||||
|
android:pivotX="50%"
|
||||||
|
android:pivotY="50%"
|
||||||
|
android:toDegrees="180" />
|
3
app/src/main/res/drawable/drawer_shadow_start.xml
Normal file
3
app/src/main/res/drawable/drawer_shadow_start.xml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:src="@drawable/drawer_shadow" />
|
Loading…
Reference in a new issue