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