by default show the undecrypted block without line wrapping, just feels less messy, switch after decryption

This commit is contained in:
Thialfihar 2010-06-02 10:20:41 +00:00
parent aea1902591
commit 72b899fa79
2 changed files with 5 additions and 2 deletions

View File

@ -77,6 +77,7 @@
<EditText
android:id="@+id/message"
android:inputType="text|textCapSentences|textMultiLine|textLongMessage"
android:scrollHorizontally="true"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="top"/>

View File

@ -171,7 +171,7 @@ public class DecryptActivity extends BaseActivity {
byteOut.write(bytes, 0, length);
}
byteOut.close();
String data = Strings.fromUTF8ByteArray(byteOut.toByteArray());
String data = new String(byteOut.toByteArray());
mMessage.setText(data);
} catch (FileNotFoundException e) {
// ignore, then
@ -542,8 +542,10 @@ public class DecryptActivity extends BaseActivity {
Toast.makeText(this, R.string.decryptionSuccessful, Toast.LENGTH_SHORT).show();
switch (mDecryptTarget) {
case Id.target.message: {
String decryptedMessage = Strings.fromUTF8ByteArray(data.getByteArray(Apg.EXTRA_DECRYPTED_MESSAGE));
String decryptedMessage =
new String(data.getByteArray(Apg.EXTRA_DECRYPTED_MESSAGE));
mMessage.setText(decryptedMessage);
mMessage.setHorizontallyScrolling(false);
mReplyButton.setVisibility(View.VISIBLE);
break;
}