Skip to content
Snippets Groups Projects
Commit a8011386 authored by Aline Bonnet's avatar Aline Bonnet
Browse files

drawable: convert png to xml files

For black or white icons, this commit converts png to xml files (created from
svg pictures). With a xml files, it is not necessary to have a file for each
size or resolution.

Change-Id: I51f5a4499f0c7640369ddc5aa6b88ac019920ffa
Tuleap: #1165
parent 5da0fbb5
Branches
Tags
No related merge requests found
Showing
with 13 additions and 13 deletions
...@@ -213,9 +213,9 @@ public class ConversationAdapter extends RecyclerView.Adapter<ConversationViewHo ...@@ -213,9 +213,9 @@ public class ConversationAdapter extends RecyclerView.Adapter<ConversationViewHo
convViewHolder.mPhoto.setScaleY(1); convViewHolder.mPhoto.setScaleY(1);
if (convElement.call.isMissed()) { if (convElement.call.isMissed()) {
if (convElement.call.isIncoming()) { if (convElement.call.isIncoming()) {
pictureResID = R.drawable.ic_call_missed_black_24dp; pictureResID = R.drawable.ic_call_missed_black;
} else { } else {
pictureResID = R.drawable.ic_call_missed_outgoing_black_24dp; pictureResID = R.drawable.ic_call_missed_outgoing_black;
// Flip the photo upside down to show a "missed outgoing call" // Flip the photo upside down to show a "missed outgoing call"
convViewHolder.mPhoto.setScaleY(-1); convViewHolder.mPhoto.setScaleY(-1);
} }
...@@ -224,8 +224,8 @@ public class ConversationAdapter extends RecyclerView.Adapter<ConversationViewHo ...@@ -224,8 +224,8 @@ public class ConversationAdapter extends RecyclerView.Adapter<ConversationViewHo
mContext.getString(R.string.notif_missed_outgoing_call, callNumber); mContext.getString(R.string.notif_missed_outgoing_call, callNumber);
} else { } else {
pictureResID = (convElement.call.isIncoming()) ? pictureResID = (convElement.call.isIncoming()) ?
R.drawable.ic_call_received_black_24dp : R.drawable.ic_call_received_black :
R.drawable.ic_call_made_black_24dp; R.drawable.ic_call_made_black;
histTxt = convElement.call.isIncoming() ? histTxt = convElement.call.isIncoming() ?
mContext.getString(R.string.notif_incoming_call_title, callNumber) : mContext.getString(R.string.notif_incoming_call_title, callNumber) :
mContext.getString(R.string.notif_outgoing_call_title, callNumber); mContext.getString(R.string.notif_outgoing_call_title, callNumber);
......
...@@ -85,7 +85,7 @@ public class NumberAdapter extends BaseAdapter { ...@@ -85,7 +85,7 @@ public class NumberAdapter extends BaseAdapter {
CallContact.Phone number = mNumbers.get(position); CallContact.Phone number = mNumbers.get(position);
ImageView numberIcon = (ImageView) convertView.findViewById(R.id.number_icon); ImageView numberIcon = (ImageView) convertView.findViewById(R.id.number_icon);
numberIcon.setImageResource(number.getNumber().isRingId() ? numberIcon.setImageResource(number.getNumber().isRingId() ?
R.drawable.ring_logo_24dp : R.drawable.ic_dialer_sip_black_24dp); R.drawable.ring_logo_24dp : R.drawable.ic_dialer_sip_black);
if (longView) { if (longView) {
TextView numberTxt = (TextView) convertView.findViewById(R.id.number_txt); TextView numberTxt = (TextView) convertView.findViewById(R.id.number_txt);
......
...@@ -314,7 +314,7 @@ public class HomeActivity extends AppCompatActivity implements LocalService.Call ...@@ -314,7 +314,7 @@ public class HomeActivity extends AppCompatActivity implements LocalService.Call
AlertDialog.Builder builder = new AlertDialog.Builder(this) AlertDialog.Builder builder = new AlertDialog.Builder(this)
.setTitle(R.string.start_error_title) .setTitle(R.string.start_error_title)
.setMessage(R.string.start_error_mic_required) .setMessage(R.string.start_error_mic_required)
.setIcon(R.drawable.ic_mic_black_48dp) .setIcon(R.drawable.ic_mic_black)
.setCancelable(false) .setCancelable(false)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override @Override
......
...@@ -146,7 +146,7 @@ public class AccountsManagementFragment extends Fragment implements HomeActivity ...@@ -146,7 +146,7 @@ public class AccountsManagementFragment extends Fragment implements HomeActivity
refresh(); refresh();
((HomeActivity) getActivity()).setToolbarState(true, R.string.menu_item_accounts); ((HomeActivity) getActivity()).setToolbarState(true, R.string.menu_item_accounts);
FloatingActionButton btn = ((HomeActivity) getActivity()).getActionButton(); FloatingActionButton btn = ((HomeActivity) getActivity()).getActionButton();
btn.setImageResource(R.drawable.ic_add_white_24dp); btn.setImageResource(R.drawable.ic_add_white);
btn.setOnClickListener(new OnClickListener() { btn.setOnClickListener(new OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
...@@ -287,7 +287,7 @@ public class AccountsManagementFragment extends Fragment implements HomeActivity ...@@ -287,7 +287,7 @@ public class AccountsManagementFragment extends Fragment implements HomeActivity
entryView.errorIndicator.setColorFilter(Color.RED); entryView.errorIndicator.setColorFilter(Color.RED);
entryView.errorIndicator.setVisibility(View.VISIBLE); entryView.errorIndicator.setVisibility(View.VISIBLE);
} else if (item.isInError()) { } else if (item.isInError()) {
entryView.errorIndicator.setImageResource(R.drawable.ic_error_white_24dp); entryView.errorIndicator.setImageResource(R.drawable.ic_error_white);
entryView.errorIndicator.setColorFilter(Color.RED); entryView.errorIndicator.setColorFilter(Color.RED);
entryView.errorIndicator.setVisibility(View.VISIBLE); entryView.errorIndicator.setVisibility(View.VISIBLE);
entryView.loadingIndicator.setVisibility(View.GONE); entryView.loadingIndicator.setVisibility(View.GONE);
......
...@@ -452,7 +452,7 @@ public class CallFragment extends Fragment implements CallInterface, ContactDeta ...@@ -452,7 +452,7 @@ public class CallFragment extends Fragment implements CallInterface, ContactDeta
} catch (RemoteException e) { } catch (RemoteException e) {
e.printStackTrace(); e.printStackTrace();
} }
item.setIcon(lastVideoSource ? R.drawable.ic_camera_front_white_24dp : R.drawable.ic_camera_rear_white_24dp); item.setIcon(lastVideoSource ? R.drawable.ic_camera_front_white : R.drawable.ic_camera_rear_white);
break; break;
case R.id.menuitem_dialpad: case R.id.menuitem_dialpad:
KeyboardVisibilityManager.showKeyboard(getActivity(), KeyboardVisibilityManager.showKeyboard(getActivity(),
......
...@@ -604,7 +604,7 @@ public class SmartListFragment extends Fragment implements SearchView.OnQueryTex ...@@ -604,7 +604,7 @@ public class SmartListFragment extends Fragment implements SearchView.OnQueryTex
if (service.isMobileNetworkConnectedButNotGranted()) { if (service.isMobileNetworkConnectedButNotGranted()) {
this.showErrorPanel(R.string.error_mobile_network_available_but_disabled, this.showErrorPanel(R.string.error_mobile_network_available_but_disabled,
true, true,
R.drawable.ic_settings_white_48dp, R.drawable.ic_settings_white,
new View.OnClickListener() { new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
......
...@@ -301,7 +301,7 @@ public class Conference { ...@@ -301,7 +301,7 @@ public class Conference {
noti.setContentTitle(ctx.getString(R.string.notif_current_call_title, contact.getDisplayName())) noti.setContentTitle(ctx.getString(R.string.notif_current_call_title, contact.getDisplayName()))
.setContentText(ctx.getText(R.string.notif_current_call)) .setContentText(ctx.getText(R.string.notif_current_call))
.setContentIntent(goto_intent) .setContentIntent(goto_intent)
.addAction(R.drawable.ic_call_end_white_24dp, ctx.getText(R.string.action_call_hangup), .addAction(R.drawable.ic_call_end_white, ctx.getText(R.string.action_call_hangup),
PendingIntent.getService(ctx, new Random().nextInt(), PendingIntent.getService(ctx, new Random().nextInt(),
new Intent(LocalService.ACTION_CALL_END) new Intent(LocalService.ACTION_CALL_END)
.setClass(ctx, LocalService.class) .setClass(ctx, LocalService.class)
...@@ -320,7 +320,7 @@ public class Conference { ...@@ -320,7 +320,7 @@ public class Conference {
.setClass(ctx, LocalService.class) .setClass(ctx, LocalService.class)
.setData(call_uri), .setData(call_uri),
PendingIntent.FLAG_ONE_SHOT)) PendingIntent.FLAG_ONE_SHOT))
.addAction(R.drawable.ic_call_end_white_24dp, ctx.getText(R.string.action_call_decline), .addAction(R.drawable.ic_call_end_white, ctx.getText(R.string.action_call_decline),
PendingIntent.getService(ctx, new Random().nextInt(), PendingIntent.getService(ctx, new Random().nextInt(),
new Intent(LocalService.ACTION_CALL_REFUSE) new Intent(LocalService.ACTION_CALL_REFUSE)
.setClass(ctx, LocalService.class) .setClass(ctx, LocalService.class)
...@@ -330,7 +330,7 @@ public class Conference { ...@@ -330,7 +330,7 @@ public class Conference {
noti.setContentTitle(ctx.getString(R.string.notif_outgoing_call_title, contact.getDisplayName())) noti.setContentTitle(ctx.getString(R.string.notif_outgoing_call_title, contact.getDisplayName()))
.setContentText(ctx.getText(R.string.notif_outgoing_call)) .setContentText(ctx.getText(R.string.notif_outgoing_call))
.setContentIntent(goto_intent) .setContentIntent(goto_intent)
.addAction(R.drawable.ic_call_end_white_24dp, ctx.getText(R.string.action_call_hangup), .addAction(R.drawable.ic_call_end_white, ctx.getText(R.string.action_call_hangup),
PendingIntent.getService(ctx, new Random().nextInt(), PendingIntent.getService(ctx, new Random().nextInt(),
new Intent(LocalService.ACTION_CALL_END) new Intent(LocalService.ACTION_CALL_END)
.setClass(ctx, LocalService.class) .setClass(ctx, LocalService.class)
......
ring-android/app/src/main/res/drawable-hdpi/ic_action_accept.png

392 B

ring-android/app/src/main/res/drawable-hdpi/ic_action_edit.png

740 B

ring-android/app/src/main/res/drawable-hdpi/ic_action_keyboard_light.png

345 B

ring-android/app/src/main/res/drawable-hdpi/ic_action_new_dark.png

268 B

ring-android/app/src/main/res/drawable-hdpi/ic_action_remove.png

353 B

ring-android/app/src/main/res/drawable-hdpi/ic_action_reveal.png

1003 B

ring-android/app/src/main/res/drawable-hdpi/ic_add_white_24dp.png

127 B

ring-android/app/src/main/res/drawable-hdpi/ic_android_black_24dp.png

341 B

ring-android/app/src/main/res/drawable-hdpi/ic_archive_white_24dp.png

247 B

ring-android/app/src/main/res/drawable-hdpi/ic_call_end_white_24dp.png

314 B

ring-android/app/src/main/res/drawable-hdpi/ic_call_made_black_24dp.png

174 B

ring-android/app/src/main/res/drawable-hdpi/ic_call_missed_black_24dp.png

201 B

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment