mirror of
https://codeberg.org/Starfish/Imagepipe.git
synced 2025-10-05 22:52:39 +02:00
improve SeekBarPreference,versionCode 51, versionName "0.72"
This commit is contained in:
@@ -2,9 +2,11 @@ Version 0.72
|
|||||||
============
|
============
|
||||||
- add support for ACTION_EDIT intent
|
- add support for ACTION_EDIT intent
|
||||||
- fix GET_CONTENT intent never added exif data
|
- fix GET_CONTENT intent never added exif data
|
||||||
- fix GET_CONTENT not working if used immediately after clean app install
|
- fix GET_CONTENT not working when used immediately after clean app install
|
||||||
- remove non-static access to sharedPreferences
|
- remove non-static access to sharedPreferences
|
||||||
- fix piping of multiple images fails after resetting preferences
|
- fix piping of multiple images fails after resetting preferences
|
||||||
|
- fix sharing not working in some cases when clear data after sharing was enabled
|
||||||
|
- change the maximum quality setting to a seek bar for better user experience
|
||||||
|
|
||||||
Version 0.71
|
Version 0.71
|
||||||
============
|
============
|
||||||
|
@@ -34,8 +34,8 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 33
|
targetSdkVersion 33
|
||||||
versionCode 50
|
versionCode 51
|
||||||
versionName "0.71"
|
versionName "0.72"
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
@@ -843,7 +843,7 @@ public class ImageReceiver extends Activity{
|
|||||||
PictureCache.clearPictureCache(context);
|
PictureCache.clearPictureCache(context);
|
||||||
ImagepipePreferences.setCurrentAppVersionFlag(context);
|
ImagepipePreferences.setCurrentAppVersionFlag(context);
|
||||||
}
|
}
|
||||||
// since with version 51 this setting moved from a String (list) to an Integer (seekBar), we need to map
|
// since version 51 this setting moved from a String (list) to an Integer (seekBar), we need to map
|
||||||
// the old string value to the new integer value.
|
// the old string value to the new integer value.
|
||||||
if (ImagepipePreferences.getLastAppVersion(context)<51){
|
if (ImagepipePreferences.getLastAppVersion(context)<51){
|
||||||
ImagepipePreferences.setQualitymaxvalue(context,ImagepipePreferences.getQualitymaxvalue_Legacy(context));
|
ImagepipePreferences.setQualitymaxvalue(context,ImagepipePreferences.getQualitymaxvalue_Legacy(context));
|
||||||
|
@@ -36,8 +36,8 @@ public class SeekBarPreference extends Preference implements SeekBar.OnSeekBarCh
|
|||||||
private int value;
|
private int value;
|
||||||
private int min;
|
private int min;
|
||||||
private int max;
|
private int max;
|
||||||
private int minWarning;
|
private int[] colorThresholds;
|
||||||
private int maxWarning;
|
private int[] colors;
|
||||||
private boolean displayProgressValue = false;
|
private boolean displayProgressValue = false;
|
||||||
|
|
||||||
private View preferenceView;
|
private View preferenceView;
|
||||||
@@ -54,21 +54,48 @@ public class SeekBarPreference extends Preference implements SeekBar.OnSeekBarCh
|
|||||||
readAttributes(context,attrs,0);
|
readAttributes(context,attrs,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal function to read the attributes from the xml definition of this preference. This is called by the
|
||||||
|
* constructors to unify attribute interpretation.
|
||||||
|
*
|
||||||
|
* Attributes are:
|
||||||
|
* min: defines the minimum value allowed. The seekBar cannot be moved to a position lower than this minimum.
|
||||||
|
* max: defines the maximum value allowed. The seekBar will be cut-off at this value.
|
||||||
|
* label: defines color labeling of values. The color of the value switches as soon as a threshold is reached.
|
||||||
|
* Format is "threshold,color", the thresholds are separated by a pipe symbol (|). Example in xml:
|
||||||
|
* android:label="20,#ffffff66|60,#ff66ff66|90,#ffff6666"
|
||||||
|
* The displayed value will be yellow when equal or above 20,
|
||||||
|
* green when equal or above 60,
|
||||||
|
* red when equal or above 90.
|
||||||
|
* When below 20, the color won't be modified.
|
||||||
|
*
|
||||||
|
* To display a progress value, define at least one threshold color.
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @param attrs
|
||||||
|
* @param defStyleAttr
|
||||||
|
*/
|
||||||
|
|
||||||
private void readAttributes(Context context, AttributeSet attrs, int defStyleAttr){
|
private void readAttributes(Context context, AttributeSet attrs, int defStyleAttr){
|
||||||
setMax(100);
|
setMax(100);
|
||||||
this.context = context;
|
this.context = context;
|
||||||
TypedArray typedArray = context.obtainStyledAttributes(attrs,R.styleable.SeekBarPreference,defStyleAttr,0);
|
TypedArray typedArray = context.obtainStyledAttributes(attrs,R.styleable.SeekBarPreference,defStyleAttr,0);
|
||||||
min = attrs.getAttributeIntValue(NAMESPACE,"min",0);
|
min = attrs.getAttributeIntValue(NAMESPACE,"min",0);
|
||||||
max = attrs.getAttributeIntValue(NAMESPACE,"max",100);
|
max = attrs.getAttributeIntValue(NAMESPACE,"max",100);
|
||||||
minWarning = min; maxWarning=max;
|
|
||||||
displayProgressValue = false;
|
displayProgressValue = false;
|
||||||
String progressLabel = attrs.getAttributeValue(NAMESPACE,"label");
|
String progressLabel = attrs.getAttributeValue(NAMESPACE,"label");
|
||||||
if (progressLabel!=null){
|
if (progressLabel!=null){
|
||||||
displayProgressValue = true;
|
displayProgressValue = true;
|
||||||
String[] labelIitems = progressLabel.split("\\|");
|
String[] labelIitems = progressLabel.split("\\|");
|
||||||
if (labelIitems.length>1){
|
if (labelIitems.length>0){
|
||||||
minWarning = Integer.parseInt(labelIitems[0]);
|
colorThresholds = new int[labelIitems.length]; colors = new int[labelIitems.length];
|
||||||
maxWarning = Integer.parseInt(labelIitems[1]);
|
for (int i=0; i<labelIitems.length; i++){
|
||||||
|
String values[] = labelIitems[i].split(",");
|
||||||
|
if (values.length>1){
|
||||||
|
colorThresholds[i] = Integer.parseInt(values[0]);
|
||||||
|
colors[i] = Color.parseColor(values[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
typedArray.recycle();
|
typedArray.recycle();
|
||||||
@@ -130,10 +157,18 @@ public class SeekBarPreference extends Preference implements SeekBar.OnSeekBarCh
|
|||||||
private void displayValueNumber(int i){
|
private void displayValueNumber(int i){
|
||||||
if (displayProgressValue){
|
if (displayProgressValue){
|
||||||
TextView textViewValue = (TextView) preferenceView.findViewById(R.id.value);
|
TextView textViewValue = (TextView) preferenceView.findViewById(R.id.value);
|
||||||
if ((i<minWarning) || (i>maxWarning)){
|
if ((colorThresholds!=null) && (colors!=null)){
|
||||||
textViewValue.setTextColor(context.getResources().getColor(R.color.colorpicker15));
|
if ((colorThresholds.length>0) && (colors.length>0)) {
|
||||||
} else {
|
int colorPosition=-1;
|
||||||
textViewValue.setTextColor(context.getResources().getColor(R.color.primaryTextColor));
|
for (int pos=0; pos<colorThresholds.length; pos++){
|
||||||
|
if (i>=colorThresholds[pos]){
|
||||||
|
colorPosition = pos;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (colorPosition!=-1){
|
||||||
|
textViewValue.setTextColor(colors[colorPosition]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
textViewValue.setText(Integer.toString(i));
|
textViewValue.setText(Integer.toString(i));
|
||||||
}
|
}
|
||||||
|
@@ -83,7 +83,7 @@
|
|||||||
android:summary="@string/preference_maxquality_summary"
|
android:summary="@string/preference_maxquality_summary"
|
||||||
android:min="20"
|
android:min="20"
|
||||||
android:max="100"
|
android:max="100"
|
||||||
android:label="50|90"
|
android:label="20,#ffffff66|60,#ff66ff66|90,#ffff6666"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
|
6
fastlane/metadata/android/de-DE/changelogs/51.txt
Normal file
6
fastlane/metadata/android/de-DE/changelogs/51.txt
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
- Imagepipe kann nun auch als Bild-Editor aus anderen Apps aufgerufen werden
|
||||||
|
- behoben: bei Aufruf aus anderen Apps wurden nie Bilddaten hinzugefügt
|
||||||
|
- behoben: Aufruf aus anderen Apps funktionierte nicht unmittelbar nach einer Neuinstallation
|
||||||
|
- behoben: Teilen mehrerer Bilder schlug fehl, falls die Einstellungen zurückgesetzt worden sind
|
||||||
|
- behoben: Teilen funktionierte in manchen Fällen nicht, falls die Option "nach dem Teilen löschen" aktiviert war
|
||||||
|
- die Einstellung der maximalen Qualität erfolgt zur Verbesserung des Nutzerlebnisses nun über einen Schieberegeler
|
5
fastlane/metadata/android/en-US/changelogs/51.txt
Normal file
5
fastlane/metadata/android/en-US/changelogs/51.txt
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- Imagepipe can now also be called from other apps to edit the image
|
||||||
|
- fixed: when called from other apps, exif data was never added
|
||||||
|
- fixed: calling Imagepipe from other apps did not work immediately after installing it
|
||||||
|
- fixed: sharing failed sometimes with the setting "clear after sharing" enabled
|
||||||
|
- setting the maximum quality is now done using a slider to improve user experience
|
Reference in New Issue
Block a user