Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

220
Visualizações
How to remove padding from Rating Bar in Android?

i have rating bar on my application and it appears like this:

enter image description here

I've tried to set padding to 0dp, but nothing changed to the view.

 <RatingBar
      android:id="@+id/ratingBar"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:numStars="5"
      android:layout_marginStart="16dp"
      android:isIndicator="false"
      style="@style/Widget.AppCompat.RatingBar"/>

Expected result: I am expecting the rating bar with no right padding and bottom padding.

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

You can simply adjust this

style="@android:style/Widget.DeviceDefault.RatingBar.Small"

instead of

style="@style/Widget.AppCompat.RatingBar
over 4 years ago · Santiago Trujillo Relatório

0

I add this to my xml code and it solved my problems:

android:scaleX="1"
android:scaleY="1"
over 4 years ago · Santiago Trujillo Relatório

0

The built-in Android rating bar is very visually problematic, in which case I would rather use the improvements made by Android users to size each star depending on the size of the object. Enclosing you a convenient library to work with, I believe this library will solve you a lot of problems with the development.

https://github.com/xckevin/AndroidSmartRatingBar?utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=7405

Credit to the developer kevin.liu (xckevin).

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda