R
R
RusSanta2017-03-24 00:21:21
Android
RusSanta, 2017-03-24 00:21:21

The minus sign is displayed at the end of the number, but it should be before it, why?

The problem is that the sign is displayed after the number, but it should be at the beginning. I can’t understand why, since the line is formed correctly, only the output in the EditText of a negative number goes wrong, I would like to know at least why.
4a0a56fb39094a6ea204d53646a5b7fb.png
Here is my XML file code for the fragment that is displayed by EditText and GridView, in the screenshot above, you can see that a line containing the output in EditText is displayed in the Log, and everything is fine there.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    >
    <EditText
        android:id="@+id/fragment_edit_text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textDirection="rtl"/>

    <GridView
        android:id="@+id/fragment_gridview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"

        android:numColumns="4"
        android:stretchMode="columnWidth"></GridView>


</LinearLayout>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rou1997, 2017-03-24
@RusSanta

Here is the problem:
This is not the right solution, and actually the problem is not only in the minus, the number is generally written backwards to make the text on the right - you should have used gravityinstead

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question