Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42e1dd10 authored by Fs00's avatar Fs00
Browse files

Fix elevation shadow not showing for bottom app bar

parent 86892da0
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ import com.github.barteksc.pdfviewer.scroll.DefaultScrollHandle;
import com.github.barteksc.pdfviewer.util.Constants;
import com.github.barteksc.pdfviewer.util.FitPolicy;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.google.android.material.shape.MaterialShapeDrawable;
import com.jaredrummler.cyanea.prefs.CyaneaSettingsActivity;
import com.kobakei.ratethisapp.RateThisApp;
import com.shockwave.pdfium.PdfDocument;
@@ -245,7 +246,7 @@ public class MainActivity extends ProgressActivity implements OnPageChangeListen
    }

    private void setBottomBarListeners() {
        BottomNavigationView bottomView = (BottomNavigationView) findViewById(R.id.bottom_navigation);
        BottomNavigationView bottomView = findViewById(R.id.bottom_navigation);
        bottomView.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() {
            @Override
            public boolean onNavigationItemSelected(@NonNull MenuItem item) {
@@ -278,6 +279,9 @@ public class MainActivity extends ProgressActivity implements OnPageChangeListen
                return false;
            }
        });
        // Workaround for https://issuetracker.google.com/issues/124153644
        MaterialShapeDrawable viewBackground = (MaterialShapeDrawable) bottomView.getBackground();
        viewBackground.setShadowCompatibilityMode(MaterialShapeDrawable.SHADOW_COMPAT_MODE_ALWAYS);
    }

    void setPdfViewConfiguration() {
+9 −7
Original line number Diff line number Diff line
@@ -22,9 +22,11 @@
  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  ~ SOFTWARE.
  -->
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:clipChildren="false"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.gsnathan.pdfviewer.MainActivity">
@@ -39,7 +41,7 @@ tools:context="com.gsnathan.pdfviewer.MainActivity">
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:background="?android:attr/colorPrimary"
        app:itemBackground="?android:attr/colorPrimary"
        android:minHeight="?android:attr/actionBarSize"
        app:itemIconTint="?menuIconColor"
        app:itemTextColor="?menuIconColor"