Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is the offending line:</p> <p><code>String noten_history_string = String.valueOf(mNotenHistory);</code></p> <p>Look at this definition, from the Android documentation:</p> <pre><code>public static String valueOf(Object value) </code></pre> <blockquote> <p>Added in API level 1</p> <p>Converts the specified object to its string representation. If the object is null return the string "null", otherwise use <code>toString()</code> to get the string representation.</p> </blockquote> <p>The <code>TextView</code> class inherits <code>toString()</code> from the <code>View</code> class. Here is its definition:</p> <blockquote> <p><code>public String toString ()</code> Added in API level 1</p> <p>Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression: <code>getClass().getName() + '@' + Integer.toHexString(hashCode())</code></p> </blockquote> <p>So this is your problem. <code>String.valueOf(mNotenHistory)</code> does <strong>not</strong> give you the text within the text view. Thus, you are writing something else (specifically, the line you mentioned) to your file. To obtain the text from your <code>TextView</code>, use the <code>getText()</code> method instead. This is what the line should look like:</p> <pre><code>String noten_history_string = mNotenHistory.getText(); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload