Skip to content

Commit

Permalink
Merge pull request #12 from Ifill-Brito/development
Browse files Browse the repository at this point in the history
Font size according to device settings
  • Loading branch information
Yonjuni authored Nov 21, 2016
2 parents 27857a3 + fe3fbb0 commit f2fe123
Show file tree
Hide file tree
Showing 72 changed files with 225 additions and 224 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private void handleButtonCapture()
{
captureButton.setVisibility(View.GONE);
photoCaptured = true;
captureButton.setImageResource(R.drawable.ic_check_white_48dp);
captureButton.setImageResource(R.drawable.ic_check_white_48sp);
flashButton.animate().alpha(0.0f).setDuration(500L);
camera.takePicture(null, null, mPicture);
}
Expand Down Expand Up @@ -180,7 +180,7 @@ private void handleButtonRetake()
photoCaptured = false;
retakeButton.setVisibility(View.GONE);
flashButton.animate().alpha(1.0f).setDuration(500L);
captureButton.setImageResource(R.drawable.ic_camera_alt_white_48dp);
captureButton.setImageResource(R.drawable.ic_camera_alt_white_48sp);
camera.startPreview();
}
}
Expand Down Expand Up @@ -216,9 +216,9 @@ private void setupFlashIcons()
{
currentFlashIconIndex = 0;
flashIcons = new ArrayList<>();
flashIcons.add(R.drawable.ic_flash_auto_white_48dp);
flashIcons.add(R.drawable.ic_flash_on_white_48dp);
flashIcons.add(R.drawable.ic_flash_off_white_48dp);
flashIcons.add(R.drawable.ic_flash_auto_white_48sp);
flashIcons.add(R.drawable.ic_flash_on_white_48sp);
flashIcons.add(R.drawable.ic_flash_off_white_48sp);
}

private Camera.PictureCallback mPicture = new Camera.PictureCallback()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,11 @@ public void onClick(View view)
{
if ( dialogCache.getExpandableLayout().getVisibility() == View.GONE )
{
changePhotoThumbnailVisibility(R.drawable.ic_keyboard_arrow_up_white_48dp, View.VISIBLE);
changePhotoThumbnailVisibility(R.drawable.ic_keyboard_arrow_up_white_48sp, View.VISIBLE);
}
else
{
changePhotoThumbnailVisibility(R.drawable.ic_keyboard_arrow_down_white_48dp, View.GONE);
changePhotoThumbnailVisibility(R.drawable.ic_keyboard_arrow_down_white_48sp, View.GONE);
}
}
});
Expand Down Expand Up @@ -429,9 +429,9 @@ private void startPhotoPreviewActivity()
this.startActivityForResult(viewPhotoIntent, REQUEST_PHOTO_PREVIEW_FROM_DIALOG);
}

private void changePhotoThumbnailVisibility(int ic_keyboard_arrow_up_white_48dp, int visible)
private void changePhotoThumbnailVisibility(int ic_keyboard_arrow_up_white_48sp, int visible)
{
dialogCache.getExpandableImageView().setImageResource(ic_keyboard_arrow_up_white_48dp);
dialogCache.getExpandableImageView().setImageResource(ic_keyboard_arrow_up_white_48sp);
dialogCache.getExpandableLayout().setVisibility(visible);
}

