Solucionado (ver solução)
Solucionado
(ver solução)
3
respostas

Erro no estilo da ratingBar

Opa, escrevi o xml igual ao o vídeo, mas minha ratinha bar está vindo com 10 estrelas, ja tentei tirar a tag max mas mesmo assim continua com 10, segue o código:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.mauri.listaalunos.FormularioActivity">

    <EditText android:hint="Nome"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"/>

    <EditText android:hint="Telefone"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"/>

    <EditText android:hint="Lugar"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"/>

    <RatingBar android:numStars="5"
        android:layout_gravity="center"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"/>


</LinearLayout>
3 respostas
solução!

Mauricio, tudo bem ?

Cara dá uma olhadinha que você tá usando o tamanho total da largura, por esse motivo ele está ignorando o numero de estrelas.

Joga para wrap_content que deve solucionar :D

Isso mesmo cara, obrigado!

O que precisar só abrir um novo tópico !

Bons estudos