Skip to content

Commit

Permalink
Remove screenshot example
Browse files Browse the repository at this point in the history
Screenshot fidelity is an important advantage the improved resizing
offers but the example in the dialog was not conveying that effectively
enough. The best way to test the setting is by sending an image of your
own choosing.
  • Loading branch information
kmark committed Mar 8, 2015
1 parent f928d27 commit 7cd48e5
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,14 @@ public final class MmsTypeQualityDialog extends AlertDialog {
private SeekBar seekQuality;
private TextView txtQuality;
private ImageView imgPreview1;
private ImageView imgPreview2;
private TextView txtPreview1;
private TextView txtPreview2;

private Setting.ImageFormat format;
private int quality;

private int formatValues[];
private String lossless;
private Bitmap bmpPreview1;
private Bitmap bmpPreview2;

public MmsTypeQualityDialog(final Preference settingPref) {
super(settingPref.getContext());
Expand All @@ -77,9 +74,7 @@ protected void onCreate(Bundle savedInstanceState) {
seekQuality = (SeekBar)v.findViewById(R.id.dialog_mms_type_quality_quality);
txtQuality = (TextView)v.findViewById(R.id.dialog_mms_type_quality_qlabel);
imgPreview1 = (ImageView)v.findViewById(R.id.dialog_mms_type_quality_preview1);
imgPreview2 = (ImageView)v.findViewById(R.id.dialog_mms_type_quality_preview2);
txtPreview1 = (TextView)v.findViewById(R.id.dialog_mms_type_quality_p1text);
txtPreview2 = (TextView)v.findViewById(R.id.dialog_mms_type_quality_p2text);

format = Setting.ImageFormat.fromInt(prefs.getInt(Setting.MMS_IMAGE_TYPE.toString(), Setting.ImageFormat.JPEG.toInt()));
quality = prefs.getInt(Setting.MMS_IMAGE_QUALITY.toString(), 80);
Expand All @@ -88,7 +83,6 @@ protected void onCreate(Bundle savedInstanceState) {
lossless = getContext().getString(R.string.dialog_mms_type_quality_lossless);

bmpPreview1 = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.fajita);
bmpPreview2 = BitmapFactory.decodeResource(getContext().getResources(), R.drawable.screenshot);

// Only time we need to set the spinner and seek bar
// FIXME: the integer value of format is not guaranteed to be the positional index of the spinner values, see formatValues
Expand Down Expand Up @@ -135,12 +129,6 @@ private void refresh(final boolean everything) {
imgPreview1.setImageBitmap(BitmapFactory.decodeByteArray(baos.toByteArray(), 0, baos.size()));
txtPreview1.setText(getContext().getString(R.string.dialog_mms_type_quality_kb, baos.size() / 1000f));
baos.close();

baos = new ByteArrayOutputStream();
bmpPreview2.compress(cmpFormat, format == Setting.ImageFormat.PNG ? 0 : quality, baos);
imgPreview2.setImageBitmap(BitmapFactory.decodeByteArray(baos.toByteArray(), 0, baos.size()));
txtPreview2.setText(getContext().getString(R.string.dialog_mms_type_quality_kb, baos.size() / 1000f));
baos.close();
} catch (IOException ex) {
//
}
Expand Down
Binary file removed app/src/main/res/drawable-hdpi/screenshot.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-mdpi/screenshot.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xhdpi/screenshot.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xxhdpi/screenshot.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xxxhdpi/screenshot.png
Binary file not shown.
30 changes: 0 additions & 30 deletions app/src/main/res/layout/dialog_mms_type_quality.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,34 +82,4 @@
android:id="@+id/dialog_mms_type_quality_p1text" />
</RelativeLayout>

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/dialog_mms_type_quality_preview2"
android:layout_marginTop="5dp"
android:src="@drawable/screenshot" />

<TextView
tools:ignore="HardcodedText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/dialog_mms_type_quality_preview2"
android:layout_alignRight="@id/dialog_mms_type_quality_preview2"
android:layout_alignEnd="@id/dialog_mms_type_quality_preview2"
android:textColor="@android:color/black"
android:shadowColor="@android:color/white"
android:shadowDx="0"
android:shadowDy="0"
android:shadowRadius="7.25"
android:layout_marginRight="5dp"
android:layout_marginEnd="5dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="28.15 KB"
android:id="@+id/dialog_mms_type_quality_p2text" />
</RelativeLayout>

</LinearLayout>
Binary file removed app/src/main/screenshot_source.png
Binary file not shown.

0 comments on commit 7cd48e5

Please sign in to comment.