I'm in need of some help. My android app is in trouble, all the elements I add it plays on the screen in a different way.
Ex: when I add an EditText it does not stick to the border only shows the same when it gains focus and so to the others
Can you solve this if there is no way I can redo it? Follow the image below with the real problem.
followcodes
activity_finance_alterar.xml
<Spinnerandroid:layout_width="350dp"
android:layout_height="wrap_content"
android:id="@+id/SPAtlerarResultado"
android:textColor="@color/font"
android:layout_below="@+id/tvAlterarConsultor"
android:layout_alignLeft="@+id/tvAlterarConsultor"
android:layout_alignStart="@+id/tvAlterarConsultor"
android:layout_marginTop="26dp"
android:drawableRight="@drawable/spinner_triangulo"
android:prompt="@string/textospiner"
android:drawSelectorOnTop="true"
/>
financial_alterar_spinner.xml
<TextView
android:layout_width="wrap_content"
android:text="Resultado"
android:textColor="@color/font"
android:id="@+id/tvAlterarResultado"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_height="48dp"
android:gravity="center_vertical|start"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:textSize="18dp"
/>
.class
Spinner sp = (Spinner) findViewById(R.id.SPAtlerarResultado);
sp.setPrompt("Selecione um resultado");
sp.setAdapter(new FinanceiroResultadoAdapter(FinanceiroAlterar.this, resultados));
My adapter is like this.
public View getView(int position, View convertView, ViewGroup parent) {
FinanceiroResultado resultado = lista.get(position);
View layout;
if(convertView == null){
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
layout = inflater.inflate(R.layout.financeiro_alterar_spinner, null);
}
else{
layout = convertView;
}
TextView nome = (TextView) layout.findViewById(R.id.tvAlterarResultado);
nome.setText(resultado.getDs_resultadofinanceiro());
return layout;
}