mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Add RTL support to remaining layouts
This commit is contained in:
@@ -65,7 +65,7 @@ public class TestDataActivity extends BriarActivity {
|
||||
@Override
|
||||
public void onProgressChanged(SeekBar seekBar,
|
||||
int progress, boolean fromUser) {
|
||||
contactsTextView.setText(String.valueOf(progress + 1));
|
||||
contactsTextView.setText(String.valueOf(progress));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -151,7 +151,7 @@ public class TestDataActivity extends BriarActivity {
|
||||
}
|
||||
|
||||
private void createTestData() {
|
||||
testDataCreator.createTestData(contactsSeekBar.getProgress() + 1,
|
||||
testDataCreator.createTestData(contactsSeekBar.getProgress(),
|
||||
messagesSeekBar.getProgress(), blogPostsSeekBar.getProgress(),
|
||||
forumsSeekBar.getProgress(), forumPostsSeekBar.getProgress());
|
||||
Intent intent = new Intent(this, NavDrawerActivity.class);
|
||||
|
||||
@@ -19,8 +19,7 @@ public class QrCodeView extends FrameLayout {
|
||||
private boolean fullscreen = false;
|
||||
private FullscreenListener listener;
|
||||
|
||||
public QrCodeView(@NonNull Context context,
|
||||
@Nullable AttributeSet attrs) {
|
||||
public QrCodeView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
LayoutInflater inflater = (LayoutInflater) context
|
||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
|
||||
@@ -3,7 +3,6 @@ package org.briarproject.briar.android.view;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.annotation.UiThread;
|
||||
import android.support.v7.widget.AppCompatTextView;
|
||||
import android.util.AttributeSet;
|
||||
@@ -11,13 +10,11 @@ import android.view.LayoutInflater;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.briarproject.bramble.api.identity.Author;
|
||||
import org.briarproject.briar.R;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import de.hdodenhof.circleimageview.CircleImageView;
|
||||
import im.delight.android.identicons.IdenticonDrawable;
|
||||
|
||||
@UiThread
|
||||
public class TextAvatarView extends FrameLayout {
|
||||
@@ -35,7 +32,6 @@ public class TextAvatarView extends FrameLayout {
|
||||
character = findViewById(R.id.textAvatarView);
|
||||
background = findViewById(R.id.avatarBackground);
|
||||
badge = findViewById(R.id.unreadCountView);
|
||||
badge.setVisibility(INVISIBLE);
|
||||
}
|
||||
|
||||
public TextAvatarView(Context context) {
|
||||
@@ -72,10 +68,4 @@ public class TextAvatarView extends FrameLayout {
|
||||
}
|
||||
}
|
||||
|
||||
public void setAuthorAvatar(Author author) {
|
||||
Drawable drawable = new IdenticonDrawable(author.getId().getBytes());
|
||||
background.setImageDrawable(drawable);
|
||||
character.setVisibility(GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class UnreadMessageButton extends FrameLayout {
|
||||
setDirection(direction);
|
||||
attributes.recycle();
|
||||
|
||||
setUnreadCount(0);
|
||||
if (!isInEditMode()) setUnreadCount(0);
|
||||
}
|
||||
|
||||
private void setDirection(int direction) {
|
||||
@@ -64,11 +64,11 @@ public class UnreadMessageButton extends FrameLayout {
|
||||
|
||||
public void setUnreadCount(int count) {
|
||||
if (count == 0) {
|
||||
setVisibility(INVISIBLE);
|
||||
fab.hide();
|
||||
unread.setVisibility(INVISIBLE);
|
||||
} else {
|
||||
// FIXME: Use animations when upgrading to support library 24.2.0
|
||||
// https://code.google.com/p/android/issues/detail?id=216469
|
||||
setVisibility(VISIBLE);
|
||||
fab.show();
|
||||
unread.setVisibility(VISIBLE);
|
||||
unread.setText(String.valueOf(count));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user