mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Use 5 pixels of padding around icons.
This commit is contained in:
@@ -54,6 +54,7 @@ class BlogAdapter extends ArrayAdapter<GroupMessageHeader> {
|
||||
authorLayout.setGravity(CENTER_VERTICAL);
|
||||
|
||||
ImageView thumb = new ImageView(ctx);
|
||||
thumb.setPadding(5, 5, 5, 5);
|
||||
Rating rating = item.getRating();
|
||||
if(rating == GOOD) thumb.setImageResource(R.drawable.rating_good);
|
||||
else if(rating == BAD) thumb.setImageResource(R.drawable.rating_bad);
|
||||
@@ -65,7 +66,7 @@ class BlogAdapter extends ArrayAdapter<GroupMessageHeader> {
|
||||
name.setLayoutParams(WRAP_WRAP_1);
|
||||
name.setTextSize(18);
|
||||
name.setMaxLines(1);
|
||||
name.setPadding(10, 10, 10, 10);
|
||||
name.setPadding(0, 10, 10, 10);
|
||||
Author author = item.getAuthor();
|
||||
if(author == null) {
|
||||
name.setTextColor(res.getColor(R.color.anonymous_author));
|
||||
@@ -89,6 +90,7 @@ class BlogAdapter extends ArrayAdapter<GroupMessageHeader> {
|
||||
LinearLayout attachmentLayout = new LinearLayout(ctx);
|
||||
attachmentLayout.setOrientation(HORIZONTAL);
|
||||
ImageView attachment = new ImageView(ctx);
|
||||
attachment.setPadding(5, 0, 5, 5);
|
||||
attachment.setImageResource(R.drawable.content_attachment);
|
||||
attachmentLayout.addView(attachment);
|
||||
attachmentLayout.addView(new HorizontalSpace(ctx));
|
||||
|
||||
@@ -78,6 +78,7 @@ implements OnItemClickListener {
|
||||
LinearLayout attachmentLayout = new LinearLayout(ctx);
|
||||
attachmentLayout.setOrientation(HORIZONTAL);
|
||||
ImageView attachment = new ImageView(ctx);
|
||||
attachment.setPadding(5, 0, 5, 5);
|
||||
attachment.setImageResource(R.drawable.content_attachment);
|
||||
attachmentLayout.addView(attachment);
|
||||
attachmentLayout.addView(new HorizontalSpace(ctx));
|
||||
|
||||
@@ -123,6 +123,7 @@ implements OnClickListener {
|
||||
header.setGravity(CENTER_VERTICAL);
|
||||
|
||||
thumb = new ImageView(this);
|
||||
thumb.setPadding(5, 5, 5, 5);
|
||||
if(rating == GOOD) thumb.setImageResource(R.drawable.rating_good);
|
||||
else if(rating == BAD) thumb.setImageResource(R.drawable.rating_bad);
|
||||
else thumb.setImageResource(R.drawable.rating_unrated);
|
||||
@@ -133,7 +134,7 @@ implements OnClickListener {
|
||||
name.setLayoutParams(WRAP_WRAP_1);
|
||||
name.setTextSize(18);
|
||||
name.setMaxLines(1);
|
||||
name.setPadding(10, 10, 10, 10);
|
||||
name.setPadding(0, 10, 10, 10);
|
||||
if(authorName == null) {
|
||||
name.setTextColor(res.getColor(R.color.anonymous_author));
|
||||
name.setText(R.string.anonymous);
|
||||
|
||||
@@ -37,6 +37,7 @@ implements OnItemClickListener {
|
||||
layout.setGravity(CENTER_VERTICAL);
|
||||
|
||||
ImageView bulb = new ImageView(ctx);
|
||||
bulb.setPadding(5, 5, 5, 5);
|
||||
if(item.isConnected())
|
||||
bulb.setImageResource(R.drawable.contact_connected);
|
||||
else bulb.setImageResource(R.drawable.contact_disconnected);
|
||||
@@ -47,7 +48,7 @@ implements OnItemClickListener {
|
||||
name.setLayoutParams(WRAP_WRAP_1);
|
||||
name.setTextSize(18);
|
||||
name.setMaxLines(1);
|
||||
name.setPadding(10, 10, 10, 10);
|
||||
name.setPadding(0, 10, 10, 10);
|
||||
name.setText(item.getContactName());
|
||||
layout.addView(name);
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ class GroupAdapter extends ArrayAdapter<GroupMessageHeader> {
|
||||
authorLayout.setGravity(CENTER_VERTICAL);
|
||||
|
||||
ImageView thumb = new ImageView(ctx);
|
||||
thumb.setPadding(5, 5, 5, 5);
|
||||
Rating rating = item.getRating();
|
||||
if(rating == GOOD) thumb.setImageResource(R.drawable.rating_good);
|
||||
else if(rating == BAD) thumb.setImageResource(R.drawable.rating_bad);
|
||||
@@ -65,7 +66,7 @@ class GroupAdapter extends ArrayAdapter<GroupMessageHeader> {
|
||||
name.setLayoutParams(WRAP_WRAP_1);
|
||||
name.setTextSize(18);
|
||||
name.setMaxLines(1);
|
||||
name.setPadding(10, 10, 10, 10);
|
||||
name.setPadding(0, 10, 10, 10);
|
||||
Author author = item.getAuthor();
|
||||
if(author == null) {
|
||||
name.setTextColor(res.getColor(R.color.anonymous_author));
|
||||
@@ -89,6 +90,7 @@ class GroupAdapter extends ArrayAdapter<GroupMessageHeader> {
|
||||
LinearLayout attachmentLayout = new LinearLayout(ctx);
|
||||
attachmentLayout.setOrientation(HORIZONTAL);
|
||||
ImageView attachment = new ImageView(ctx);
|
||||
attachment.setPadding(5, 0, 5, 5);
|
||||
attachment.setImageResource(R.drawable.content_attachment);
|
||||
attachmentLayout.addView(attachment);
|
||||
attachmentLayout.addView(new HorizontalSpace(ctx));
|
||||
|
||||
@@ -78,6 +78,7 @@ implements OnItemClickListener {
|
||||
LinearLayout attachmentLayout = new LinearLayout(ctx);
|
||||
attachmentLayout.setOrientation(HORIZONTAL);
|
||||
ImageView attachment = new ImageView(ctx);
|
||||
attachment.setPadding(5, 0, 5, 5);
|
||||
attachment.setImageResource(R.drawable.content_attachment);
|
||||
attachmentLayout.addView(attachment);
|
||||
attachmentLayout.addView(new HorizontalSpace(ctx));
|
||||
|
||||
@@ -130,6 +130,7 @@ implements OnClickListener {
|
||||
header.setGravity(CENTER_VERTICAL);
|
||||
|
||||
thumb = new ImageView(this);
|
||||
thumb.setPadding(5, 5, 5, 5);
|
||||
if(rating == GOOD) thumb.setImageResource(R.drawable.rating_good);
|
||||
else if(rating == BAD) thumb.setImageResource(R.drawable.rating_bad);
|
||||
else thumb.setImageResource(R.drawable.rating_unrated);
|
||||
@@ -140,7 +141,7 @@ implements OnClickListener {
|
||||
name.setLayoutParams(WRAP_WRAP_1);
|
||||
name.setTextSize(18);
|
||||
name.setMaxLines(1);
|
||||
name.setPadding(10, 10, 10, 10);
|
||||
name.setPadding(0, 10, 10, 10);
|
||||
if(authorName == null) {
|
||||
name.setTextColor(res.getColor(R.color.anonymous_author));
|
||||
name.setText(R.string.anonymous);
|
||||
|
||||
@@ -41,6 +41,7 @@ public class BluetoothWidget extends LinearLayout implements OnClickListener {
|
||||
if(adapter == null) {
|
||||
listener.bluetoothStateChanged(false);
|
||||
ImageView warning = new ImageView(ctx);
|
||||
warning.setPadding(5, 5, 5, 5);
|
||||
warning.setImageResource(R.drawable.alerts_and_states_warning);
|
||||
addView(warning);
|
||||
status.setText(R.string.bluetooth_not_available);
|
||||
@@ -48,6 +49,7 @@ public class BluetoothWidget extends LinearLayout implements OnClickListener {
|
||||
} else if(adapter.getScanMode() == SCAN_MODE_CONNECTABLE_DISCOVERABLE) {
|
||||
listener.bluetoothStateChanged(true);
|
||||
ImageView ok = new ImageView(ctx);
|
||||
ok.setPadding(5, 5, 5, 5);
|
||||
ok.setImageResource(R.drawable.navigation_accept);
|
||||
addView(ok);
|
||||
status.setText(R.string.bluetooth_enabled);
|
||||
@@ -59,6 +61,7 @@ public class BluetoothWidget extends LinearLayout implements OnClickListener {
|
||||
} else if(adapter.isEnabled()) {
|
||||
listener.bluetoothStateChanged(true);
|
||||
ImageView warning = new ImageView(ctx);
|
||||
warning.setPadding(5, 5, 5, 5);
|
||||
warning.setImageResource(R.drawable.alerts_and_states_warning);
|
||||
addView(warning);
|
||||
status.setText(R.string.bluetooth_not_discoverable);
|
||||
@@ -70,6 +73,7 @@ public class BluetoothWidget extends LinearLayout implements OnClickListener {
|
||||
} else {
|
||||
listener.bluetoothStateChanged(false);
|
||||
ImageView warning = new ImageView(ctx);
|
||||
warning.setPadding(5, 5, 5, 5);
|
||||
warning.setImageResource(R.drawable.alerts_and_states_warning);
|
||||
addView(warning);
|
||||
status.setText(R.string.bluetooth_disabled);
|
||||
|
||||
@@ -42,6 +42,7 @@ public class WifiWidget extends LinearLayout implements OnClickListener {
|
||||
if(wifi == null) {
|
||||
wifiStateChanged(null);
|
||||
ImageView warning = new ImageView(ctx);
|
||||
warning.setPadding(5, 5, 5, 5);
|
||||
warning.setImageResource(R.drawable.alerts_and_states_warning);
|
||||
addView(warning);
|
||||
status.setText(R.string.wifi_not_available);
|
||||
@@ -53,6 +54,7 @@ public class WifiWidget extends LinearLayout implements OnClickListener {
|
||||
if(networkName == null || networkId == -1) {
|
||||
wifiStateChanged(null);
|
||||
ImageView warning = new ImageView(ctx);
|
||||
warning.setPadding(5, 5, 5, 5);
|
||||
warning.setImageResource(R.drawable.alerts_and_states_warning);
|
||||
addView(warning);
|
||||
status.setText(R.string.wifi_disconnected);
|
||||
@@ -64,6 +66,7 @@ public class WifiWidget extends LinearLayout implements OnClickListener {
|
||||
} else {
|
||||
wifiStateChanged(networkName);
|
||||
ImageView ok = new ImageView(ctx);
|
||||
ok.setPadding(5, 5, 5, 5);
|
||||
ok.setImageResource(R.drawable.navigation_accept);
|
||||
addView(ok);
|
||||
String format = getResources().getString(
|
||||
@@ -78,6 +81,7 @@ public class WifiWidget extends LinearLayout implements OnClickListener {
|
||||
} else {
|
||||
wifiStateChanged(null);
|
||||
ImageView warning = new ImageView(ctx);
|
||||
warning.setPadding(5, 5, 5, 5);
|
||||
warning.setImageResource(R.drawable.alerts_and_states_warning);
|
||||
addView(warning);
|
||||
status.setText(R.string.wifi_disabled);
|
||||
|
||||
@@ -54,6 +54,7 @@ class ConversationAdapter extends ArrayAdapter<PrivateMessageHeader> {
|
||||
authorLayout.setGravity(CENTER_VERTICAL);
|
||||
|
||||
ImageView thumb = new ImageView(ctx);
|
||||
thumb.setPadding(5, 5, 5, 5);
|
||||
Rating rating = item.getRating();
|
||||
if(rating == GOOD) thumb.setImageResource(R.drawable.rating_good);
|
||||
else if(rating == BAD) thumb.setImageResource(R.drawable.rating_bad);
|
||||
@@ -65,7 +66,7 @@ class ConversationAdapter extends ArrayAdapter<PrivateMessageHeader> {
|
||||
name.setLayoutParams(WRAP_WRAP_1);
|
||||
name.setTextSize(18);
|
||||
name.setMaxLines(1);
|
||||
name.setPadding(10, 10, 10, 10);
|
||||
name.setPadding(0, 10, 10, 10);
|
||||
name.setText(item.getAuthor().getName());
|
||||
authorLayout.addView(name);
|
||||
innerLayout.addView(authorLayout);
|
||||
@@ -83,6 +84,7 @@ class ConversationAdapter extends ArrayAdapter<PrivateMessageHeader> {
|
||||
LinearLayout attachmentLayout = new LinearLayout(ctx);
|
||||
attachmentLayout.setOrientation(HORIZONTAL);
|
||||
ImageView attachment = new ImageView(ctx);
|
||||
attachment.setPadding(5, 0, 5, 5);
|
||||
attachment.setImageResource(R.drawable.content_attachment);
|
||||
attachmentLayout.addView(attachment);
|
||||
attachmentLayout.addView(new HorizontalSpace(ctx));
|
||||
|
||||
@@ -122,6 +122,7 @@ implements OnClickListener {
|
||||
header.setGravity(CENTER_VERTICAL);
|
||||
|
||||
ImageView thumb = new ImageView(this);
|
||||
thumb.setPadding(5, 5, 5, 5);
|
||||
if(rating == GOOD) thumb.setImageResource(R.drawable.rating_good);
|
||||
else if(rating == BAD) thumb.setImageResource(R.drawable.rating_bad);
|
||||
else thumb.setImageResource(R.drawable.rating_unrated);
|
||||
@@ -132,7 +133,7 @@ implements OnClickListener {
|
||||
name.setLayoutParams(WRAP_WRAP_1);
|
||||
name.setTextSize(18);
|
||||
name.setMaxLines(1);
|
||||
name.setPadding(10, 10, 10, 10);
|
||||
name.setPadding(0, 10, 10, 10);
|
||||
name.setText(authorName);
|
||||
header.addView(name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user