Merge commit '2.7.0-beta' into develop

This commit is contained in:
genofire 2020-02-18 07:21:19 +01:00
commit 0ec4088626
No known key found for this signature in database
GPG Key ID: 9D7D3C6BFF600C6A
71 changed files with 470 additions and 269 deletions

View File

@ -167,7 +167,7 @@ If you dont want this simply pick a server which does not offer Push Notifica
You can find a detailed description of how your server, the app server and FCM are interacting with each other in the [README](https://github.com/iNPUTmice/p2/blob/master/README.md) of the Conversations App Server.
¹ Your server only needs to support the server side of [XEP-0357: Push Notifications](http://xmpp.org/extensions/xep-0357.html). If you use the Play Store version you do **not** need to run your own app server. The server modules are called *mod_cloud_notify* on Prosody and *mod_push* on ejabberd.
¹ If you use the Play Store version you do **not** need to run your own app server. Your server only needs to support the server side of [XEP-0357: Push Notifications](http://xmpp.org/extensions/xep-0357.html) and [XEP-0198: Stream Management](https://xmpp.org/extensions/xep-0198.html). The prosody server modules are called *mod_cloud_notify* and *mod_smacks*. The ejabberd server modules are called *mod_push* and *mod_stream_mgmt*.
#### But why do I need a permanent notification if I use Google Push?

View File

@ -1,76 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
width="95"
height="95"
id="Yes_check"
inkscape:version="0.91 r13725"
sodipodi:docname="ic_received_indicator.svg">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="956"
inkscape:window-height="1156"
id="namedview8"
showgrid="false"
showguides="true"
inkscape:guide-bbox="true"
inkscape:zoom="5.04"
inkscape:cx="-4.3215257"
inkscape:cy="37.489149"
inkscape:window-x="2880"
inkscape:window-y="20"
inkscape:window-maximized="0"
inkscape:current-layer="Yes_check"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<defs
id="defs1373">
<linearGradient
id="linearGradient2250">
<stop
style="stop-color:#008700;stop-opacity:1"
offset="0"
id="stop2252" />
<stop
style="stop-color:#006f00;stop-opacity:1"
offset="1"
id="stop2254" />
</linearGradient>
</defs>
<path
d="m 2.3894499,61.412131 c 0,0 16.7473651,20.271938 22.3528491,26.154483 3.648598,3.026816 12.878061,3.83429 14.880462,0 1.64903,-2.636163 2.380404,-5.8348 2.991819,-7.931771 C 49.920898,54.575958 72.297563,22.337321 92.321082,10.50894 96.814837,5.2377522 86.327596,3.5063483 77.217442,6.9958109 63.487006,12.254946 34.107717,59.529917 29.270873,69.192545 22.40265,70.841418 12.518762,52.447046 12.518762,52.447046 7.3805037,52.552428 1.8841059,52.071763 2.3894499,61.412131 z"
style="fill:#259b24;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.29981154;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="check"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccscsccc" />
</svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

55
art/open_pdf_black.svg Normal file
View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
width="24"
height="24"
viewBox="0 0 24 24"
id="svg4"
sodipodi:docname="open_pdf_black.svg"
inkscape:version="0.92.4 5da689c313, 2019-01-14">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="956"
inkscape:window-height="1560"
id="namedview6"
showgrid="false"
inkscape:zoom="9.8333333"
inkscape:cx="-6.1016949"
inkscape:cy="12"
inkscape:window-x="4800"
inkscape:window-y="18"
inkscape:window-maximized="0"
inkscape:current-layer="svg4" />
<path
d="M12,10.5H13V13.5H12V10.5M7,11.5H8V10.5H7V11.5M20,6V18A2,2 0 0,1 18,20H6A2,2 0 0,1 4,18V6A2,2 0 0,1 6,4H18A2,2 0 0,1 20,6M9.5,10.5A1.5,1.5 0 0,0 8,9H5.5V15H7V13H8A1.5,1.5 0 0,0 9.5,11.5V10.5M14.5,10.5A1.5,1.5 0 0,0 13,9H10.5V15H13A1.5,1.5 0 0,0 14.5,13.5V10.5M18.5,9H15.5V15H17V13H18.5V11.5H17V10.5H18.5V9Z"
id="path2"
style="fill:#000000;fill-opacity:0.5411765" />
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

55
art/open_pdf_white.svg Normal file
View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
width="24"
height="24"
viewBox="0 0 24 24"
id="svg4"
sodipodi:docname="open_pdf_white.svg"
inkscape:version="0.92.4 5da689c313, 2019-01-14">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="3840"
inkscape:window-height="1600"
id="namedview6"
showgrid="false"
inkscape:zoom="9.8333333"
inkscape:cx="-23.084746"
inkscape:cy="11.084746"
inkscape:window-x="1920"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg4" />
<path
d="M12,10.5H13V13.5H12V10.5M7,11.5H8V10.5H7V11.5M20,6V18A2,2 0 0,1 18,20H6A2,2 0 0,1 4,18V6A2,2 0 0,1 6,4H18A2,2 0 0,1 20,6M9.5,10.5A1.5,1.5 0 0,0 8,9H5.5V15H7V13H8A1.5,1.5 0 0,0 9.5,11.5V10.5M14.5,10.5A1.5,1.5 0 0,0 13,9H10.5V15H13A1.5,1.5 0 0,0 14.5,13.5V10.5M18.5,9H15.5V15H17V13H18.5V11.5H17V10.5H18.5V9Z"
id="path2"
style="fill:#ffffff;fill-opacity:0.69803923" />
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -23,9 +23,10 @@ images = {
'play_gif_white.svg' => ['play_gif_white', 128],
'play_video_black.svg' => ['play_video_black', 128],
'play_gif_black.svg' => ['play_gif_black', 128],
'open_pdf_black.svg' => ['open_pdf_black', 128],
'open_pdf_white.svg' => ['open_pdf_white', 128],
'conversations_mono.svg' => ['conversations/ic_notification', 24],
'quicksy_mono.svg' => ['quicksy/ic_notification', 24],
'ic_received_indicator.svg' => ['ic_received_indicator', 12],
'ic_send_text_offline.svg' => ['ic_send_text_offline', 36],
'ic_send_text_offline_white.svg' => ['ic_send_text_offline_white', 36],
'ic_send_text_online.svg' => ['ic_send_text_online', 36],

View File

@ -91,7 +91,7 @@ android {
minSdkVersion 16
targetSdkVersion 25
versionCode 363
versionName "2.6.4.1"
versionName "2.7.0-beta"
archivesBaseName += "-$versionName"
applicationId "eu.sum7.conversations"
resValue "string", "applicationId", applicationId

View File

@ -5,4 +5,7 @@
<string name="create_new_account">Crear nueva cuenta</string>
<string name="do_you_have_an_account">¿Ya tienes una cuenta XMPP? Este puede ser el caso si ya estás usando un cliente XMPP diferente o has usado Conversations anteriormente. Si no es así, puedes crear una nueva cuenta XMPP ahora mismo.\nConsejo: Algunos proveedores de email también ofrecen una cuenta XMPP.</string>
<string name="server_select_text">XMPP es una red de mensajería instantánea independiente del proveedor. Puedes usar este cliente con cualquier servidor XMPP que elijas.\nSin embargo, para tu conveniencia, hacemos de forma sencilla la creación de una cuenta en chat.sum7.eu; un proveedor especializado para el uso con Conversations </string>
<string name="magic_create_text_on_x">Has sido invitado a %1$s. Te guiaremos durante el proceso de creación de la cuenta.\nCuando selecciones %1$s como proveedor podrás comunicarte con usuarios de otros servidores proporcionándoles tu dirección XMPP completa. </string>
<string name="magic_create_text_fixed">Has sido invitado a %1$s. Un nombre de usuario ya ha sido escogido para ti. Te guiaremos durante el proceso de creación de la cuenta.\nPodrás comunicarte con otros usuarios de otros servidores proporcionándoles tu dirección XMPP completa. </string>
<string name="your_server_invitation">Tu invitación al servidor</string>
</resources>

View File

@ -5,4 +5,7 @@
<string name="create_new_account">Créer un nouveau compte</string>
<string name="do_you_have_an_account">Avez-vous déjà un compte XMPP ? Cela peut être le cas si vous utilisez déjà un autre client XMPP ou si vous avez déjà utilisé Conversations auparavant. Sinon, vous pouvez créer un nouveau compte XMPP dès maintenant. Remarque : Certains fournisseurs de messagerie proposent également des comptes XMPP.</string>
<string name="server_select_text">XMPP est un réseau de messagerie instantanée indépendant du fournisseur. Vous pouvez utiliser ce client avec n\'importe quel serveur XMPP de votre choix. Toutefois, pour votre commodité, nous avons facilité la création d\'un compte sur chat.sum7.eu ; un fournisseur spécialement conçu pour l\'utilisation avec Conversations.</string>
<string name="magic_create_text_on_x">Vous avez été invité à %1$s. Nous vous guiderons dans le processus de création d\'un compte.\nEn choisissant %1$s comme fournisseur, vous pourrez communiquer avec les utilisateurs d\'autres fournisseurs en leur donnant votre adresse XMPP complète.</string>
<string name="magic_create_text_fixed">Vous avez été invité par %1$s . Un nom d\'utilisateur a déjà été choisi pour vous. Nous vous guiderons dans le processus de création d\'un compte. Vous pourrez communiquer avec les utilisateurs d\'autres fournisseurs en leur donnant votre adresse XMPP complète.</string>
<string name="your_server_invitation">Votre invitation au serveur</string>
</resources>

View File

@ -7,4 +7,7 @@
Suggerimento: alcuni provider di email forniscono anche un account XMPP.</string>
<string name="server_select_text">XMPP è una rete di instant messaging indipendente dal provider. Puoi usare questo client con qualsiasi server XMPP.
In ogni caso per facilitare puoi creare facilmente un account su chat.sum7.eu, un provider pensato apposta per essere usato con Conversations.</string>
<string name="magic_create_text_on_x">Sei stato invitato su %1$s. Ti guideremo nel procedimento per creare un account.\nQuando scegli %1$s come fornitore sarai in grado di comunicare con utenti di altri fornitori dando loro l\'indirizzo XMPP completo.</string>
<string name="magic_create_text_fixed">Sei stato invitato su %1$s. È già stato scelto un nome utente per te. Ti guideremo nel procedimento per creare un account.\nSarai in grado di comunicare con utenti di altri fornitori dando loro l\'indirizzo XMPP completo.</string>
<string name="your_server_invitation">Il tuo invito al server</string>
</resources>

View File

@ -4,5 +4,5 @@
<string name="use_chat.sum7.eu">Скористатися chat.sum7.eu</string>
<string name="create_new_account">Створити новий обліковий запис</string>
<string name="do_you_have_an_account">Вже маєте обліковий запис XMPP? Можливо, користуєтеся іншою програмою XMPP або користувалися цією програмою раніше. Якщо ні, можете створити новий обліковий запис XMPP просто зараз.\nЗверніть увагу: Деякі постачальники електронної пошти водночас надають облікові записи XMPP.</string>
<string name="server_select_text">XMPP — це мережа обміну повідомленнями, незалежна від постачальників. Можете використовувати цю програму з будь-яким XMPP сервером, який оберете.\nПроте, для зручності, ми спростили створення облікового запису на conversations.im¹ — в постачальника, який спеціально налаштований на роботу з цією програмою.</string>
<string name="server_select_text">XMPP — це мережа обміну повідомленнями, незалежна від постачальників. Можете використовувати цю програму з будь-яким XMPP сервером, який оберете.\nПроте, для зручності, ми спростили створення облікового запису на chat.sum7.eu — в постачальника, який спеціально налаштований на роботу з цією програмою.</string>
</resources>

View File

@ -4,4 +4,8 @@
<string name="use_chat.sum7.eu">使用 chat.sum7.eu</string>
<string name="create_new_account">创建新账户</string>
<string name="do_you_have_an_account">您已经拥有一个XMPP账户了吗如果您之前使用过其他的XMPP客户端的话那么您已经拥有这种账户了。如果没有账户的话您可以现在创建一个。\n提示有些电子邮件服务也提供XMPP账户。</string>
</resources>
<string name="server_select_text">XMPP是独立于提供程序的即时消息网络。 您可以将此客户端与所选的任何XMPP服务器一起使用。\ n不过为了您的方便我们很容易在对话中创建帐户。im¹; 特别适合与“对话”配合使用的提供商。</string>
<string name="magic_create_text_on_x">您已受邀参加%1$s。 我们将指导您完成创建帐户的过程。\n选择%1$s作为提供者后您可以通过提供其他人的完整XMPP地址与其他提供者的用户进行交流。</string>
<string name="magic_create_text_fixed">您已受邀参加%1$s。 已经为您选择了一个用户名。 我们将指导您完成创建帐户的过程。\n您可以通过向其他提供商的用户提供完整的XMPP地址来与他们进行交流。</string>
<string name="your_server_invitation">你的服务器邀请</string>
</resources>

View File

@ -100,7 +100,7 @@ public final class Config {
public static final boolean REMOVE_BROKEN_DEVICES = false;
public static final boolean OMEMO_PADDING = false;
public static final boolean PUT_AUTH_TAG_INTO_KEY = true;
public static final boolean TWELVE_BYTE_IV = false;
public static final boolean TWELVE_BYTE_IV = true;
public static final boolean USE_BOOKMARKS2 = false;

View File

@ -508,13 +508,7 @@ public class Account extends AbstractEntity implements AvatarService.Avatarable
}
}
public boolean hasBookmarkFor(final Jid jid) {
synchronized (this.bookmarks) {
return this.bookmarks.containsKey(jid.asBareJid());
}
}
Bookmark getBookmark(final Jid jid) {
public Bookmark getBookmark(final Jid jid) {
synchronized (this.bookmarks) {
return this.bookmarks.get(jid.asBareJid());
}

View File

@ -452,6 +452,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
if (conversation.getMucOptions().isSelf(counterpart)) {
status = Message.STATUS_SEND_RECEIVED;
isCarbon = true; //not really carbon but received from another resource
//TODO this would be the place to change the body after something like mod_pastebin
if (mXmppConnectionService.markMessage(conversation, remoteMsgId, status, serverMsgId)) {
return;
} else if (remoteMsgId == null || Config.IGNORE_ID_REWRITE_IN_MUC) {

View File

@ -11,6 +11,7 @@ import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.pdf.PdfRenderer;
import android.media.MediaMetadataRetriever;
import android.media.MediaScannerConnection;
import android.net.Uri;
@ -25,6 +26,7 @@ import android.system.Os;
import android.system.StructStat;
import android.util.Base64;
import android.util.Base64OutputStream;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.LruCache;
@ -59,6 +61,7 @@ import eu.siacs.conversations.services.AttachFileToConversationRunnable;
import eu.siacs.conversations.services.XmppConnectionService;
import eu.siacs.conversations.ui.RecordingActivity;
import eu.siacs.conversations.ui.util.Attachment;
import eu.siacs.conversations.utils.Compatibility;
import eu.siacs.conversations.utils.CryptoHelper;
import eu.siacs.conversations.utils.ExifHelper;
import eu.siacs.conversations.utils.FileUtils;
@ -421,18 +424,22 @@ public class FileBackend {
}
public Bitmap getPreviewForUri(Attachment attachment, int size, boolean cacheOnly) {
final String key = "attachment_" + attachment.getUuid().toString() + "_" + String.valueOf(size);
final String key = "attachment_" + attachment.getUuid().toString() + "_" + size;
final LruCache<String, Bitmap> cache = mXmppConnectionService.getBitmapCache();
Bitmap bitmap = cache.get(key);
if (bitmap != null || cacheOnly) {
return bitmap;
}
if (attachment.getMime() != null && attachment.getMime().startsWith("video/")) {
final String mime = attachment.getMime();
if ("application/pdf".equals(mime) && Compatibility.runsTwentyOne()) {
bitmap = cropCenterSquarePdf(attachment.getUri(), size);
drawOverlay(bitmap, paintOverlayBlackPdf(bitmap) ? R.drawable.open_pdf_black : R.drawable.open_pdf_white, 0.75f);
} else if (mime != null && mime.startsWith("video/")) {
bitmap = cropCenterSquareVideo(attachment.getUri(), size);
drawOverlay(bitmap, paintOverlayBlack(bitmap) ? R.drawable.play_video_black : R.drawable.play_video_white, 0.75f);
} else {
bitmap = cropCenterSquare(attachment.getUri(), size);
if (bitmap != null && "image/gif".equals(attachment.getMime())) {
if (bitmap != null && "image/gif".equals(mime)) {
Bitmap withGifOverlay = bitmap.copy(Bitmap.Config.ARGB_8888, true);
drawOverlay(withGifOverlay, paintOverlayBlack(withGifOverlay) ? R.drawable.play_gif_black : R.drawable.play_gif_white, 1.0f);
bitmap.recycle();
@ -509,7 +516,6 @@ public class FileBackend {
}
public DownloadableFile getFileForPath(String path) {
return getFileForPath(path, MimeUtils.guessMimeTypeFromExtension(MimeUtils.extractRelevantExtension(path)));
}
@ -818,10 +824,12 @@ public class FileBackend {
}
DownloadableFile file = getFile(message);
final String mime = file.getMimeType();
if (mime.startsWith("video/")) {
if ("application/pdf".equals(mime) && Compatibility.runsTwentyOne()) {
thumbnail = getPdfDocumentPreview(file, size);
} else if (mime.startsWith("video/")) {
thumbnail = getVideoPreview(file, size);
} else {
Bitmap fullsize = getFullsizeImagePreview(file, size);
Bitmap fullsize = getFullSizeImagePreview(file, size);
if (fullsize == null) {
throw new FileNotFoundException();
}
@ -840,7 +848,7 @@ public class FileBackend {
return thumbnail;
}
private Bitmap getFullsizeImagePreview(File file, int size) {
private Bitmap getFullSizeImagePreview(File file, int size) {
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = calcSampleSize(file, size);
try {
@ -882,6 +890,21 @@ public class FileBackend {
return record < 0;
}
private boolean paintOverlayBlackPdf(final Bitmap bitmap) {
final int h = bitmap.getHeight();
final int w = bitmap.getWidth();
int white = 0;
for (int y = 0; y < h; ++y) {
for (int x = 0; x < w; ++x) {
int pixel = bitmap.getPixel(x, y);
if ((Color.red(pixel) * 0.299 + Color.green(pixel) * 0.587 + Color.blue(pixel) * 0.114) > 186) {
white++;
}
}
}
return white > (h * w * 0.4f);
}
private Bitmap cropCenterSquareVideo(Uri uri, int size) {
MediaMetadataRetriever metadataRetriever = new MediaMetadataRetriever();
Bitmap frame;
@ -897,8 +920,8 @@ public class FileBackend {
}
}
private Bitmap getVideoPreview(File file, int size) {
MediaMetadataRetriever metadataRetriever = new MediaMetadataRetriever();
private Bitmap getVideoPreview(final File file, final int size) {
final MediaMetadataRetriever metadataRetriever = new MediaMetadataRetriever();
Bitmap frame;
try {
metadataRetriever.setDataSource(file.getAbsolutePath());
@ -913,6 +936,49 @@ public class FileBackend {
return frame;
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
private Bitmap getPdfDocumentPreview(final File file, final int size) {
try {
final ParcelFileDescriptor fileDescriptor = ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY);
final Bitmap rendered = renderPdfDocument(fileDescriptor, size, true);
drawOverlay(rendered, paintOverlayBlackPdf(rendered) ? R.drawable.open_pdf_black : R.drawable.open_pdf_white, 0.75f);
return rendered;
} catch (IOException e) {
Log.d(Config.LOGTAG, "unable to render PDF document preview", e);
final Bitmap placeholder = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
placeholder.eraseColor(0xff000000);
return placeholder;
}
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
private Bitmap cropCenterSquarePdf(final Uri uri, final int size) {
try {
ParcelFileDescriptor fileDescriptor = mXmppConnectionService.getContentResolver().openFileDescriptor(uri, "r");
final Bitmap bitmap = renderPdfDocument(fileDescriptor, size, false);
return cropCenterSquare(bitmap, size);
} catch (Exception e) {
final Bitmap placeholder = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
placeholder.eraseColor(0xff000000);
return placeholder;
}
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
private Bitmap renderPdfDocument(ParcelFileDescriptor fileDescriptor, int targetSize, boolean fit) throws IOException {
final PdfRenderer pdfRenderer = new PdfRenderer(fileDescriptor);
final PdfRenderer.Page page = pdfRenderer.openPage(0);
final Dimensions dimensions = scalePdfDimensions(new Dimensions(page.getHeight(), page.getWidth()), targetSize, fit);
final Bitmap rendered = Bitmap.createBitmap(dimensions.width, dimensions.height, Bitmap.Config.ARGB_8888);
rendered.eraseColor(0xffffffff);
page.render(rendered, null, null, PdfRenderer.Page.RENDER_MODE_FOR_DISPLAY);
page.close();
pdfRenderer.close();
fileDescriptor.close();
return rendered;
}
public Uri getTakePhotoUri() {
File file;
if (Config.ONLY_INTERNAL_STORAGE) {
@ -1210,14 +1276,22 @@ public class FileBackend {
final boolean image = message.getType() == Message.TYPE_IMAGE || (mime != null && mime.startsWith("image/"));
final boolean video = mime != null && mime.startsWith("video/");
final boolean audio = mime != null && mime.startsWith("audio/");
final boolean pdf = "application/pdf".equals(mime);
final StringBuilder body = new StringBuilder();
if (url != null) {
body.append(url.toString());
}
body.append('|').append(file.getSize());
if (image || video) {
if (image || video || (pdf && Compatibility.runsTwentyOne())) {
try {
Dimensions dimensions = image ? getImageDimensions(file) : getVideoDimensions(file);
final Dimensions dimensions;
if (video) {
dimensions = getVideoDimensions(file);
} else if (pdf && Compatibility.runsTwentyOne()) {
dimensions = getPdfDocumentDimensions(file);
} else {
dimensions = getImageDimensions(file);
}
if (dimensions.valid()) {
body.append('|').append(dimensions.width).append('|').append(dimensions.height);
}
@ -1264,6 +1338,49 @@ public class FileBackend {
return getVideoDimensions(metadataRetriever);
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
private Dimensions getPdfDocumentDimensions(final File file) {
final ParcelFileDescriptor fileDescriptor;
try {
fileDescriptor = ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY);
if (fileDescriptor == null) {
return new Dimensions(0, 0);
}
} catch (FileNotFoundException e) {
return new Dimensions(0, 0);
}
try {
final PdfRenderer pdfRenderer = new PdfRenderer(fileDescriptor);
final PdfRenderer.Page page = pdfRenderer.openPage(0);
final int height = page.getHeight();
final int width = page.getWidth();
page.close();
pdfRenderer.close();
return scalePdfDimensions(new Dimensions(height, width));
} catch (IOException e) {
Log.d(Config.LOGTAG, "unable to get dimensions for pdf document", e);
return new Dimensions(0, 0);
}
}
private Dimensions scalePdfDimensions(Dimensions in) {
final DisplayMetrics displayMetrics = mXmppConnectionService.getResources().getDisplayMetrics();
final int target = (int) (displayMetrics.density * 288);
return scalePdfDimensions(in, target, true);
}
private static Dimensions scalePdfDimensions(final Dimensions in, final int target, final boolean fit) {
final int w, h;
if (fit == (in.width <= in.height)) {
w = Math.max((int) (in.width / ((double) in.height / target)), 1);
h = target;
} else {
w = target;
h = Math.max((int) (in.height / ((double) in.width / target)), 1);
}
return new Dimensions(h, w);
}
public Bitmap getAvatar(String avatar, int size) {
if (avatar == null) {
return null;
@ -1275,10 +1392,6 @@ public class FileBackend {
return bm;
}
public boolean isFileAvailable(Message message) {
return getFile(message).exists();
}
private static class Dimensions {
public final int width;
public final int height;

View File

@ -454,7 +454,11 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
setTitle(mucOptions.isPrivateAndNonAnonymous() ? R.string.action_muc_details : R.string.channel_details);
this.binding.editMucNameButton.setVisibility((self.getAffiliation().ranks(MucOptions.Affiliation.OWNER) || mucOptions.canChangeSubject()) ? View.VISIBLE : View.GONE);
this.binding.detailsAccount.setText(getString(R.string.using_account, account));
if (mConversation.isPrivateAndNonAnonymous()) {
this.binding.jid.setText(getString(R.string.hosted_on, mConversation.getJid().getDomain()));
} else {
this.binding.jid.setText(mConversation.getJid().asBareJid().toEscapedString());
}
AvatarWorkerTask.loadAvatar(mConversation, binding.yourPhoto, R.dimen.avatar_on_details_screen_size);
String roomName = mucOptions.getName();
String subject = mucOptions.getSubject();
@ -490,7 +494,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
this.binding.mucRole.setText(getStatus(self));
if (mucOptions.getSelf().getAffiliation().ranks(MucOptions.Affiliation.OWNER)) {
this.binding.mucSettings.setVisibility(View.VISIBLE);
this.binding.mucConferenceType.setText(MucConfiguration.describe(this,mucOptions));
this.binding.mucConferenceType.setText(MucConfiguration.describe(this, mucOptions));
} else if (!mucOptions.isPrivateAndNonAnonymous() && mucOptions.nonanonymous()) {
this.binding.mucSettings.setVisibility(View.VISIBLE);
this.binding.mucConferenceType.setText(R.string.group_chat_will_make_your_jabber_id_public);

View File

@ -1032,10 +1032,12 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
}
if (isBookmarkChecked) {
if (account.hasBookmarkFor(conferenceJid)) {
layout.setError(getString(R.string.bookmark_already_exists));
Bookmark bookmark = account.getBookmark(conferenceJid);
if (bookmark != null) {
dialog.dismiss();
openConversationsForBookmark(bookmark);
} else {
final Bookmark bookmark = new Bookmark(account, conferenceJid.asBareJid());
bookmark = new Bookmark(account, conferenceJid.asBareJid());
bookmark.setAutojoin(getBooleanPreference("autojoin", R.bool.autojoin));
final String nick = conferenceJid.getResource();
if (nick != null && !nick.isEmpty() && !nick.equals(MucOptions.defaultNick(account))) {
@ -1145,6 +1147,10 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
final AdapterView.AdapterContextMenuInfo acmi = (AdapterContextMenuInfo) menuInfo;
if (mResContextMenu == R.menu.conference_context) {
activity.conference_context_id = acmi.position;
final Bookmark bookmark = (Bookmark) activity.conferences.get(acmi.position);
final Conversation conversation = bookmark.getConversation();
final MenuItem share = menu.findItem(R.id.context_share_uri);
share.setVisible(conversation == null || !conversation.isPrivateAndNonAnonymous());
} else if (mResContextMenu == R.menu.contact_context) {
activity.contact_context_id = acmi.position;
final Contact contact = (Contact) activity.contacts.get(acmi.position);
@ -1155,7 +1161,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
showContactDetailsItem.setVisible(false);
}
deleteContactMenuItem.setVisible(contact.showInRoster() && !contact.getOption(Contact.Options.SYNCED_VIA_OTHER));
XmppConnection xmpp = contact.getAccount().getXmppConnection();
final XmppConnection xmpp = contact.getAccount().getXmppConnection();
if (xmpp != null && xmpp.getFeatures().blocking() && !contact.isSelf()) {
if (contact.isBlocked()) {
blockUnblockItem.setTitle(R.string.unblock_contact);

View File

@ -539,15 +539,15 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
this.audioPlayer.init(audioPlayer, message);
}
private void displayImageMessage(ViewHolder viewHolder, final Message message, final boolean darkBackground) {
private void displayMediaPreviewMessage(ViewHolder viewHolder, final Message message, final boolean darkBackground) {
toggleWhisperInfo(viewHolder, message, darkBackground);
viewHolder.download_button.setVisibility(View.GONE);
viewHolder.audioPlayer.setVisibility(View.GONE);
viewHolder.image.setVisibility(View.VISIBLE);
FileParams params = message.getFileParams();
double target = metrics.density * 288;
int scaledW;
int scaledH;
final FileParams params = message.getFileParams();
final double target = metrics.density * 288;
final int scaledW;
final int scaledH;
if (Math.max(params.height, params.width) * metrics.density <= target) {
scaledW = (int) (params.width * metrics.density);
scaledH = (int) (params.height * metrics.density);
@ -746,7 +746,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
}
} else if (message.isFileOrImage() && message.getEncryption() != Message.ENCRYPTION_PGP && message.getEncryption() != Message.ENCRYPTION_DECRYPTION_FAILED) {
if (message.getFileParams().width > 0 && message.getFileParams().height > 0) {
displayImageMessage(viewHolder, message, darkBackground);
displayMediaPreviewMessage(viewHolder, message, darkBackground);
} else if (message.getFileParams().runtime > 0) {
displayAudioMessage(viewHolder, message, darkBackground);
} else {

View File

@ -111,6 +111,8 @@ public class UserAdapter extends ListAdapter<MucOptions.User, UserAdapter.ViewHo
}
});
viewHolder.binding.key.setText(OpenPgpUtils.convertKeyIdToHex(user.getPgpKeyId()));
} else {
viewHolder.binding.key.setVisibility(View.GONE);
}

View File

@ -44,6 +44,7 @@ import java.util.List;
import java.util.UUID;
import eu.siacs.conversations.Config;
import eu.siacs.conversations.utils.Compatibility;
import eu.siacs.conversations.utils.MimeUtils;
public class Attachment implements Parcelable {
@ -164,7 +165,13 @@ public class Attachment implements Parcelable {
}
public boolean renderThumbnail() {
return type == Type.IMAGE || (type == Type.FILE && mime != null && (mime.startsWith("video/") || mime.startsWith("image/")));
return type == Type.IMAGE || (type == Type.FILE && mime != null && renderFileThumbnail(mime));
}
private static boolean renderFileThumbnail(final String mime) {
return mime.startsWith("video/")
|| mime.startsWith("image/")
|| (Compatibility.runsTwentyOne() && "application/pdf".equals(mime));
}
public Uri getUri() {

View File

@ -38,14 +38,18 @@ public class Compatibility {
return Build.VERSION.SDK_INT < Build.VERSION_CODES.M || ContextCompat.checkSelfPermission(context, android.Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED;
}
public static boolean runsTwentySix() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O;
public static boolean runsTwentyOne() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP;
}
public static boolean runsTwentyFour() {
private static boolean runsTwentyFour() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N;
}
public static boolean runsTwentySix() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O;
}
public static boolean twentyEight() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.P;
}

View File

@ -0,0 +1,20 @@
package eu.siacs.conversations.xml;
import com.google.common.io.ByteSource;
import java.io.IOException;
import java.io.InputStream;
public class XmlElementReader {
public static Element read(byte[] bytes) throws IOException {
return read(ByteSource.wrap(bytes).openStream());
}
public static Element read(InputStream inputStream) throws IOException {
final XmlReader xmlReader = new XmlReader();
xmlReader.setInputStream(inputStream);
return xmlReader.readElement(xmlReader.readTag());
}
}

View File

@ -87,8 +87,7 @@ public class XmlReader implements Closeable {
return null;
}
public Element readElement(Tag currentTag) throws XmlPullParserException,
IOException {
public Element readElement(Tag currentTag) throws IOException {
Element element = new Element(currentTag.getName());
element.setAttributes(currentTag.getAttributes());
Tag nextTag = this.readTag();

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -219,7 +219,6 @@
<string name="destroy_channel">دمر القناة</string>
<string name="could_not_destroy_room">لم نتمكن مِن تدمير فريق المحادثة</string>
<string name="could_not_destroy_channel">لم نتمكن مِن تدمير القناة</string>
<string name="bookmark_already_exists">موجوده بالمفضلة سابقا</string>
<string name="action_edit_subject">تعديل موضوع مجموعة المحادثة</string>
<string name="topic">الموضوع</string>
<string name="joining_conference">في صدد الإنظمام إلى مجموعة المحادثة ...</string>

View File

@ -221,7 +221,6 @@
<string name="destroy_room">Унищожаване на груповия разговор</string>
<string name="destroy_room_dialog">Наистина ли искате да унищожите този групов разговор?\n\n<b>Внимание:</b> Груповият разговор ще бъде премахнат от сървъра.</string>
<string name="could_not_destroy_room">Груповият разговор не може да бъде унищожен</string>
<string name="bookmark_already_exists">Вече съществува такава отметка</string>
<string name="action_edit_subject">Редактиране на темата на груповия разговор</string>
<string name="topic">Тема</string>
<string name="joining_conference">Присъединяване в групов разговор…</string>

View File

@ -221,7 +221,6 @@
<string name="delete_bookmark">Elimina dels marcadors</string>
<string name="destroy_room">Destrueix el xat en grup</string>
<string name="destroy_channel">Destrueix el canal</string>
<string name="bookmark_already_exists">Aquest marcador ja existeix</string>
<string name="action_edit_subject">Edita el tema del xat de grup</string>
<string name="topic">Assumpte</string>
<string name="joining_conference">S\'està unint al xat de grup…</string>

View File

@ -191,7 +191,6 @@
<string name="join">Vstoupit</string>
<string name="save_as_bookmark">Uložit jako záložku</string>
<string name="delete_bookmark">Smazat záložku</string>
<string name="bookmark_already_exists">Tato záložka již existuje</string>
<string name="leave">Odejít</string>
<string name="contact_added_you">Kontakt přidán do seznamu</string>
<string name="add_back">Opět přidat</string>

View File

@ -236,7 +236,6 @@
<string name="destroy_channel_dialog">Bist du sicher, dass du diesen öffentlichen Channel löschen willst?\n\n<b>Achtung:</b> Der Channel wird dabei vollständig auf dem Server gelöscht.</string>
<string name="could_not_destroy_room">Gruppenchat konnte nicht gelöscht werden</string>
<string name="could_not_destroy_channel">Channel konnte nicht gelöscht werden</string>
<string name="bookmark_already_exists">Die Konferenz befindet sich bereits auf deiner Kontaktliste</string>
<string name="action_edit_subject">Gruppenchatthema bearbeiten</string>
<string name="topic">Thema</string>
<string name="joining_conference">Gruppenchat wird beigetreten…</string>
@ -557,6 +556,7 @@
<string name="pref_privacy">Privatsphäre</string>
<string name="pref_theme_options">Design</string>
<string name="pref_theme_options_summary">Wähle die Farbpalette aus</string>
<string name="pref_theme_automatic">Automatisch</string>
<string name="pref_theme_light">Helles Design</string>
<string name="pref_theme_dark">Dunkles Design</string>
<string name="unable_to_connect_to_keychain">Verbindung zu OpenKeychain nicht möglich</string>

View File

@ -234,7 +234,6 @@
<string name="destroy_channel_dialog">Είστε βέβαιοι ότι θέλετε να καταστρέψετε αυτό το δημόσιο κανάλι;\n\n<b>Προσοχή:</b>Το κανάλι θα διαγραφεί πλήρως από τον διακομιστή.</string>
<string name="could_not_destroy_room">Δεν ήταν δυνατή η καταστροφή της ομαδικής συζήτησης</string>
<string name="could_not_destroy_channel">Δεν ήταν δυνατή η καταστροφή του καναλιού</string>
<string name="bookmark_already_exists">Αυτός ο σελιδοδείκτης υπάρχει ήδη</string>
<string name="action_edit_subject">Επεξεργασία θέματος ομαδικής συζήτησης</string>
<string name="topic">Θέμα</string>
<string name="joining_conference">Συμμετοχή σε ομαδική συζήτηση...</string>

View File

@ -155,6 +155,7 @@
<string name="account_status_regis_conflict">El identificador ya está en uso</string>
<string name="account_status_regis_success">Registro completado</string>
<string name="account_status_regis_not_sup">El servidor no soporta registros</string>
<string name="account_status_regis_invalid_token">Token de registro inválido</string>
<string name="account_status_tls_error">Error de negociación TLS</string>
<string name="account_status_policy_violation">Policy violation</string>
<string name="account_status_incompatible_server">Servidor incompatible</string>
@ -235,7 +236,6 @@
<string name="destroy_channel_dialog">¿Estás seguro de que quieres destruir este canal público?\n\n<b>Aviso:</b>El canal será eliminado completamente en el servidor.</string>
<string name="could_not_destroy_room">No se ha podido destruir la conversación en grupo</string>
<string name="could_not_destroy_channel">No se ha podido destruir el canal</string>
<string name="bookmark_already_exists">Este marcador ya existe</string>
<string name="action_edit_subject">Editar asunto de la conversación</string>
<string name="topic">Asunto</string>
<string name="joining_conference">Uniéndose a conversación...</string>
@ -556,6 +556,7 @@
<string name="pref_privacy">Privacidad</string>
<string name="pref_theme_options">Tema</string>
<string name="pref_theme_options_summary">Selecciona el color de la paleta</string>
<string name="pref_theme_automatic">Automático</string>
<string name="pref_theme_light">Tema claro</string>
<string name="pref_theme_dark">Tema oscuro</string>
<string name="unable_to_connect_to_keychain">No se ha podido conectar a OpenKeychain</string>

View File

@ -234,7 +234,6 @@
<string name="destroy_channel_dialog">Kanal publiko hau deuseztatu nahi duzu?\n\n<b>Abisua:</b> Kanala zerbitzaritik guztiz kenduko da.</string>
<string name="could_not_destroy_room">Ezin izan da taldea deuseztatu</string>
<string name="could_not_destroy_channel">Ezin izan da kanala deuseztatu</string>
<string name="bookmark_already_exists">Laster-marka hau existitzen da dagoeneko</string>
<string name="action_edit_subject">Taldearen gaia editatu</string>
<string name="topic">Gaia</string>
<string name="joining_conference">Taldera batzen...</string>

View File

@ -235,7 +235,6 @@
<string name="destroy_channel_dialog">Êtes-vous sûr de vouloir détruire ce canal public? \ On \ <b>Avertissement:</b> le canal sera complètement supprimé du serveur.</string>
<string name="could_not_destroy_room">Impossible de détruire le chat en groupe</string>
<string name="could_not_destroy_channel">Impossible de détruire le canal</string>
<string name="bookmark_already_exists">Le favori existe déjà</string>
<string name="action_edit_subject">Modifier le sujet de la conversation de groupe</string>
<string name="topic">Sujet</string>
<string name="joining_conference">Rejoindre la conversation de groupe</string>
@ -842,7 +841,7 @@
<string name="anyone_can_invite_others">N\'importe qui peut inviter d\'autres personnes.</string>
<string name="jabber_ids_are_visible_to_admins">Les adresses XMPP sont visibles par les administrateurs.</string>
<string name="jabber_ids_are_visible_to_anyone">Les adresses XMPP sont visibles par tous.</string>
<string name="no_users_hint_channel">Ce canal publique n\'a pas de participants. Invitez vos contacts ou utilisez le bouton de partage pour distribuer son adresse XMPP.</string>
<string name="no_users_hint_channel">Ce canal public n\'a pas de participants. Invitez vos contacts ou utilisez le bouton de partage pour distribuer son adresse XMPP.</string>
<string name="no_users_hint_group_chat">Ce chat de groupe privé n\'a aucun participant.</string>
<string name="manage_permission">Gérer les privilèges</string>
<string name="search_participants">Rechercher des participants</string>

View File

@ -34,7 +34,7 @@
<string name="sending">enviando…</string>
<string name="message_decrypting">Descifrando a mensaxe. Por favor agarde...</string>
<string name="pgp_message">Mensaxe cifrado con OpenPGP</string>
<string name="nick_in_use">O apodo xa está en uso</string>
<string name="nick_in_use">O alcume xa está en uso</string>
<string name="invalid_muc_nick">Alcume non válido</string>
<string name="admin">Admin</string>
<string name="owner">Dono</string>
@ -93,7 +93,7 @@
<string name="send_omemo_message">Enviar mensaxe cifrada con OMEMO</string>
<string name="send_omemo_x509_message">Enviar mensaxe cifrada v\\OMEMO</string>
<string name="send_pgp_message">Enviar mensaxe cifrado con OpenPGP</string>
<string name="your_nick_has_been_changed">Modificouse o teu apodo</string>
<string name="your_nick_has_been_changed">Modificouse o teu alcume</string>
<string name="send_unencrypted">Enviar sen cifrar</string>
<string name="decryption_failed">Fallou o descifrado. Quizábeis non teñas a clave privada apropiada.</string>
<string name="openkeychain_required">OpenKeychain</string>
@ -236,7 +236,6 @@
<string name="destroy_channel_dialog">Está segura de que quere eliminar o canal?\n\n<b>Aviso:</b> O canal eliminarase completamente do servidor.</string>
<string name="could_not_destroy_room">Non se desfixo a conversa en grupo</string>
<string name="could_not_destroy_channel">Non se puido eliminar o canal</string>
<string name="bookmark_already_exists">Este marcador xa existe</string>
<string name="action_edit_subject">Editar o tema da conversa en grupo</string>
<string name="topic">Asunto</string>
<string name="joining_conference">Entrando na conversa en grupo</string>
@ -557,6 +556,7 @@
<string name="pref_privacy">Intimidade</string>
<string name="pref_theme_options">Decorado</string>
<string name="pref_theme_options_summary">Escolla a gama de cores</string>
<string name="pref_theme_automatic">Automático</string>
<string name="pref_theme_light">Decorado claro</string>
<string name="pref_theme_dark">Decorado escuro</string>
<string name="unable_to_connect_to_keychain">Non se puido conectar con OpenKeychain</string>

View File

@ -236,7 +236,6 @@
<string name="destroy_channel_dialog">Biztosan meg szeretné szüntetni ezt a nyilvános csatornát?\n\n<b>Figyelmeztetés:</b> A csatorna teljesen el lesz távolítva a kiszolgálóról.</string>
<string name="could_not_destroy_room">Nem sikerült megszüntetni a csoportos csevegést</string>
<string name="could_not_destroy_channel">Nem sikerült megszüntetni a csatornát</string>
<string name="bookmark_already_exists">A könyvjelző már létezik</string>
<string name="action_edit_subject">Csoportos csevegés tárgyának szerkesztése</string>
<string name="topic">Téma</string>
<string name="joining_conference">Csatlakozás csoportos csevegéshez…</string>

View File

@ -172,7 +172,6 @@
<string name="join">Gabung</string>
<string name="save_as_bookmark">Simpan sebagai bookmark</string>
<string name="delete_bookmark">Hapus bookmark</string>
<string name="bookmark_already_exists">Bookmark ini sudah ada</string>
<string name="leave">Tinggalkan</string>
<string name="contact_added_you">Kontak ditambahkan ke daftar anda</string>
<string name="add_back">Tambah kembali</string>

View File

@ -155,6 +155,7 @@
<string name="account_status_regis_conflict">Nome utente già in uso</string>
<string name="account_status_regis_success">Registrazione completata</string>
<string name="account_status_regis_not_sup">Il Server non supporta la registrazione</string>
<string name="account_status_regis_invalid_token">Token di registrazione non valido</string>
<string name="account_status_tls_error">Negoziazione TLS fallita</string>
<string name="account_status_policy_violation">Violazione della policy</string>
<string name="account_status_incompatible_server">Server non compatibile</string>
@ -235,7 +236,6 @@
<string name="destroy_channel_dialog">Sei sicuro di voler distruggere questo canale pubblico?\n\n<b>Attenzione:</b> il canale verrà completamente rimosso sul server.</string>
<string name="could_not_destroy_room">Distruzione della chat di gruppo fallita</string>
<string name="could_not_destroy_channel">Distruzione canale fallita</string>
<string name="bookmark_already_exists">Questo segnalibro esiste già</string>
<string name="action_edit_subject">Modifica titolo chat di gruppo</string>
<string name="topic">Argomento</string>
<string name="joining_conference">Ingresso nella chat di gruppo...</string>
@ -556,6 +556,7 @@
<string name="pref_privacy">Privacy</string>
<string name="pref_theme_options">Tema</string>
<string name="pref_theme_options_summary">Seleziona il colore</string>
<string name="pref_theme_automatic">Automatico</string>
<string name="pref_theme_light">Tema chiaro</string>
<string name="pref_theme_dark">Tema scuro</string>
<string name="unable_to_connect_to_keychain">Impossibile connettersi a OpenKeychain</string>
@ -877,4 +878,8 @@
<string name="pref_channel_discovery">Metodo di scoperta canali</string>
<string name="backup">Backup</string>
<string name="category_about">Al riguardo</string>
<plurals name="view_users">
<item quantity="one">Vedi %1$d partecipante</item>
<item quantity="other">Vedi %1$d partecipanti</item>
</plurals>
</resources>

View File

@ -164,7 +164,6 @@
<string name="join">הצטרף</string>
<string name="save_as_bookmark">שמור בתור סימנייה</string>
<string name="delete_bookmark">מחק סימנייה</string>
<string name="bookmark_already_exists">סימנייה זו כבר קיימת</string>
<string name="leave">עזוב</string>
<string name="contact_added_you">איש קשר הוסיף אותך אל רשימת קשר</string>
<string name="add_back">הוסף בחזרה</string>

View File

@ -226,7 +226,6 @@
<string name="destroy_room">グループチャットを破棄する</string>
<string name="destroy_room_dialog">このグループチャットを破棄してもよろしいですか?\n\n<b>警告:</b> グループチャットはサーバーから完全に削除されます。</string>
<string name="could_not_destroy_room">グループチャットを削除できません</string>
<string name="bookmark_already_exists">このブックマークはすでに存在します</string>
<string name="action_edit_subject">談話室の題を編集</string>
<string name="topic">トピック</string>
<string name="joining_conference">談話室に参加しています…</string>

View File

@ -192,7 +192,6 @@
<string name="join">참석 </string>
<string name="save_as_bookmark">즐겨찾기로 저장 </string>
<string name="delete_bookmark">즐겨찾기 삭제 </string>
<string name="bookmark_already_exists">즐겨찾기가 이미 존재합니다 </string>
<string name="leave">퇴장 </string>
<string name="contact_added_you">연락처가 당신을 연락처 목록에 추가했습니다 </string>
<string name="add_back">Add back</string>

View File

@ -204,7 +204,6 @@
<string name="join">Ta del i</string>
<string name="save_as_bookmark">Lagre som bokmerke</string>
<string name="delete_bookmark">Slett bokmerke</string>
<string name="bookmark_already_exists">Dette bokmerket finnes allerede</string>
<string name="action_edit_subject">Endre gruppesludringsemne</string>
<string name="joining_conference">Tar del i gruppesludring…</string>
<string name="leave">Forlat</string>

View File

@ -234,7 +234,6 @@
<string name="destroy_channel_dialog">Weet je zeker dat je dit openbare kanaal wilt vernietigen?\n\n<b>Waarschuwing:</b> Dit kanaal wordt volledig verwijderd van de server.</string>
<string name="could_not_destroy_room">Kan groepsgesprek niet vernietigen</string>
<string name="could_not_destroy_channel">Kan kanaal niet vernietigen</string>
<string name="bookmark_already_exists">Deze bladwijzer bestaat al</string>
<string name="action_edit_subject">Gespreksonderwerp bewerken</string>
<string name="topic">Onderwerp</string>
<string name="joining_conference">Deelnemen aan groepsgesprek…</string>

View File

@ -236,7 +236,6 @@
<string name="destroy_channel_dialog">Czy na pewno chcesz usunąć ten kanał publiczny?\n\n<b>Ostrzeżenie:</b> Ten kanał zostanie całkowicie usunięty z serwera.</string>
<string name="could_not_destroy_room">Usuwanie konferencji nieudane</string>
<string name="could_not_destroy_channel">Nie można usunąć kanału</string>
<string name="bookmark_already_exists">Zakładka już istnieje</string>
<string name="action_edit_subject">Edytuj tytuł konferencji</string>
<string name="topic">Temat</string>
<string name="joining_conference">Dołączanie do konferencji</string>
@ -560,6 +559,7 @@
<string name="pref_privacy">Prywatność</string>
<string name="pref_theme_options">Skórka</string>
<string name="pref_theme_options_summary">Wybierz paletę kolorów</string>
<string name="pref_theme_automatic">Automatycznie</string>
<string name="pref_theme_light">Jasna skórka</string>
<string name="pref_theme_dark">Ciemna skórka</string>
<string name="unable_to_connect_to_keychain">Nie można połączyć się z OpenKeychain</string>

View File

@ -236,7 +236,6 @@
<string name="destroy_channel_dialog">Tem certeza que deseja destruir esse canal público?\n\n<b>Atenção:</b> O canal será removido completamente do servidor.</string>
<string name="could_not_destroy_room">Não foi possível destruir a conversa em grupo</string>
<string name="could_not_destroy_channel">Não foi possível destruir o canal</string>
<string name="bookmark_already_exists">Esse favorito já existe</string>
<string name="action_edit_subject">Editar o assunto da conversa em grupo</string>
<string name="topic">Tópico</string>
<string name="joining_conference">Entrando na conversa em grupo...</string>

View File

@ -199,7 +199,6 @@
<string name="join">Juntar</string>
<string name="save_as_bookmark">Guardar como favorito</string>
<string name="delete_bookmark">Apagar favorito</string>
<string name="bookmark_already_exists">O favorito já existe</string>
<string name="action_edit_subject">Editar tema da conversa em grupo</string>
<string name="topic">Tópico</string>
<string name="leave">Sair</string>

View File

@ -27,7 +27,7 @@
<string name="title_activity_choose_contacts">Alegeți contactele</string>
<string name="title_activity_share_via_account">Partajează cu cont</string>
<string name="title_activity_block_list">Listă contacte blocate</string>
<string name="just_now">în acest moment</string>
<string name="just_now">acum</string>
<string name="minute_ago">acum un minut</string>
<string name="minutes_ago">acum %d minute</string>
<string name="x_unread_conversations">%d conversații necitite</string>
@ -86,7 +86,7 @@
<string name="delete_file_dialog">Șterge fișierul</string>
<string name="delete_file_dialog_msg">Sigur doriți să ștergeți acest fișier?\n\n<b>Atenție:</b> Această acțiune nu va șterge copiile acestui fișier care sunt stocate pe alte dispozitive sau servere.</string>
<string name="also_end_conversation">Închide conversația după ștergere</string>
<string name="choose_presence">Alegeți dispozitiv</string>
<string name="choose_presence">Alege dispozitiv</string>
<string name="send_unencrypted_message">Trimite mesaje necriptate</string>
<string name="send_message">Trimite mesaj</string>
<string name="send_message_to_x">Trimite mesaj către %s</string>
@ -135,7 +135,7 @@
<string name="send_presence_updates">Trimite actualizări de prezență</string>
<string name="receive_presence_updates">Primește actualizări de prezență</string>
<string name="ask_for_presence_updates">Cere actualizări de prezență</string>
<string name="attach_choose_picture">Alegeți o imagine</string>
<string name="attach_choose_picture">Alege o imagine</string>
<string name="attach_take_picture">Fă o poză</string>
<string name="preemptively_grant">Acorda anticipat cererea de abonare</string>
<string name="error_not_an_image_file">Fișierul selectat nu este o imagine</string>
@ -236,7 +236,6 @@
<string name="destroy_channel_dialog">Sigur doriți distrugerea acestui canal public?\n\n<b>Atenție:</b> Canalul public v-a fi complet șters de pe server.</string>
<string name="could_not_destroy_room">Nu s-a putut distruge discuția de grup</string>
<string name="could_not_destroy_channel">Nu s-a putut distruge canalul</string>
<string name="bookmark_already_exists">Acest semn de carte există deja</string>
<string name="action_edit_subject">Editează subiectul discuției de grup</string>
<string name="topic">Subiect discuție</string>
<string name="joining_conference">Vă alăturați discuției de grup...</string>
@ -323,7 +322,7 @@
<string name="restoring_backup">Se restaurează din copia de siguranță</string>
<string name="notification_restored_backup_title">Copia de siguranță a fost restaurată</string>
<string name="notification_restored_backup_subtitle">Nu uitați să activați contul.</string>
<string name="choose_file">Alegeți un fișier</string>
<string name="choose_file">Alege un fișier</string>
<string name="receiving_x_file">Primesc %1$s (%2$d%% complet)</string>
<string name="download_x_file">Descarcă %s</string>
<string name="delete_x_file">Șterge %s</string>
@ -560,6 +559,7 @@ sau chiar pierderea mesajelor.\nÎn continuare veți fi rugați să dezactivați
<string name="pref_privacy">Intimitate</string>
<string name="pref_theme_options">Temă</string>
<string name="pref_theme_options_summary">Selecție paletă culori interfață</string>
<string name="pref_theme_automatic">Automată</string>
<string name="pref_theme_light">Luminoasă</string>
<string name="pref_theme_dark">Întunecată</string>
<string name="unable_to_connect_to_keychain">Nu s-a putut contacta OpenKeychain</string>

View File

@ -221,7 +221,6 @@
<string name="delete_bookmark">Удалить закладку</string>
<string name="destroy_room">Уничтожить конференцию</string>
<string name="destroy_channel">Уничтожить канал</string>
<string name="bookmark_already_exists">Такая закладка уже существует</string>
<string name="action_edit_subject">Редактировать тему конференции</string>
<string name="topic">Тема</string>
<string name="joining_conference">Вход в конференцию…</string>

View File

@ -161,7 +161,6 @@
<string name="join">Vstúpiť</string>
<string name="save_as_bookmark">Uložiť ako záložku</string>
<string name="delete_bookmark">Vymazať záložku</string>
<string name="bookmark_already_exists">Táto záložka už existuje</string>
<string name="leave">Odísť</string>
<string name="contact_added_you">Kontakt pridaný do zoznamu</string>
<string name="add_back">Znova pridať</string>

View File

@ -208,7 +208,6 @@
<string name="join">Придружи се</string>
<string name="save_as_bookmark">Сачувај као обележивач</string>
<string name="delete_bookmark">Обриши обележивач</string>
<string name="bookmark_already_exists">Овај обележивач већ постоји</string>
<string name="action_edit_subject">Уреди предмет групног ћаскања</string>
<string name="topic">Тема</string>
<string name="joining_conference">Улазим у групно ћаскање…</string>

View File

@ -221,7 +221,6 @@
<string name="join">Gå med</string>
<string name="save_as_bookmark">Spara som bokmärke</string>
<string name="delete_bookmark">Ta bort bokmärke</string>
<string name="bookmark_already_exists">Detta bokmärke finns redan</string>
<string name="topic">Ämne</string>
<string name="joining_conference">Går med i gruppchatt...</string>
<string name="leave">Lämna</string>

View File

@ -192,7 +192,6 @@
<string name="join">Katıl</string>
<string name="save_as_bookmark">Yer imi olarak kaydet</string>
<string name="delete_bookmark">Yer imini sil</string>
<string name="bookmark_already_exists">Bu yer imi zaten mevcut</string>
<string name="leave">Ayrıl</string>
<string name="contact_added_you">Kişi sizi listesine ekledi</string>
<string name="add_back">Siz de ekleyin</string>

View File

@ -232,7 +232,6 @@
<string name="destroy_channel_dialog">Упевнені, що бажаєте знищити цей публічний канал?\n\n<b>Увага:</b> Канал буде повністю знищено та видалено з сервера.</string>
<string name="could_not_destroy_room">Видалити цей груповий чат не вдалось</string>
<string name="could_not_destroy_channel">Не вдалося знищити канал</string>
<string name="bookmark_already_exists">Ця закладка вже існує</string>
<string name="action_edit_subject">Редагувати тему групи</string>
<string name="topic">Тема</string>
<string name="joining_conference">Приєднання до групи…</string>

View File

@ -192,7 +192,6 @@
<string name="join">Tham gia</string>
<string name="save_as_bookmark">Lưu thành đánh dấu</string>
<string name="delete_bookmark">Xoá đánh dấu</string>
<string name="bookmark_already_exists">Đã có đánh dấu này rồi</string>
<string name="leave">Rời khỏi</string>
<string name="contact_added_you">Liên hệ đã thêm bạn vào danh bạ</string>
<string name="add_back">Thêm họ vào</string>

View File

@ -119,6 +119,7 @@
<string name="pref_sound">铃声</string>
<string name="pref_sound_summary">收到新消息时响铃</string>
<string name="pref_notification_grace_period">静默期限</string>
<string name="pref_notification_grace_period_summary">在您的其他设备之一上检测到活动之后,时间通知的长度将被静音。</string>
<string name="pref_advanced_options">高级</string>
<string name="pref_never_send_crash">从不发送崩溃报告</string>
<string name="pref_never_send_crash_summary">通过发送堆栈跟踪您可以帮助Conversations持续发展</string>
@ -154,6 +155,7 @@
<string name="account_status_regis_conflict"> 用户名已存在</string>
<string name="account_status_regis_success">注册完成</string>
<string name="account_status_regis_not_sup">服务器不支持注册</string>
<string name="account_status_regis_invalid_token">无效的注册令牌</string>
<string name="account_status_tls_error">TLS 协商失败</string>
<string name="account_status_policy_violation">违反政策</string>
<string name="account_status_incompatible_server">服务器不兼容</string>
@ -234,7 +236,6 @@
<string name="destroy_channel_dialog">您确定要解散此公共频道吗?\n\n<b>警告:</b>该频道将在服务器上完全删除。</string>
<string name="could_not_destroy_room">无法解散群聊</string>
<string name="could_not_destroy_channel">无法解散频道</string>
<string name="bookmark_already_exists">该书签已存在</string>
<string name="action_edit_subject">编辑群聊主题</string>
<string name="topic">主题</string>
<string name="joining_conference">正在加入群聊…</string>
@ -332,6 +333,7 @@
<string name="x_file_offered_for_download">可以下载 %s</string>
<string name="cancel_transmission">取消传输</string>
<string name="file_transmission_failed">文件传输失败</string>
<string name="file_transmission_cancelled">文件传输已取消</string>
<string name="file_deleted">文件已经删除</string>
<string name="no_application_found_to_open_file">没有可以打开此文件的应用</string>
<string name="no_application_found_to_open_link">没有可以打开此链接的应用</string>
@ -504,6 +506,7 @@
<string name="notify_never">禁用通知</string>
<string name="notify_paused">暂停通知</string>
<string name="pref_picture_compression">图像压缩</string>
<string name="pref_picture_compression_summary">提示:使用“选择文件”而不是“选择图片”来发送未经压缩的单个图像,无论此设置如何。</string>
<string name="always">总是</string>
<string name="battery_optimizations_enabled">启用节电模式</string>
<string name="battery_optimizations_enabled_explained">你的设备正在为Conversations进行电池优化这可能导致通知的延迟甚至消息的丢失。
@ -857,4 +860,6 @@
<string name="please_enter_password">请输入此账户的密码</string>
<string name="unable_to_perform_this_action">无法执行此操作</string>
<string name="open_join_dialog">加入公开群聊</string>
<string name="backup">备份</string>
<string name="category_about">关于</string>
</resources>

View File

@ -196,7 +196,6 @@
<string name="join">加入</string>
<string name="save_as_bookmark">保存為書簽</string>
<string name="delete_bookmark">刪除書簽</string>
<string name="bookmark_already_exists">該書簽已存在</string>
<string name="leave">離開</string>
<string name="contact_added_you">連絡人已添加你到連絡人列表</string>
<string name="add_back">反向添加</string>

View File

@ -236,7 +236,6 @@
<string name="destroy_channel_dialog">Are you sure you want to destroy this public channel?\n\n<b>Warning:</b> The channel will be completely removed on the server.</string>
<string name="could_not_destroy_room">Could not destroy group chat</string>
<string name="could_not_destroy_channel">Could not destroy channel</string>
<string name="bookmark_already_exists">This bookmark already exists</string>
<string name="action_edit_subject">Edit group chat subject</string>
<string name="topic">Topic</string>
<string name="joining_conference">Joining group chat…</string>
@ -293,6 +292,7 @@
<string name="conference_shutdown">The group chat was shut down</string>
<string name="conference_unknown_error">You are no longer in this group chat</string>
<string name="using_account">using account %s</string>
<string name="hosted_on">hosted on %s</string>
<string name="checking_x">Checking %s on HTTP host</string>
<string name="not_connected_try_again">You are not connected. Try again later</string>
<string name="check_x_filesize">Check %s size</string>

View File

@ -10,12 +10,12 @@
<activity
android:name=".ui.EnterPhoneNumberActivity"
android:label="@string/verify_your_phone_number"
android:launchMode="singleTask" />
android:launchMode="singleTop" />
<activity
android:name=".ui.ChooseCountryActivity"
android:label="@string/choose_a_country"
android:launchMode="singleTask" />
android:launchMode="singleTop" />
<activity
android:name=".ui.VerifyActivity"

View File

@ -170,7 +170,7 @@ public class EnterPhoneNumberActivity extends XmppActivity implements QuickConve
}
private void onSelectCountryClick(View view) {
Intent intent = new Intent(this, ChooseCountryActivity.class);
final Intent intent = new Intent(this, ChooseCountryActivity.class);
startActivityForResult(intent, REQUEST_CHOOSE_COUNTRY);
}
@ -194,7 +194,7 @@ public class EnterPhoneNumberActivity extends XmppActivity implements QuickConve
public void onActivityResult(int requestCode, int resultCode, final Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK && requestCode == REQUEST_CHOOSE_COUNTRY) {
String region = data.getStringExtra("region");
final String region = data.getStringExtra("region");
if (region != null) {
this.region = region;
final int countryCode = PhoneNumberUtilWrapper.getInstance(this).getCountryCodeForRegion(region);

View File

@ -6,7 +6,9 @@
android:layout_height="match_parent"
android:orientation="vertical">
<include android:id="@+id/toolbar" layout="@layout/toolbar" />
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<ScrollView
android:layout_width="match_parent"
@ -21,10 +23,10 @@
android:id="@+id/instructions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
android:gravity="center_horizontal"
android:textAppearance="@style/TextAppearance.Conversations.Body1"
android:text="@string/enter_your_name_instructions"/>
android:padding="16dp"
android:text="@string/enter_your_name_instructions"
android:textAppearance="@style/TextAppearance.Conversations.Body1" />
<LinearLayout
android:id="@+id/name_box"
@ -36,24 +38,26 @@
android:orientation="vertical">
<EditText
android:imeOptions="flagNoExtractUi"
android:id="@+id/name"
style="@style/Widget.Conversations.EditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/your_name"
android:imeOptions="flagNoExtractUi"
android:longClickable="false" />
</LinearLayout>
<Button
android:id="@+id/next"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
style="@style/Widget.Conversations.Button.Borderless"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:text="@string/next"
android:textColor="?colorAccent"/>
android:textColor="?colorAccent" />
</RelativeLayout>
</ScrollView>
</LinearLayout>

View File

@ -6,7 +6,10 @@
android:layout_height="match_parent"
android:orientation="vertical">
<include android:id="@+id/toolbar" layout="@layout/toolbar" />
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<android.support.design.widget.CoordinatorLayout
android:id="@+id/coordinator"
android:layout_width="match_parent"
@ -25,10 +28,10 @@
android:id="@+id/instructions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
android:gravity="center_horizontal"
android:textAppearance="@style/TextAppearance.Conversations.Body1"
android:text="@string/enter_country_code_and_phone_number"/>
android:padding="16dp"
android:text="@string/enter_country_code_and_phone_number"
android:textAppearance="@style/TextAppearance.Conversations.Body1" />
<LinearLayout
android:id="@+id/phone_number_box"
@ -40,17 +43,17 @@
android:orientation="vertical">
<EditText
android:imeOptions="flagNoExtractUi"
android:id="@+id/country"
style="@style/Widget.Conversations.EditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:cursorVisible="false"
android:inputType="textNoSuggestions"
android:drawableEnd="@drawable/ic_arrow_drop_down_black_18dp"
android:drawableRight="@drawable/ic_arrow_drop_down_black_18dp"
android:focusable="false"
android:gravity="bottom|center_horizontal"
android:imeOptions="flagNoExtractUi"
android:inputType="textNoSuggestions"
android:longClickable="false" />
<LinearLayout
@ -59,28 +62,28 @@
android:orientation="horizontal">
<EditText
android:imeOptions="flagNoExtractUi"
android:id="@+id/country_code"
style="@style/Widget.Conversations.EditText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="bottom|center_horizontal"
android:imeOptions="flagNoExtractUi"
android:inputType="number"
android:longClickable="false"
android:maxLength="3"
android:maxLines="1" />
<EditText
android:imeOptions="flagNoExtractUi"
android:id="@+id/number"
style="@style/Widget.Conversations.EditText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:hint="@string/phone_number"
android:inputType="number"
android:gravity="bottom|start"
android:hint="@string/phone_number"
android:imeOptions="flagNoExtractUi"
android:inputType="number"
android:longClickable="false"
android:maxLines="1" />
</LinearLayout>
@ -92,15 +95,17 @@
android:layout_height="wrap_content"
android:layout_gravity="center" />
</LinearLayout>
<Button
android:id="@+id/next"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
style="@style/Widget.Conversations.Button.Borderless"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:text="@string/next"
android:textColor="?colorAccent"/>
android:textColor="?colorAccent" />
</RelativeLayout>
</ScrollView>
</android.support.design.widget.CoordinatorLayout>

View File

@ -154,8 +154,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:text="@string/next"/>
android:text="@string/next" />
<Button
android:id="@+id/back"
@ -163,6 +164,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:text="@string/back"
android:textColor="?android:textColorSecondary" />
@ -182,8 +184,8 @@
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_below="@+id/pin_box" />
android:layout_below="@+id/pin_box"
android:layout_centerHorizontal="true" />
</RelativeLayout>
</ScrollView>
</android.support.design.widget.CoordinatorLayout>

View File

@ -1,25 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:background="?android:selectableItemBackground">
android:background="?android:selectableItemBackground"
android:padding="16dp">
<TextView
android:id="@+id/country"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:textAppearance="@style/TextAppearance.Conversations.Subhead.Bold"
android:text="Germany"/>
android:text="Germany"
android:textAppearance="@style/TextAppearance.Conversations.Subhead.Bold" />
<TextView
android:id="@+id/country_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:textAppearance="@style/TextAppearance.Conversations.Subhead.Bold.Secondary"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:text="+49"/>
android:text="+49"
android:textAppearance="@style/TextAppearance.Conversations.Subhead.Bold.Secondary" />
</RelativeLayout>
</layout>