| </activity> | </activity> | ||||
| <activity | <activity | ||||
| android:name="ch.spherIC.recurvebowsight.configuration.MainConfigurationActivity" | 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> | ||||
| <activity | <activity | ||||
| android:name="ch.spherIC.recurvebowsight.configuration.RiserConfigurationActivity" | 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> | </activity> | ||||
| </application> | </application> | ||||
| android:inputType="numberDecimal" | android:inputType="numberDecimal" | ||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:selectAllOnFocus="true" | |||||
| android:textSize="18sp" | android:textSize="18sp" | ||||
| android:typeface="sans" | android:typeface="sans" | ||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| </TableRow> | </TableRow> | ||||
| <TableRow | <TableRow | ||||
| android:inputType="numberDecimal" | android:inputType="numberDecimal" | ||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:selectAllOnFocus="true" | |||||
| android:textSize="18sp" | android:textSize="18sp" | ||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| </TableRow> | </TableRow> | ||||
| <TableRow | <TableRow | ||||
| android:inputType="numberDecimal" | android:inputType="numberDecimal" | ||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:selectAllOnFocus="true" | |||||
| android:textSize="18sp" | android:textSize="18sp" | ||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| </TableRow> | </TableRow> | ||||
| <TableRow | <TableRow | ||||
| android:inputType="numberDecimal" | android:inputType="numberDecimal" | ||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:selectAllOnFocus="true" | |||||
| android:textSize="18sp" | android:textSize="18sp" | ||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| </TableRow> | </TableRow> | ||||
| <TableRow | <TableRow | ||||
| android:inputType="numberDecimal" | android:inputType="numberDecimal" | ||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:selectAllOnFocus="true" | |||||
| android:textSize="18sp" | android:textSize="18sp" | ||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| </TableRow> | </TableRow> | ||||
| <TableRow | <TableRow | ||||
| android:inputType="numberDecimal" | android:inputType="numberDecimal" | ||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:selectAllOnFocus="true" | |||||
| android:textSize="18sp" | android:textSize="18sp" | ||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| </TableRow> | </TableRow> | ||||
| <TableRow | <TableRow | ||||
| android:inputType="numberDecimal" | android:inputType="numberDecimal" | ||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:selectAllOnFocus="true" | |||||
| android:textSize="18sp" | android:textSize="18sp" | ||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| </TableRow> | </TableRow> | ||||
| <TableRow | <TableRow | ||||
| android:inputType="numberDecimal" | android:inputType="numberDecimal" | ||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:selectAllOnFocus="true" | |||||
| android:textSize="18sp" | android:textSize="18sp" | ||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| </TableRow> | </TableRow> | ||||
| <TableRow | <TableRow | ||||
| android:inputType="numberDecimal" | android:inputType="numberDecimal" | ||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:selectAllOnFocus="true" | |||||
| android:textSize="18sp" | android:textSize="18sp" | ||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| </TableRow> | </TableRow> | ||||
| <TableRow | <TableRow | ||||
| android:ems="10" | android:ems="10" | ||||
| android:gravity="center_vertical" | android:gravity="center_vertical" | ||||
| android:inputType="numberDecimal" | android:inputType="numberDecimal" | ||||
| android:nextFocusDown="@+id/arrowDiameterTxtFld" | |||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:selectAllOnFocus="true" | |||||
| android:textSize="18sp" | android:textSize="18sp" | ||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| </TableRow> | </TableRow> | ||||
| <TableRow | <TableRow | ||||
| android:inputType="numberDecimal" | android:inputType="numberDecimal" | ||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:selectAllOnFocus="true" | |||||
| android:textAppearance="?android:attr/textAppearanceMediumInverse" | android:textAppearance="?android:attr/textAppearanceMediumInverse" | ||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| </TableRow> | </TableRow> | ||||
| android:inputType="numberDecimal" | android:inputType="numberDecimal" | ||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:selectAllOnFocus="true" | |||||
| android:textAppearance="?android:attr/textAppearanceMediumInverse" | android:textAppearance="?android:attr/textAppearanceMediumInverse" | ||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| </TableRow> | </TableRow> | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:textSize="18sp" | android:textSize="18sp" | ||||
| android:visibility="invisible" | android:visibility="invisible" | ||||
| android:selectAllOnFocus="true" | |||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| </LinearLayout> | </LinearLayout> | ||||
| </TableRow> | </TableRow> | ||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:textSize="18sp" | android:textSize="18sp" | ||||
| android:nextFocusDown="@+id/scaHTxtFld" | |||||
| android:selectAllOnFocus="true" | |||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| <ch.spherIC.recurvebowsight.components.FontEditText | <ch.spherIC.recurvebowsight.components.FontEditText | ||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:textSize="18sp" | android:textSize="18sp" | ||||
| android:nextFocusDown="@+id/scVertScaleRngTxtFld" | |||||
| android:selectAllOnFocus="true" | |||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| </TableRow> | </TableRow> | ||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:textSize="18sp" | android:textSize="18sp" | ||||
| android:selectAllOnFocus="true" | |||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| </TableRow> | </TableRow> | ||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:textSize="18sp" | android:textSize="18sp" | ||||
| android:nextFocusDown="@+id/scVvisHTxtFld" | |||||
| android:selectAllOnFocus="true" | |||||
| app:txtFont="@string/TitilliumWeb_Regular" > | app:txtFont="@string/TitilliumWeb_Regular" > | ||||
| <requestFocus /> | <requestFocus /> |
| android:scrollbars="vertical" > | android:scrollbars="vertical" > | ||||
| <TableRow | <TableRow | ||||
| android:id="@+id/tableSCRow1" | |||||
| android:id="@+id/tableRCRow1" | |||||
| android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
| android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
| android:layout_margin="4dp" | android:layout_margin="4dp" | ||||
| </TableRow> | </TableRow> | ||||
| <TableRow | <TableRow | ||||
| android:id="@+id/tableSCRow2" | |||||
| android:id="@+id/tableRCRow2" | |||||
| android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
| android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
| android:layout_margin="4dp" | android:layout_margin="4dp" | ||||
| android:inputType="text" | android:inputType="text" | ||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:selectAllOnFocus="true" | |||||
| android:textSize="18sp" | android:textSize="18sp" | ||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| </TableRow> | </TableRow> | ||||
| <TableRow | <TableRow | ||||
| android:id="@+id/tableSCRow3" | |||||
| android:id="@+id/tableRCRow3" | |||||
| android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
| android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
| android:layout_margin="4dp" | android:layout_margin="4dp" | ||||
| android:inputType="text" | android:inputType="text" | ||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:selectAllOnFocus="true" | |||||
| android:textSize="18sp" | android:textSize="18sp" | ||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| </TableRow> | </TableRow> | ||||
| <TableRow | <TableRow | ||||
| android:id="@+id/tableSCRow4" | |||||
| android:id="@+id/tableRCRow4" | |||||
| android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
| android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
| android:layout_margin="4dp" | android:layout_margin="4dp" | ||||
| android:inputType="numberDecimal" | android:inputType="numberDecimal" | ||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:selectAllOnFocus="true" | |||||
| android:textSize="18sp" | android:textSize="18sp" | ||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| </TableRow> | </TableRow> | ||||
| <TableRow | <TableRow | ||||
| android:id="@+id/tableSCRow5" | |||||
| android:id="@+id/tableRCRow5" | |||||
| android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
| android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
| android:layout_margin="4dp" | android:layout_margin="4dp" | ||||
| android:inputType="numberDecimal" | android:inputType="numberDecimal" | ||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:selectAllOnFocus="true" | |||||
| android:textAppearance="?android:attr/textAppearanceMediumInverse" | android:textAppearance="?android:attr/textAppearanceMediumInverse" | ||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| </TableRow> | </TableRow> | ||||
| <TableRow | <TableRow | ||||
| android:id="@+id/tableSCRow6" | |||||
| android:id="@+id/tableRCRow6" | |||||
| android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
| android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
| android:layout_margin="4dp" | android:layout_margin="4dp" | ||||
| android:ems="10" | android:ems="10" | ||||
| android:gravity="center_vertical" | android:gravity="center_vertical" | ||||
| android:inputType="numberDecimal" | android:inputType="numberDecimal" | ||||
| android:nextFocusDown="@+id/rcManufacturerTxtFld" | |||||
| android:paddingBottom="9dp" | android:paddingBottom="9dp" | ||||
| android:paddingTop="9dp" | android:paddingTop="9dp" | ||||
| android:selectAllOnFocus="true" | |||||
| android:textAppearance="?android:attr/textAppearanceMediumInverse" | android:textAppearance="?android:attr/textAppearanceMediumInverse" | ||||
| app:txtFont="@string/TitilliumWeb_Regular" /> | app:txtFont="@string/TitilliumWeb_Regular" /> | ||||
| <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> |
| <string name="title_rbs_main_activity">RBS Berechnung Visiereinstellung</string> | <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_main_configuration">Konfiguration Bogen/Visier/Ausrüstung</string> | ||||
| <string name="title_activity_riser_configuration">Konfiguration Griffstück</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="viewParams">Parameter</string> | ||||
| <string name="viewResults">Ball. Flugbahn</string> | <string name="viewResults">Ball. Flugbahn</string> | ||||
| <string name="scHeVSLbl">Horz. Einst. Visierschlitten [mm]</string> | <string name="scHeVSLbl">Horz. Einst. Visierschlitten [mm]</string> | ||||
| <string name="scaVLbl">aV [mm] / aH [mm]</string> | <string name="scaVLbl">aV [mm] / aH [mm]</string> | ||||
| <string name="scVertScaleRngLbl">Bereich vert. Skala [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="scVertSkalaMiddleLbl">Mittelstellung M vert. Skala [mm]</string> | ||||
| <string name="scEvSLbl">EvS [mm]</string> | <string name="scEvSLbl">EvS [mm]</string> | ||||
| <!-- --> | <!-- --> | ||||
| <string name="rcTitleRiserConfig">Konfiguration Griffstück</string> | <string name="rcTitleRiserConfig">Konfiguration Griffstück</string> | ||||
| <string name="rcRiserLbl">Griffstück</string> | <string name="rcRiserLbl">Griffstück</string> | ||||
| <string name="rcManufacturerLbl">Hersteller</string> | <string name="rcManufacturerLbl">Hersteller</string> | ||||
| <string name="rcModel">Model</string> | |||||
| <string name="rcModel">Modell</string> | |||||
| <string name="rcSizeLbl">Größe</string> | <string name="rcSizeLbl">Größe</string> | ||||
| <string name="rcVvisHLbl">VvisH [mm]</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> | </resources> |
| <string name="title_rbs_main_activity">RBS Sight Setting Calculation</string> | <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_main_configuration">Riser/Sight/Equipment Configuration</string> | ||||
| <string name="title_activity_riser_configuration">Riser 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="viewParams">Parameters</string> | ||||
| <string name="viewResults">Ballistic Trajectory</string> | <string name="viewResults">Ballistic Trajectory</string> | ||||
| <string name="scHeVSLbl">Horz. Sight Sliding Carriage [mm]</string> | <string name="scHeVSLbl">Horz. Sight Sliding Carriage [mm]</string> | ||||
| <string name="scaVLbl">aV [mm] / aH [mm]</string> | <string name="scaVLbl">aV [mm] / aH [mm]</string> | ||||
| <string name="scVertScaleRngLbl">Vert. Scale Range [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="scVertSkalaMiddleLbl">Vert. Scale Middle Setting M [mm]</string> | ||||
| <string name="scEvSLbl">EvS [mm]</string> | <string name="scEvSLbl">EvS [mm]</string> | ||||
| <!-- --> | <!-- --> | ||||
| <string name="rcSizeLbl">Size</string> | <string name="rcSizeLbl">Size</string> | ||||
| <string name="rcVvisHLbl">VvisH [mm]</string> | <string name="rcVvisHLbl">VvisH [mm]</string> | ||||
| <string name="rcVvisVLbl">VvisV [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> | </resources> |
| public static final int DLG_USERGUIDE_SIGHT = 2; | public static final int DLG_USERGUIDE_SIGHT = 2; | ||||
| public static final int DLG_ABOUT = 3; | public static final int DLG_ABOUT = 3; | ||||
| private static final long serialVersionUID = 9142533835653341769L; | |||||
| private static final Double ANGLE_90 = 90d; | private static final Double ANGLE_90 = 90d; | ||||
| private static final int MIN_DISTANCE = 50; | private static final int MIN_DISTANCE = 50; | ||||
| private static final double CENTI = 0.01; | private static final double CENTI = 0.01; |
| Intent intent = new Intent(MainConfigurationActivity.this, RiserConfigurationActivity.class); | Intent intent = new Intent(MainConfigurationActivity.this, RiserConfigurationActivity.class); | ||||
| startActivityForResult(intent, 1); | startActivityForResult(intent, 1); | ||||
| } else if (item[0].equals(getResources().getString(R.string.caption_MainCfg_Sight_MainText))) { | } 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))) { | } else if (item[0].equals(getResources().getString(R.string.caption_MainCfg_ArcerySetup_MainText))) { | ||||
| // | // | ||||
| } | } |
| /** | |||||
| * 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); | |||||
| } | |||||
| } |