Expand Down Expand Up @@ -466,7 +466,7 @@ public void onActivityResult(int requestCode, int resultCode, Intent data)
dialogCache.getProductImage().setImageBitmap(imageBitmap);
dto.setThumbnailBitmap(imageBitmap);
dto.setDefaultImage(false);
changePhotoThumbnailVisibility(R.drawable.ic_keyboard_arrow_up_white_48dp, View.VISIBLE);
changePhotoThumbnailVisibility(R.drawable.ic_keyboard_arrow_up_white_48sp, View.VISIBLE);
}
else if ( requestCode == REQUEST_PHOTO_PREVIEW_FROM_DIALOG && resultCode == RESULT_OK )
{
Expand All @@ -475,7 +475,7 @@ else if ( requestCode == REQUEST_PHOTO_PREVIEW_FROM_DIALOG && resultCode == RESU

dialogCache.getProductImage().setImageBitmap(imageBitmap);
dialogCache.setImageScheduledForDeletion(true);
changePhotoThumbnailVisibility(R.drawable.ic_keyboard_arrow_up_white_48dp, View.VISIBLE);
changePhotoThumbnailVisibility(R.drawable.ic_keyboard_arrow_up_white_48sp, View.VISIBLE);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void onFocusChange(View view, boolean hasFocus)
if ( hasFocus )
{
dialogCache.getExpandableLayout().setVisibility(View.GONE);
dialogCache.getExpandableImageView().setImageResource(R.drawable.ic_keyboard_arrow_down_white_48dp);
dialogCache.getExpandableImageView().setImageResource(R.drawable.ic_keyboard_arrow_down_white_48sp);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ public boolean onLongClick(View view)
productItemCache.setDetailsVisible(!productItemCache.isDetailsVisible());
if ( productItemCache.isDetailsVisible() )
{
showDetailsButton.setImageResource(R.drawable.ic_keyboard_arrow_up_white_48dp);
showDetailsButton.setImageResource(R.drawable.ic_keyboard_arrow_up_white_48sp);
productItemCache.getDetailsLayout().setVisibility(View.VISIBLE);

}
else
{
showDetailsButton.setImageResource(R.drawable.ic_keyboard_arrow_down_white_48dp);
showDetailsButton.setImageResource(R.drawable.ic_keyboard_arrow_down_white_48sp);
productItemCache.getDetailsLayout().setVisibility(View.GONE);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public void onCheckedChanged(CompoundButton compoundButton, boolean b)
if ( !StringUtils.isEmpty(dto.getDeadlineDate()) )
{
dialogCache.getDeadlineExpansionButton().setVisibility(View.VISIBLE);
dialogCache.getDeadlineExpansionButton().setImageResource(R.drawable.ic_keyboard_arrow_down_white_48dp);
dialogCache.getDeadlineExpansionButton().setImageResource(R.drawable.ic_keyboard_arrow_down_white_48sp);

dialogCache.getCheckBox().setChecked(true);
String language;
Expand All @@ -171,12 +171,12 @@ public void onClick(View view)
if ( dialogCache.getDeadlineLayout().getVisibility() == View.VISIBLE )
{
dialogCache.getDeadlineLayout().setVisibility(View.GONE);
dialogCache.getDeadlineExpansionButton().setImageResource(R.drawable.ic_keyboard_arrow_down_white_48dp);
dialogCache.getDeadlineExpansionButton().setImageResource(R.drawable.ic_keyboard_arrow_down_white_48sp);
}
else
{
dialogCache.getDeadlineLayout().setVisibility(View.VISIBLE);
dialogCache.getDeadlineExpansionButton().setImageResource(R.drawable.ic_keyboard_arrow_up_white_48dp);
dialogCache.getDeadlineExpansionButton().setImageResource(R.drawable.ic_keyboard_arrow_up_white_48sp);
}
}
});
Expand All @@ -197,15 +197,15 @@ public void onClick(View view)
if ( dialogCache.getCheckBox().isChecked() )
{
dialogCache.getDeadlineExpansionButton().setVisibility(View.VISIBLE);
dialogCache.getDeadlineExpansionButton().setImageResource(R.drawable.ic_keyboard_arrow_up_white_48dp);
dialogCache.getDeadlineExpansionButton().setImageResource(R.drawable.ic_keyboard_arrow_up_white_48sp);
dialogCache.getDeadlineLayout().setVisibility(View.VISIBLE);
dialogCache.getDateTextView().setText(DateUtils.getDateAsString(currentDate.getTimeInMillis(), datePattern, language));
dialogCache.getTimeTextView().setText(DateUtils.getDateAsString(currentDate.getTimeInMillis(), timePattern, language));
}
else
{
dialogCache.getReminderSwitch().setChecked(false);
dialogCache.getDeadlineExpansionButton().setVisibility(View.GONE);
dialogCache.getDeadlineExpansionButton().setVisibility(View.INVISIBLE);
dialogCache.getDateTextView().setText("");
dialogCache.getTimeTextView().setText("");
dialogCache.getDeadlineLayout().setVisibility(View.GONE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ void processDto(ListDto dto)
listItemCache.setDetailsVisible(!listItemCache.isDetailsVisible());
if ( listItemCache.isDetailsVisible() )
{
showDetailsButton.setImageResource(R.drawable.ic_keyboard_arrow_up_white_48dp);
showDetailsButton.setImageResource(R.drawable.ic_keyboard_arrow_up_white_48sp);
listItemCache.getListDetails().setVisibility(View.VISIBLE);

}
else
{
showDetailsButton.setImageResource(R.drawable.ic_keyboard_arrow_down_white_48dp);
showDetailsButton.setImageResource(R.drawable.ic_keyboard_arrow_down_white_48sp);
listItemCache.getListDetails().setVisibility(View.GONE);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void onFocusChange(View v, boolean hasFocus)
if ( hasFocus )
{
dialogCache.getDeadlineLayout().setVisibility(View.GONE);
dialogCache.getDeadlineExpansionButton().setImageResource(R.drawable.ic_keyboard_arrow_down_white_48dp);
dialogCache.getDeadlineExpansionButton().setImageResource(R.drawable.ic_keyboard_arrow_down_white_48sp);
}
}
}
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/button_disabled.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<item>
<shape>
<solid android:color="@color/middlegrey"/>
<corners android:radius="6dp"/>
<corners android:radius="6sp"/>
</shape>
</item>
</selector>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/button_fullwidth.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<item>
<shape>
<solid android:color="@color/colorPrimaryDark"/>
<corners android:radius="6dp"/>
<corners android:radius="6sp"/>
</shape>
</item>
</selector>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/button_highlighted.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<item>
<shape>
<solid android:color="@color/colorAccent"/>
<corners android:radius="6dp"/>
<corners android:radius="6sp"/>

<stroke
android:width="10px"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/button_highlighted_2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<item>
<shape>
<solid android:color="@color/colorAccent"/>
<corners android:radius="6dp"/>
<corners android:radius="6sp"/>
<stroke
android:width="10px"
android:color="@color/black"/>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/button_highlighted_3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<item>
<shape>
<solid android:color="@color/colorAccent"/>
<corners android:radius="6dp"/>
<corners android:radius="6sp"/>
<stroke
android:width="10px"
android:color="@color/yellow"/>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/button_highlighted_4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<item>
<shape>
<solid android:color="@color/colorAccent"/>
<corners android:radius="6dp"/>
<corners android:radius="6sp"/>
<stroke
android:width="10px"
android:color="@color/middleblue"/>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/button_middleblue.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<item>
<shape>
<solid android:color="@color/middleblue"/>
<corners android:radius="6dp"/>
<corners android:radius="6sp"/>
</shape>
</item>
</selector>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/button_normal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<item>
<shape>
<solid android:color="@color/colorAccent"/>
<corners android:radius="6dp"/>
<corners android:radius="6sp"/>
</shape>
</item>
</selector>
8 changes: 4 additions & 4 deletions app/src/main/res/drawable/fab_tutorial.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
</item>
<item
android:drawable="@drawable/ic_input_add_white"
android:bottom="20dp"
android:left="20dp"
android:right="20dp"
android:top="20dp"
android:bottom="20sp"
android:left="20sp"
android:right="20sp"
android:top="20sp"
/>
</layer-list>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_edit_custom_color.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<bitmap
xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/ic_edit_white_48dp"
android:src="@drawable/ic_edit_white_48sp"
android:tint="@color/colorPrimaryDark"/>
4 changes: 2 additions & 2 deletions app/src/main/res/drawable/ic_info_black_24dp.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:width="24sp"
android:height="24sp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:width="24sp"
android:height="24sp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:width="24sp"
android:height="24sp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/drawable/ic_menu_help.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:width="24sp"
android:height="24sp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/drawable/ic_menu_info.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:width="24sp"
android:height="24sp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/drawable/list_dialog_border.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<corners android:radius="5dp"/>
<corners android:radius="5sp"/>

<stroke
android:width="1dp"
android:width="1sp"
android:color="@color/colorAccent"/>
</shape>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/search_border_style.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<shape>
<solid android:color="@android:color/transparent"/>
<stroke
android:width="1dp"
android:width="1sp"
android:color="@color/colorAccent"/>
</shape>
</item>
Expand Down
Loading

0 comments on commit f2fe123

Please sign in to comment.