Take a screenshot of Android 5.0 app with height

When I take a screenshot of my app (Material Design with Elevations) the shadow (height) is not in the saved screenshots file. I am trying this with a real device (Nexus 5) and with a google emulator. Screenshots look great, but shadows are not included.

i took screenshots solo and screencap (adb shell).

Anyone have an idea? thank

EDIT: manifest (part):

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="my.package.name"
    android:installLocation="auto"
    android:versionCode="123"
    android:versionName="1.23" >

    <supports-screens android:anyDensity="true"
                      android:largeScreens="true"
                      android:normalScreens="true"
                      android:resizeable="true"
                      android:smallScreens="true"
                      android:xlargeScreens="true"/>

    <uses-feature
    android:glEsVersion="0x00020000"
    android:required="true" />

    <uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="21" />

    <uses-permission android:name="android.permission.INTERNET" />
    <!-- ... -->

    <application
    android:name="MyApplication"
    android:allowBackup="true"
    android:hardwareAccelerated="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:largeHeap="true"
    android:vmSafeMode="true"
    android:theme="@style/AppTheme">
    <!-- definition of receivers -->
    <!-- definition of activities -->
    </application>

</manifest>

      

+3


source to share


2 answers


modify manifest file:

<uses-sdk
    android:minSdkVersion="21"
    android:targetSdkVersion="21" />

      



And now check your PLZ code.

+1


source


Robotium can accept screenshots that include only a portion of the application under test. This means that, for example, the status bar is excluded. As far as I know, screencap can handle this, but I'm not sure. You can also try other ways to take screenshots:



0


source







All Articles