Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

android-layout

What is the difference between gravity and layout_gravity in Android?

August 29, 2022 by Tarik

Their names should help you: android:gravity sets the gravity of the contents (i.e. its subviews) of the View it’s used on. android:layout_gravity sets the gravity of the View or Layout relative to its parent. And an example is here.

Categories android Tags android, android-gravity, android-layout Leave a comment

What is the difference between match_parent and fill_parent?

August 28, 2022 by Tarik

They’re the same thing (in API Level 8+). Use match_parent. FILL_PARENT (renamed MATCH_PARENT in API Level 8 and higher), which means that the view wants to be as big as its parent (minus padding) … fill_parent: The view should be as big as its parent (minus padding). This constant is deprecated starting from API Level … Read more

Categories android Tags android, android-layout Leave a comment
Newer posts
← Previous Page1 … Page80 Page81

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa