/*
 * Copyright (C) 2014 De'vID jonpIn (David Yonge-Mallo)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.tlhInganHol.android.klingonassistant;

import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;

/** Displays the prefix chart. */
public class PrefixChartActivity extends BaseActivity {
  // private static final String TAG = "PrefixChartActivity";

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());

    if (sharedPrefs.getBoolean(
        Preferences.KEY_KLINGON_UI_CHECKBOX_PREFERENCE, /* default */ false)) {
      setDrawerContentView(R.layout.prefix_chart_tlh);
    } else {
      setDrawerContentView(R.layout.prefix_chart);
    }
  }

  @Override
  public void onBackPressed() {
    super.onBackPressed();
    overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_right);
  }
}

@@ -709,16 +709,88 @@
 rences;%0A
+import android.content.res.Resources;%0Aimport android.graphics.Typeface;%0A
 import a
@@ -1223,12 +1223,31 @@
     
-if (
+boolean useKlingonUI = 
 shar
@@ -1342,16 +1342,38 @@
 / false)
+;%0A    if (useKlingonUI
 ) %7B%0A    
@@ -1492,16 +1492,891 @@
 );%0A    %7D
+%0A%0A    Resources resources = getResources();%0A    JellyBeanSpanFixTextView entryTitle = (JellyBeanSpanFixTextView) findViewById(R.id.entry_title);%0A%0A    // Set the title.%0A    entryTitle.invalidate();%0A    if (useKlingonUI) %7B%0A      if (sharedPrefs.getBoolean(%0A          Preferences.KEY_KLINGON_FONT_CHECKBOX_PREFERENCE, /* default */ false)) %7B%0A        // Klingon (in %7BpIqaD%7D).%0A        entryTitle.setTypeface(KlingonAssistant.getKlingonFontTypeface(getBaseContext()));%0A        entryTitle.setText(KlingonContentProvider.convertStringToKlingonFont(%0A            resources.getString(R.string.menu_prefix_chart_tlh)));%0A      %7D else %7B%0A        // Klingon (but in Latin).%0A        entryTitle.setText(resources.getString(R.string.menu_prefix_chart_tlh));%0A      %7D%0A    %7D else %7B%0A      // Title in system language.%0A      entryTitle.setText(resources.getString(R.string.menu_prefix_chart));%0A    %7D
 %0A  %7D%0A%0A  

fix prefix chart title in {pIqaD} mode (issue #334)