| @@ -23,11 +23,18 @@ | |||
| </activity> | |||
| <activity | |||
| android:name="ch.spherIC.recurvebowsight.configuration.MainConfigurationActivity" | |||
| android:label="@string/title_activity_main_configuration" > | |||
| android:label="@string/title_activity_main_configuration" | |||
| android:windowSoftInputMode="stateHidden" > | |||
| </activity> | |||
| <activity | |||
| android:name="ch.spherIC.recurvebowsight.configuration.RiserConfigurationActivity" | |||
| android:label="@string/title_activity_riser_configuration" > | |||
| android:label="@string/title_activity_riser_configuration" | |||
| android:windowSoftInputMode="stateHidden" > | |||
| </activity> | |||
| <activity | |||
| android:name="ch.spherIC.recurvebowsight.configuration.SightConfigurationActivity" | |||
| android:label="@string/title_activity_sight_configuration" | |||
| android:windowSoftInputMode="stateHidden" > | |||
| </activity> | |||
| </application> | |||
| @@ -148,9 +148,11 @@ | |||
| android:inputType="numberDecimal" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| android:typeface="sans" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| <TableRow | |||
| @@ -180,8 +182,10 @@ | |||
| android:inputType="numberDecimal" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| <TableRow | |||
| @@ -211,8 +215,10 @@ | |||
| android:inputType="numberDecimal" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| <TableRow | |||
| @@ -242,8 +248,10 @@ | |||
| android:inputType="numberDecimal" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| <TableRow | |||
| @@ -273,8 +281,10 @@ | |||
| android:inputType="numberDecimal" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| <TableRow | |||
| @@ -326,8 +336,10 @@ | |||
| android:inputType="numberDecimal" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| <TableRow | |||
| @@ -357,8 +369,10 @@ | |||
| android:inputType="numberDecimal" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| <TableRow | |||
| @@ -410,8 +424,10 @@ | |||
| android:inputType="numberDecimal" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| <TableRow | |||
| @@ -441,8 +457,10 @@ | |||
| android:inputType="numberDecimal" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| <TableRow | |||
| @@ -470,10 +488,13 @@ | |||
| android:ems="10" | |||
| android:gravity="center_vertical" | |||
| android:inputType="numberDecimal" | |||
| android:nextFocusDown="@+id/arrowDiameterTxtFld" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| <TableRow | |||
| @@ -706,6 +727,7 @@ | |||
| android:inputType="numberDecimal" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textAppearance="?android:attr/textAppearanceMediumInverse" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| @@ -737,6 +759,7 @@ | |||
| android:inputType="numberDecimal" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textAppearance="?android:attr/textAppearanceMediumInverse" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| @@ -812,6 +835,7 @@ | |||
| android:paddingTop="9dp" | |||
| android:textSize="18sp" | |||
| android:visibility="invisible" | |||
| android:selectAllOnFocus="true" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </LinearLayout> | |||
| </TableRow> | |||
| @@ -844,6 +868,8 @@ | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:textSize="18sp" | |||
| android:nextFocusDown="@+id/scaHTxtFld" | |||
| android:selectAllOnFocus="true" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| <ch.spherIC.recurvebowsight.components.FontEditText | |||
| @@ -858,6 +884,8 @@ | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:textSize="18sp" | |||
| android:nextFocusDown="@+id/scVertScaleRngTxtFld" | |||
| android:selectAllOnFocus="true" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| @@ -889,6 +917,7 @@ | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:textSize="18sp" | |||
| android:selectAllOnFocus="true" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| @@ -921,6 +950,8 @@ | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:textSize="18sp" | |||
| android:nextFocusDown="@+id/scVvisHTxtFld" | |||
| android:selectAllOnFocus="true" | |||
| app:txtFont="@string/TitilliumWeb_Regular" > | |||
| <requestFocus /> | |||
| @@ -41,7 +41,7 @@ | |||
| android:scrollbars="vertical" > | |||
| <TableRow | |||
| android:id="@+id/tableSCRow1" | |||
| android:id="@+id/tableRCRow1" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_margin="4dp" | |||
| @@ -71,7 +71,7 @@ | |||
| </TableRow> | |||
| <TableRow | |||
| android:id="@+id/tableSCRow2" | |||
| android:id="@+id/tableRCRow2" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_margin="4dp" | |||
| @@ -98,13 +98,14 @@ | |||
| android:inputType="text" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| <TableRow | |||
| android:id="@+id/tableSCRow3" | |||
| android:id="@+id/tableRCRow3" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_margin="4dp" | |||
| @@ -131,13 +132,14 @@ | |||
| android:inputType="text" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| <TableRow | |||
| android:id="@+id/tableSCRow4" | |||
| android:id="@+id/tableRCRow4" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_margin="4dp" | |||
| @@ -165,12 +167,14 @@ | |||
| android:inputType="numberDecimal" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| <TableRow | |||
| android:id="@+id/tableSCRow5" | |||
| android:id="@+id/tableRCRow5" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_margin="4dp" | |||
| @@ -197,13 +201,14 @@ | |||
| android:inputType="numberDecimal" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textAppearance="?android:attr/textAppearanceMediumInverse" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| <TableRow | |||
| android:id="@+id/tableSCRow6" | |||
| android:id="@+id/tableRCRow6" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_margin="4dp" | |||
| @@ -228,8 +233,10 @@ | |||
| android:ems="10" | |||
| android:gravity="center_vertical" | |||
| android:inputType="numberDecimal" | |||
| android:nextFocusDown="@+id/rcManufacturerTxtFld" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textAppearance="?android:attr/textAppearanceMediumInverse" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| @@ -0,0 +1,326 @@ | |||
| <RelativeLayout xmlns:tools="http://schemas.android.com/tools" | |||
| xmlns:android="http://schemas.android.com/apk/res/android" | |||
| xmlns:app="http://schemas.android.com/apk/res/ch.spherIC.recurvebowsight" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="match_parent" | |||
| android:background="@drawable/bg" | |||
| android:gravity="center" > | |||
| <ScrollView | |||
| android:id="@+id/_sightCfgScrollView" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="match_parent" > | |||
| <LinearLayout | |||
| android:id="@+id/_sightConfig" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:orientation="vertical" > | |||
| <ch.spherIC.recurvebowsight.components.FontTextView | |||
| android:id="@+id/_sightConfigTitle" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_margin="4dp" | |||
| android:background="@color/yellow" | |||
| android:paddingBottom="3dp" | |||
| android:paddingLeft="6dp" | |||
| android:paddingTop="3dp" | |||
| android:text="@string/scTitleSightConfig" | |||
| android:textColor="@color/black" | |||
| android:textStyle="bold" | |||
| app:font="@string/TitilliumWeb_Bold" /> | |||
| <TableLayout | |||
| android:id="@+id/_sightConfigTbl" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_weight="1" | |||
| android:gravity="fill_vertical|fill_horizontal" | |||
| android:scrollbarStyle="insideOverlay" | |||
| android:scrollbars="vertical" > | |||
| <TableRow | |||
| android:id="@+id/tableSCCRow1" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_gravity="center" | |||
| android:layout_margin="4dp" > | |||
| <ch.spherIC.recurvebowsight.components.FontTextView | |||
| android:id="@+id/scSightLbl" | |||
| android:layout_width="fill_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_gravity="right|center_vertical" | |||
| android:text="@string/scSightLbl" | |||
| android:textColor="@color/black" | |||
| app:font="@string/TitilliumWeb_Regular" /> | |||
| <ch.spherIC.recurvebowsight.components.SightSpinner | |||
| android:id="@+id/scSightSpinner" | |||
| style="@style/GlassSpinner" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="40dp" | |||
| android:layout_marginLeft="4dp" | |||
| android:layout_weight="1" | |||
| android:gravity="center_vertical" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" /> | |||
| </TableRow> | |||
| <TableRow | |||
| android:id="@+id/tableSCCRow2" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_gravity="center" | |||
| android:layout_margin="4dp" > | |||
| <ch.spherIC.recurvebowsight.components.FontTextView | |||
| android:id="@+id/scManufacturerLbl" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_gravity="right|center_vertical" | |||
| android:gravity="right" | |||
| android:text="@string/scManufacturerLbl" | |||
| android:textColor="@color/black" | |||
| app:font="@string/TitilliumWeb_Regular" /> | |||
| <ch.spherIC.recurvebowsight.components.FontEditText | |||
| android:id="@+id/scManufacturerTxtFld" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="40dp" | |||
| android:layout_marginLeft="4dp" | |||
| android:layout_weight="1" | |||
| android:ems="10" | |||
| android:gravity="center_vertical" | |||
| android:inputType="text" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| <TableRow | |||
| android:id="@+id/tableSCCRow3" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_gravity="center" | |||
| android:layout_margin="4dp" > | |||
| <ch.spherIC.recurvebowsight.components.FontTextView | |||
| android:id="@+id/scModelLbl" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_gravity="right|center_vertical" | |||
| android:gravity="right" | |||
| android:text="@string/scModel" | |||
| android:textColor="@color/black" | |||
| app:font="@string/TitilliumWeb_Regular" /> | |||
| <ch.spherIC.recurvebowsight.components.FontEditText | |||
| android:id="@+id/scModelTxtFld" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="40dp" | |||
| android:layout_marginLeft="4dp" | |||
| android:layout_weight="1" | |||
| android:ems="10" | |||
| android:gravity="center_vertical" | |||
| android:inputType="text" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| <TableRow | |||
| android:id="@+id/tableSCCRow4" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_gravity="center" | |||
| android:layout_margin="4dp" > | |||
| <ch.spherIC.recurvebowsight.components.FontTextView | |||
| android:id="@+id/sccHeVSLbl" | |||
| android:layout_width="fill_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_gravity="right|center_vertical" | |||
| android:text="@string/scHeVSLbl" | |||
| android:textColor="@color/black" | |||
| app:font="@string/TitilliumWeb_Regular" /> | |||
| <ch.spherIC.recurvebowsight.components.FontEditText | |||
| android:id="@+id/sccHeVSTxtFld" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="40dp" | |||
| android:layout_marginLeft="4dp" | |||
| android:layout_weight="1" | |||
| android:ems="10" | |||
| android:inputType="text" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| app:txtFont="@string/TitilliumWeb_Regular" > | |||
| </ch.spherIC.recurvebowsight.components.FontEditText> | |||
| </TableRow> | |||
| <TableRow | |||
| android:id="@+id/tableSCCRow5" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_gravity="center" | |||
| android:layout_margin="4dp" > | |||
| <ch.spherIC.recurvebowsight.components.FontTextView | |||
| android:id="@+id/sccaVLbl" | |||
| android:layout_width="fill_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_gravity="right|center_vertical" | |||
| android:text="@string/scaVLbl" | |||
| android:textColor="@color/black" | |||
| app:font="@string/TitilliumWeb_Regular" /> | |||
| <ch.spherIC.recurvebowsight.components.FontEditText | |||
| android:id="@+id/sccaVTxtFld" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="40dp" | |||
| android:layout_marginLeft="4dp" | |||
| android:layout_weight="1" | |||
| android:ems="10" | |||
| android:gravity="center_vertical" | |||
| android:inputType="numberDecimal" | |||
| android:nextFocusDown="@+id/sccaHTxtFld" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| <ch.spherIC.recurvebowsight.components.FontEditText | |||
| android:id="@+id/sccaHTxtFld" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="40dp" | |||
| android:layout_marginLeft="4dp" | |||
| android:layout_weight="1" | |||
| android:ems="10" | |||
| android:gravity="center_vertical" | |||
| android:inputType="numberDecimal" | |||
| android:nextFocusDown="@+id/scVertScaleRngMinTxtFld" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| <TableRow | |||
| android:id="@+id/tableSCCRow6" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_gravity="center" | |||
| android:layout_margin="4dp" > | |||
| <ch.spherIC.recurvebowsight.components.FontTextView | |||
| android:id="@+id/scVertScaleRngMinLbl" | |||
| android:layout_width="fill_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_gravity="right|center_vertical" | |||
| android:text="@string/scVertScaleRngMinLbl" | |||
| android:textColor="@color/black" | |||
| app:font="@string/TitilliumWeb_Regular" /> | |||
| <ch.spherIC.recurvebowsight.components.FontEditText | |||
| android:id="@+id/scVertScaleRngMinTxtFld" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="40dp" | |||
| android:layout_marginLeft="4dp" | |||
| android:layout_weight="1" | |||
| android:ems="10" | |||
| android:gravity="center_vertical" | |||
| android:inputType="numberDecimal" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| <TableRow | |||
| android:id="@+id/tableSCCRow7" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_gravity="center" | |||
| android:layout_margin="4dp" > | |||
| <ch.spherIC.recurvebowsight.components.FontTextView | |||
| android:id="@+id/scVertScaleRngMaxLbl" | |||
| android:layout_width="fill_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_gravity="right|center_vertical" | |||
| android:text="@string/scVertScaleRngMaxLbl" | |||
| android:textColor="@color/black" | |||
| app:font="@string/TitilliumWeb_Regular" /> | |||
| <ch.spherIC.recurvebowsight.components.FontEditText | |||
| android:id="@+id/scVertScaleRngMaxTxtFld" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="40dp" | |||
| android:layout_marginLeft="4dp" | |||
| android:layout_weight="1" | |||
| android:ems="10" | |||
| android:gravity="center_vertical" | |||
| android:inputType="numberDecimal" | |||
| android:nextFocusDown="@+id/scManufacturerTxtFld" | |||
| android:paddingBottom="9dp" | |||
| android:paddingTop="9dp" | |||
| android:selectAllOnFocus="true" | |||
| android:textSize="18sp" | |||
| app:txtFont="@string/TitilliumWeb_Regular" /> | |||
| </TableRow> | |||
| </TableLayout> | |||
| <LinearLayout | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_margin="8dp" | |||
| android:orientation="horizontal" | |||
| android:paddingTop="10dp" > | |||
| <Button | |||
| android:id="@+id/scBtnNew" | |||
| style="@style/GlassButton" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="40dp" | |||
| android:layout_marginRight="8dp" | |||
| android:layout_weight="1" | |||
| android:text="@string/caption_New" /> | |||
| <Button | |||
| android:id="@+id/scBtnSave" | |||
| style="@style/GlassButton" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="40dp" | |||
| android:layout_marginRight="8dp" | |||
| android:layout_weight="1" | |||
| android:text="@string/caption_Save" /> | |||
| <Button | |||
| android:id="@+id/scBtnDelete" | |||
| style="@style/GlassButton" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="40dp" | |||
| android:layout_weight="1" | |||
| android:text="@string/caption_Delete" /> | |||
| </LinearLayout> | |||
| </LinearLayout> | |||
| </ScrollView> | |||
| </RelativeLayout> | |||
| @@ -5,6 +5,7 @@ | |||
| <string name="title_rbs_main_activity">RBS Berechnung Visiereinstellung</string> | |||
| <string name="title_activity_main_configuration">Konfiguration Bogen/Visier/Ausrüstung</string> | |||
| <string name="title_activity_riser_configuration">Konfiguration Griffstück</string> | |||
| <string name="title_activity_sight_configuration">Konfiguration Visier</string> | |||
| <!-- --> | |||
| <string name="viewParams">Parameter</string> | |||
| <string name="viewResults">Ball. Flugbahn</string> | |||
| @@ -38,6 +39,8 @@ | |||
| <string name="scHeVSLbl">Horz. Einst. Visierschlitten [mm]</string> | |||
| <string name="scaVLbl">aV [mm] / aH [mm]</string> | |||
| <string name="scVertScaleRngLbl">Bereich vert. Skala [mm]</string> | |||
| <string name="scVertScaleRngMinLbl">Min. Bereich vert. Skala [mm]</string> | |||
| <string name="scVertScaleRngMaxLbl">Max. Bereich vert. Skala [mm]</string> | |||
| <string name="scVertSkalaMiddleLbl">Mittelstellung M vert. Skala [mm]</string> | |||
| <string name="scEvSLbl">EvS [mm]</string> | |||
| <!-- --> | |||
| @@ -78,9 +81,13 @@ | |||
| <string name="rcTitleRiserConfig">Konfiguration Griffstück</string> | |||
| <string name="rcRiserLbl">Griffstück</string> | |||
| <string name="rcManufacturerLbl">Hersteller</string> | |||
| <string name="rcModel">Model</string> | |||
| <string name="rcModel">Modell</string> | |||
| <string name="rcSizeLbl">Größe</string> | |||
| <string name="rcVvisHLbl">VvisH [mm]</string> | |||
| <string name="rcVvisVLbl">VvisV [mm]</string> | |||
| <string name="rcVvisVLbl">VvisV [mm]</string> | |||
| <string name="scTitleSightConfig">Konfiguration Visier</string> | |||
| <string name="scManufacturerLbl">Hersteller</string> | |||
| <string name="scModel">Modell</string> | |||
| </resources> | |||
| @@ -5,6 +5,7 @@ | |||
| <string name="title_rbs_main_activity">RBS Sight Setting Calculation</string> | |||
| <string name="title_activity_main_configuration">Riser/Sight/Equipment Configuration</string> | |||
| <string name="title_activity_riser_configuration">Riser Configuration</string> | |||
| <string name="title_activity_sight_configuration">Sight Configuration</string> | |||
| <!-- --> | |||
| <string name="viewParams">Parameters</string> | |||
| <string name="viewResults">Ballistic Trajectory</string> | |||
| @@ -38,6 +39,8 @@ | |||
| <string name="scHeVSLbl">Horz. Sight Sliding Carriage [mm]</string> | |||
| <string name="scaVLbl">aV [mm] / aH [mm]</string> | |||
| <string name="scVertScaleRngLbl">Vert. Scale Range [mm]</string> | |||
| <string name="scVertScaleRngMinLbl">Vert. Scale Range Min. [mm]</string> | |||
| <string name="scVertScaleRngMaxLbl">Vert. Scale Range Max. [mm]</string> | |||
| <string name="scVertSkalaMiddleLbl">Vert. Scale Middle Setting M [mm]</string> | |||
| <string name="scEvSLbl">EvS [mm]</string> | |||
| <!-- --> | |||
| @@ -82,5 +85,8 @@ | |||
| <string name="rcSizeLbl">Size</string> | |||
| <string name="rcVvisHLbl">VvisH [mm]</string> | |||
| <string name="rcVvisVLbl">VvisV [mm]</string> | |||
| <string name="scTitleSightConfig">Sight Configuration</string> | |||
| <string name="scManufacturerLbl">Manufacturer</string> | |||
| <string name="scModel">Model</string> | |||
| </resources> | |||
| @@ -91,7 +91,6 @@ public class RBSMainActivity extends Activity implements ChooseArcherySetupDlgDi | |||
| public static final int DLG_USERGUIDE_SIGHT = 2; | |||
| public static final int DLG_ABOUT = 3; | |||
| private static final long serialVersionUID = 9142533835653341769L; | |||
| private static final Double ANGLE_90 = 90d; | |||
| private static final int MIN_DISTANCE = 50; | |||
| private static final double CENTI = 0.01; | |||
| @@ -66,7 +66,8 @@ public class MainConfigurationActivity extends Activity { | |||
| Intent intent = new Intent(MainConfigurationActivity.this, RiserConfigurationActivity.class); | |||
| startActivityForResult(intent, 1); | |||
| } else if (item[0].equals(getResources().getString(R.string.caption_MainCfg_Sight_MainText))) { | |||
| // | |||
| Intent intent = new Intent(MainConfigurationActivity.this, SightConfigurationActivity.class); | |||
| startActivityForResult(intent, 1); | |||
| } else if (item[0].equals(getResources().getString(R.string.caption_MainCfg_ArcerySetup_MainText))) { | |||
| // | |||
| } | |||
| @@ -0,0 +1,222 @@ | |||
| /** | |||
| * Copyright (C) 2005-2012 XELOG AG | |||
| */ | |||
| package ch.spherIC.recurvebowsight.configuration; | |||
| import android.app.Activity; | |||
| import android.content.pm.ActivityInfo; | |||
| import android.database.sqlite.SQLiteConstraintException; | |||
| import android.os.Bundle; | |||
| import android.view.Gravity; | |||
| import android.view.Menu; | |||
| import android.view.View; | |||
| import android.view.View.OnClickListener; | |||
| import android.widget.AdapterView; | |||
| import android.widget.AdapterView.OnItemSelectedListener; | |||
| import android.widget.Button; | |||
| import android.widget.TextView; | |||
| import android.widget.Toast; | |||
| import ch.spherIC.recurvebowsight.R; | |||
| import ch.spherIC.recurvebowsight.components.FontArrayAdapter; | |||
| import ch.spherIC.recurvebowsight.components.SightSpinner; | |||
| import ch.spherIC.recurvebowsight.database.dao.SightDao; | |||
| import ch.spherIC.recurvebowsight.model.ISight; | |||
| import ch.spherIC.recurvebowsight.model.Sight; | |||
| import ch.spherIC.recurvebowsight.utilities.CompatibilityUtil; | |||
| import java.text.DecimalFormat; | |||
| import java.util.List; | |||
| /** | |||
| * @author FC Smilari | |||
| */ | |||
| public class SightConfigurationActivity extends Activity { | |||
| public static final DecimalFormat DF = new DecimalFormat("0.##"); | |||
| private SightSpinner scSightSpinner; | |||
| private TextView scManufacturerTxtFld; | |||
| private TextView scModelTxtFld; | |||
| private TextView sccHeVSTxtFld; | |||
| private TextView sccaVTxtFld; | |||
| private TextView sccaHTxtFld; | |||
| private TextView scVertScaleRngMinTxtFld; | |||
| private TextView scVertScaleRngMaxTxtFld; | |||
| private Button newBtn; | |||
| private Button saveBtn; | |||
| private Button deleteBtn; | |||
| private ISight selectedSight; | |||
| @Override | |||
| protected void onCreate(final Bundle savedInstanceState) { | |||
| super.onCreate(savedInstanceState); | |||
| setContentView(R.layout.rbs_sight_config); | |||
| if (CompatibilityUtil.isTablet(getApplicationContext())) { | |||
| setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); | |||
| } else { | |||
| setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); | |||
| } | |||
| initializeComponents(); | |||
| addSightSpinnerListener(); | |||
| addButtonListeners(); | |||
| loadSightSpinner(); | |||
| } | |||
| private void loadSightSpinner() { | |||
| List<ISight> sights = SightDao.getInstance().loadAll(); | |||
| this.scSightSpinner.setAdapter(new FontArrayAdapter<ISight>(this, R.layout.rbs_spinner, sights, this.scSightSpinner)); | |||
| } | |||
| private void initializeComponents() { | |||
| this.scSightSpinner = (SightSpinner) findViewById(R.id.scSightSpinner); | |||
| this.scManufacturerTxtFld = (TextView) findViewById(R.id.scManufacturerTxtFld); | |||
| this.scModelTxtFld = (TextView) findViewById(R.id.scModelTxtFld); | |||
| this.sccHeVSTxtFld = (TextView) findViewById(R.id.sccHeVSTxtFld); | |||
| this.sccaVTxtFld = (TextView) findViewById(R.id.sccaVTxtFld); | |||
| this.sccaHTxtFld = (TextView) findViewById(R.id.sccaHTxtFld); | |||
| this.scVertScaleRngMinTxtFld = (TextView) findViewById(R.id.scVertScaleRngMinTxtFld); | |||
| this.scVertScaleRngMaxTxtFld = (TextView) findViewById(R.id.scVertScaleRngMaxTxtFld); | |||
| this.newBtn = (Button) findViewById(R.id.scBtnNew); | |||
| this.saveBtn = (Button) findViewById(R.id.scBtnSave); | |||
| this.deleteBtn = (Button) findViewById(R.id.scBtnDelete); | |||
| } | |||
| private void addSightSpinnerListener() { | |||
| this.scSightSpinner.setOnItemSelectedListener(new OnItemSelectedListener() { | |||
| @Override | |||
| public void onItemSelected(final AdapterView<?> parent, final View view, final int position, | |||
| final long id) { | |||
| ISight sight = SightConfigurationActivity.this.scSightSpinner.getSelectedSight(); | |||
| SightConfigurationActivity.this.scManufacturerTxtFld.setText(sight.getManufacturer()); | |||
| SightConfigurationActivity.this.scModelTxtFld.setText(sight.getModel()); | |||
| SightConfigurationActivity.this.sccHeVSTxtFld.setText(sight.getHeVis()); | |||
| SightConfigurationActivity.this.sccaVTxtFld.setText(DF.format(sight.getAV())); | |||
| SightConfigurationActivity.this.sccaHTxtFld.setText(DF.format(sight.getAH())); | |||
| SightConfigurationActivity.this.scVertScaleRngMinTxtFld.setText(DF.format(sight.getVertSkalaRangeMin())); | |||
| SightConfigurationActivity.this.scVertScaleRngMaxTxtFld.setText(DF.format(sight.getVertSkalaRangeMax())); | |||
| SightConfigurationActivity.this.selectedSight = sight; | |||
| } | |||
| @Override | |||
| public void onNothingSelected(final AdapterView<?> parent) { } | |||
| }); | |||
| } | |||
| private void addButtonListeners() { | |||
| this.newBtn.setOnClickListener(new OnClickListener() { | |||
| @Override | |||
| public void onClick(final View v) { | |||
| onNewSight(); | |||
| } | |||
| }); | |||
| this.saveBtn.setOnClickListener(new OnClickListener() { | |||
| @Override | |||
| public void onClick(final View v) { | |||
| onSaveSight(); | |||
| } | |||
| }); | |||
| this.deleteBtn.setOnClickListener(new OnClickListener() { | |||
| @Override | |||
| public void onClick(final View v) { | |||
| onDeleteSight(); | |||
| } | |||
| }); | |||
| } | |||
| /** | |||
| * Löschen. | |||
| */ | |||
| protected void onDeleteSight() { | |||
| if (this.selectedSight != null) { | |||
| try { | |||
| SightDao.getInstance().delete(this.selectedSight); | |||
| loadSightSpinner(); | |||
| setResult(1); | |||
| } catch (SQLiteConstraintException e) { | |||
| Toast toast = Toast.makeText(this, getResources().getString(R.string.caption_Cfg_DeleteNotPossible), Toast.LENGTH_LONG); | |||
| toast.setGravity(Gravity.CENTER, 0, 0); | |||
| toast.show(); | |||
| } | |||
| } | |||
| } | |||
| /** | |||
| * Speichern. | |||
| */ | |||
| protected void onSaveSight() { | |||
| if (this.selectedSight != null) { | |||
| if (!this.scManufacturerTxtFld.getText().toString().isEmpty() && !this.scModelTxtFld.getText().toString().isEmpty() | |||
| && !this.sccHeVSTxtFld.getText().toString().isEmpty() && !this.sccaVTxtFld.getText().toString().isEmpty() | |||
| && !this.sccaHTxtFld.getText().toString().isEmpty() && !this.scVertScaleRngMinTxtFld.getText().toString().isEmpty() | |||
| && !this.scVertScaleRngMaxTxtFld.getText().toString().isEmpty()) { | |||
| this.selectedSight.setManufacturer(this.scManufacturerTxtFld.getText().toString()); | |||
| this.selectedSight.setModel(this.scModelTxtFld.getText().toString()); | |||
| this.selectedSight.setHeVis(this.sccHeVSTxtFld.getText().toString()); | |||
| this.selectedSight.setAV(Double.valueOf(this.sccaVTxtFld.getText().toString())); | |||
| this.selectedSight.setAH(Double.valueOf(this.sccaHTxtFld.getText().toString())); | |||
| this.selectedSight.setVertSkalaRangeMin(Double.valueOf(this.scVertScaleRngMinTxtFld.getText().toString())); | |||
| this.selectedSight.setVertSkalaRangeMax(Double.valueOf(this.scVertScaleRngMaxTxtFld.getText().toString())); | |||
| if (this.selectedSight.getId() > 0) { | |||
| SightDao.getInstance().update(this.selectedSight); | |||
| } else { | |||
| this.selectedSight = SightDao.getInstance().insert(this.selectedSight); | |||
| loadSightSpinner(); | |||
| this.scSightSpinner.setSelectedSight(this.selectedSight); | |||
| } | |||
| setResult(1); | |||
| } else { | |||
| Toast toast = Toast.makeText(this, getResources().getString(R.string.caption_Cfg_FillAllMandatoryFields), Toast.LENGTH_LONG); | |||
| toast.setGravity(Gravity.CENTER, 0, 0); | |||
| toast.show(); | |||
| } | |||
| } | |||
| } | |||
| /** | |||
| * Einfügen. | |||
| */ | |||
| @SuppressWarnings("unchecked") | |||
| protected void onNewSight() { | |||
| ISight newSight = new Sight(0, "*", "*", 0d, 0d, "", 0d, 0d); | |||
| this.selectedSight = newSight; | |||
| ((FontArrayAdapter<ISight>) this.scSightSpinner.getAdapter()).add(newSight); | |||
| this.scSightSpinner.setSelectedSight(newSight); | |||
| this.scManufacturerTxtFld.setText(""); | |||
| this.scModelTxtFld.setText(""); | |||
| this.sccHeVSTxtFld.setText(""); | |||
| this.sccaVTxtFld.setText(""); | |||
| this.sccaHTxtFld.setText(""); | |||
| this.scVertScaleRngMinTxtFld.setText(""); | |||
| this.scVertScaleRngMaxTxtFld.setText(""); | |||
| } | |||
| @Override | |||
| public boolean onCreateOptionsMenu(final Menu menu) { | |||
| getMenuInflater().inflate(R.menu.rbs_info_menu, menu); | |||
| return super.onCreateOptionsMenu(menu); | |||
| } | |||
| } | |||