Leave listview item filling the entire screen

0

Can you leave an item in a ListView by taking the entire screen of the phone?

    
asked by anonymous 17.03.2015 / 18:19

1 answer

0

Leave layout_width and layout_height set to math_parent .

In the xml of activity delete the following lines of code:

android:paddingBottom="16dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="16dp"

OR replace the 16dp of each line with 0dp, like this:

android:paddingBottom="0dp"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingTop="0dp"

In styles.xml (app > res > values> styles.xml ) you modify the line <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> by <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> .

    
26.02.2017 / 23:03