Exemplo n.º 1
0
 public static String getNameToDisplay(LocalIndexInfo child, OsmandActionBarActivity activity) {
   String mapName =
       FileNameTranslationHelper.getFileName(
           activity,
           activity.getMyApplication().getResourceManager().getOsmandRegions(),
           child.getFileName());
   return mapName;
 }
Exemplo n.º 2
0
  @Override
  public void onCreate(Bundle icicle) {
    ((OsmandApplication) getApplication()).applyTheme(this);
    super.onCreate(icicle);
    if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
      getWindow().setUiOptions(ActivityInfo.UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW);
    }
    getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);

    final OsmandApplication app = ((OsmandApplication) getApplication());

    LinearLayout gl = new LinearLayout(this);
    gl.setOrientation(LinearLayout.VERTICAL);
    gl.setPadding(3, 3, 3, 3);

    TextView tv = new TextView(this);
    tv.setText(
        "Tap a button and listen to the corresponding voice prompt to identify missing or faulty propmts.");
    tv.setPadding(0, 5, 0, 7);

    ScrollView sv = new ScrollView(this);
    gl.addView(
        sv,
        new LayoutParams(
            android.view.ViewGroup.LayoutParams.FILL_PARENT,
            android.view.ViewGroup.LayoutParams.FILL_PARENT));
    final LinearLayout ll = new LinearLayout(this);
    ll.setOrientation(LinearLayout.VERTICAL);
    sv.addView(
        ll,
        new LayoutParams(
            android.view.ViewGroup.LayoutParams.FILL_PARENT,
            android.view.ViewGroup.LayoutParams.FILL_PARENT));

    // add buttons
    setContentView(gl);
    getSupportActionBar().setTitle(R.string.test_voice_prompts);

    selectVoice(ll);
  }