| <ImageView | <ImageView | ||||
| android:id="@+id/ug_image" | android:id="@+id/ug_image" | ||||
| android:layout_width="match_parent" | |||||
| android:layout_width="wrap_content" | |||||
| android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
| android:layout_gravity="center_horizontal" | |||||
| android:layout_marginBottom="5dp" | android:layout_marginBottom="5dp" | ||||
| android:adjustViewBounds="true" | android:adjustViewBounds="true" | ||||
| android:background="@color/gray_dark" | android:background="@color/gray_dark" |
| <string name="AppVersionLabel">Version:</string> | <string name="AppVersionLabel">Version:</string> | ||||
| <string name="about_DevelopedBy">Entwickelt von spherIC (F. Smilari)\nMail an: | <string name="about_DevelopedBy">Entwickelt von spherIC (F. Smilari)\nMail an: | ||||
| merlin868@hotmail.com\n\nÜbersetzt von spherIC (F. Smilari)</string> | merlin868@hotmail.com\n\nÜbersetzt von spherIC (F. Smilari)</string> | ||||
| <!-- --> | |||||
| <string name="ug_UserguideParams_Add1"> | |||||
| %1$s:\nDie einzelnen Punkte der Flugbahnkurve werden im eingestellten Intervall berechnet. Ein kleinerer Intervall führt zu einer genaueren Flugbahn, hat aber zur Folge, dass die Berechnung länger dauert. | |||||
| </string> | |||||
| <string name="ug_UserguideParams_Add2"> | |||||
| %1$s:\nDieser Wert bestimmt wie genau der resultierende Höhenunterschied zwischen Bogen und Ziel berechnet wird. Ein kleinerer Wert führt zu einer genaueren Flugbahn, hat aber zur Folge, dass die Berechnung länger dauert. | |||||
| </string> | |||||
| </resources> | </resources> |
| <string name="AppVersionLabel">Version:</string> | <string name="AppVersionLabel">Version:</string> | ||||
| <string name="about_DevelopedBy">Developed by spherIC (F. Smilari)\nMail to: | <string name="about_DevelopedBy">Developed by spherIC (F. Smilari)\nMail to: | ||||
| merlin868@hotmail.com\n\nTranslated by spherIC (F. Smilari)</string> | merlin868@hotmail.com\n\nTranslated by spherIC (F. Smilari)</string> | ||||
| <!-- --> | |||||
| <string name="ug_UserguideParams_Add1"> | |||||
| %1$s:\nThe single points of the ballistic trajectory are calculated with this time interval to eachn other. A lower value will result in a more accurate ballistic trajectory but also slows down the calculation time. | |||||
| </string> | |||||
| <string name="ug_UserguideParams_Add2"> | |||||
| %1$s:\n.This value determines the calculation precision of the difference between bow and target. A lower value will result in a more accurate ballistic trajectory but also slows down the calculation time. | |||||
| </string> | |||||
| </resources> | </resources> |
| <item>0.1</item> | <item>0.1</item> | ||||
| </string-array> | </string-array> | ||||
| <string name="caption_UserguideParams">1. %1$s\n2. %2$s\n3. %3$s\n4. %4$s\n5. %5$s\n6. %6$s\n7. %7$s\n</string> | |||||
| <string name="caption_UserguideParams">1. %1$s\n2. %2$s\n3. %3$s\n4. %4$s\n5. %5$s\n6. %6$s\n7. %7$s\n\n%8$s\n\n%9$s</string> | |||||
| </resources> | </resources> |
| dlg = createUserguideParamsDialog(parent); | dlg = createUserguideParamsDialog(parent); | ||||
| break; | break; | ||||
| case RBSMainActivity.DLG_USERGUIDE_RISER_CFG: | |||||
| dlg = createUserguideRiserDialog(parent); | |||||
| break; | |||||
| default: | default: | ||||
| dlg = null; | dlg = null; | ||||
| break; | break; | ||||
| parent.getResources().getString(R.string.ashNA), | parent.getResources().getString(R.string.ashNA), | ||||
| parent.getResources().getString(R.string.bowPulloutLbl), | parent.getResources().getString(R.string.bowPulloutLbl), | ||||
| parent.getResources().getString(R.string.asNockRaising), | parent.getResources().getString(R.string.asNockRaising), | ||||
| parent.getResources().getString(R.string.asBraceHeight))); | |||||
| parent.getResources().getString(R.string.asBraceHeight), | |||||
| parent.getResources().getString(R.string.ug_UserguideParams_Add1, parent.getResources().getString(R.string.deltaTimeLbl)), | |||||
| parent.getResources().getString(R.string.ug_UserguideParams_Add2, parent.getResources().getString(R.string.calcPrecisionLbl)))); | |||||
| ((Button) dialog.findViewById(R.id.btn_ugClose)).setOnClickListener(new OnClickListener() { | |||||
| @Override | |||||
| public void onClick(final View v) { | |||||
| dialog.dismiss(); | |||||
| } | |||||
| }); | |||||
| return dialog; | |||||
| } | |||||
| /** | |||||
| * @param parent | |||||
| * | |||||
| * @return | |||||
| */ | |||||
| private static Dialog createUserguideRiserDialog(final Activity parent) { | |||||
| final Dialog dialog = new Dialog(parent); | |||||
| dialog.setContentView(R.layout.rbs_userguide_dialog); | |||||
| dialog.setTitle(parent.getResources().getText(R.string.menuUserGuide).toString()); | |||||
| ImageView image = (ImageView) dialog.findViewById(R.id.ug_image); | |||||
| image.setImageResource(R.drawable.userguide_riser); | |||||
| // TextView text = (TextView) dialog.findViewById(R.id.ug_txt_HowTo); | |||||
| // text.setText(parent.getResources().getString(R.string.caption_UserguideParams, parent.getResources().getString(R.string.arrowNockHeightLbl), | |||||
| // parent.getResources().getString(R.string.targetCenterHeightLbl), | |||||
| // parent.getResources().getString(R.string.shootingDistanzLbl), | |||||
| // parent.getResources().getString(R.string.ashNA), | |||||
| // parent.getResources().getString(R.string.bowPulloutLbl), | |||||
| // parent.getResources().getString(R.string.asNockRaising), | |||||
| // parent.getResources().getString(R.string.asBraceHeight), | |||||
| // parent.getResources().getString(R.string.ug_UserguideParams_Add1, parent.getResources().getString(R.string.deltaTimeLbl)), | |||||
| // parent.getResources().getString(R.string.ug_UserguideParams_Add2, parent.getResources().getString(R.string.calcPrecisionLbl)))); | |||||
| ((Button) dialog.findViewById(R.id.btn_ugClose)).setOnClickListener(new OnClickListener() { | ((Button) dialog.findViewById(R.id.btn_ugClose)).setOnClickListener(new OnClickListener() { | ||||
| private void loadRiserSpinner() { | private void loadRiserSpinner() { | ||||
| List<IRiser> risers = RiserDao.getInstance().loadAll(); | List<IRiser> risers = RiserDao.getInstance().loadAll(); | ||||
| this.rcRiserSpinner.setAdapter(new FontArrayAdapter<IRiser>(this, R.layout.rbs_spinner, risers, this.rcRiserSpinner)); | |||||
| this.rcRiserSpinner.setAdapter(new FontArrayAdapter<IRiser>(this, R.layout.rbs_spinner, risers, | |||||
| this.rcRiserSpinner)); | |||||
| } | } | ||||
| private void initializeComponents() { | private void initializeComponents() { | ||||
| showDialog(RBSMainActivity.DLG_ABOUT); | showDialog(RBSMainActivity.DLG_ABOUT); | ||||
| return true; | return true; | ||||
| case R.id.itemUserGuide: | |||||
| showDialog(RBSMainActivity.DLG_USERGUIDE_RISER_CFG); | |||||
| return true; | |||||
| default: | default: | ||||
| return super.onOptionsItemSelected(item); | return super.onOptionsItemSelected(item); |