| android:layout_width="fill_parent" | android:layout_width="fill_parent" | ||||
| android:background="@drawable/gradient_view" /> | android:background="@drawable/gradient_view" /> | ||||
| <TextView | <TextView | ||||
| android:id="@+id/Title_DarkPoint" | |||||
| android:id="@+id/Title_BrightPoint" | |||||
| android:textColor="@color/black" | android:textColor="@color/black" | ||||
| android:textStyle="bold" | android:textStyle="bold" | ||||
| android:layout_marginLeft="3dip" | android:layout_marginLeft="3dip" | ||||
| android:id="@+id/Row_BP_Shutter"> | android:id="@+id/Row_BP_Shutter"> | ||||
| <TextView | <TextView | ||||
| android:id="@+id/Label_DP_Shutter" | |||||
| android:id="@+id/Label_BP_Shutter" | |||||
| android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
| android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
| android:layout_gravity="right|center_vertical" | android:layout_gravity="right|center_vertical" | ||||
| android:id="@+id/Row_BP_Aperture"> | android:id="@+id/Row_BP_Aperture"> | ||||
| <TextView | <TextView | ||||
| android:id="@+id/Label_DP_Aperture" | |||||
| android:id="@+id/Label_BP_Aperture" | |||||
| android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
| android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
| android:layout_gravity="right|center_vertical" | android:layout_gravity="right|center_vertical" | ||||
| <TableRow | <TableRow | ||||
| android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
| android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
| android:id="@+id/Row_calcP_Aperture" | |||||
| android:id="@+id/Row_calcP_Aperture2" | |||||
| android:paddingTop="2dip"> | android:paddingTop="2dip"> | ||||
| <TextView | <TextView |
| if ((v1 <= shutter && shutter <= v2) || (v2 <= shutter && shutter <= v1)) { | if ((v1 <= shutter && shutter <= v2) || (v2 <= shutter && shutter <= v1)) { | ||||
| if (Math.abs(shutter - v1) <= Math.abs(shutter - v2)) { | if (Math.abs(shutter - v1) <= Math.abs(shutter - v2)) { | ||||
| shutterSpeed = (v1 < 1) ? "1/" + evDF.format((1 / v1)) : "" + EasyBracketMain.DF.format(v1) + "''"; | |||||
| shutterSpeed = (v1 < 1) ? "1/" + evDF.format((1 / v1)) | |||||
| : "" + EasyBracketMain.DF.format(v1) + "''"; | |||||
| } else { | } else { | ||||
| shutterSpeed = (v2 < 1) ? "1/" + evDF.format((1 / v2)) : "" + EasyBracketMain.DF.format(v2) + "''"; | |||||
| shutterSpeed = (v2 < 1) ? "1/" + evDF.format((1 / v2)) | |||||
| : "" + EasyBracketMain.DF.format(v2) + "''"; | |||||
| } | } | ||||
| found = true; | found = true; | ||||
| break; | break; | ||||
| } | } | ||||
| if (!found) { | if (!found) { | ||||
| shutterSpeed = (shutter < 1) ? "1/" + Math.round(1 / shutter) : "" + EasyBracketMain.DF.format(shutter) + "''"; | |||||
| shutterSpeed = (shutter < 1) ? "1/" + Math.round(1 / shutter) | |||||
| : "" + EasyBracketMain.DF.format(shutter) + "''"; | |||||
| } | } | ||||
| exp = new Exposure(i + 1, "f/" + EasyBracketMain.DF.format(calcPrmAperture), shutterSpeed, evStep, deltaEV, | exp = new Exposure(i + 1, "f/" + EasyBracketMain.DF.format(calcPrmAperture), shutterSpeed, evStep, deltaEV, | ||||
| break; | break; | ||||
| default: | default: | ||||
| iSize = 72; | |||||
| iSize_r = 68; | |||||
| iSize = 96; | |||||
| iSize_r = 92; | |||||
| iStart = 2; | iStart = 2; | ||||
| break; | break; | ||||
| } | } |
| final Resources res = context.getResources(); | final Resources res = context.getResources(); | ||||
| // The background | // The background | ||||
| mIconBG = Bitmap.createBitmap(36, 36, Config.ARGB_8888); | |||||
| mIconBG = Bitmap.createBitmap(32, 32, Config.ARGB_8888); | |||||
| mIconBG.eraseColor(0x00000000); | mIconBG.eraseColor(0x00000000); | ||||
| canvas = new Canvas(mIconBG); | canvas = new Canvas(mIconBG); | ||||
| mPaint.setStyle(Style.FILL); | mPaint.setStyle(Style.FILL); |