Menu button fix.

This commit is contained in:
Rashiq Ahmad 2013-12-20 17:36:58 +01:00
parent f8675cf783
commit 760b446daa
2 changed files with 13 additions and 0 deletions

View File

@ -807,6 +807,10 @@ public class KiwixMobileFragment extends Fragment {
} else { } else {
getActivity().finish(); getActivity().finish();
} }
break;
case KeyEvent.KEYCODE_MENU:
getActivity().openOptionsMenu();
break;
} }
} }
} }

View File

@ -26,11 +26,17 @@ import android.graphics.Typeface;
import android.os.Handler; import android.os.Handler;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.util.Log;
import android.util.TypedValue; import android.util.TypedValue;
import android.view.InflateException; import android.view.InflateException;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.ArrayList; import java.util.ArrayList;
@ -207,6 +213,8 @@ public class LanguageUtils {
@Override @Override
public View onCreateView(String name, Context context, AttributeSet attrs) { public View onCreateView(String name, Context context, AttributeSet attrs) {
Log.e("kiwix1", name);
// Apply the custom font, if the xml tag equals "TextView", "EditText" or "AutoCompleteTextView" // Apply the custom font, if the xml tag equals "TextView", "EditText" or "AutoCompleteTextView"
if (name.equalsIgnoreCase("TextView") if (name.equalsIgnoreCase("TextView")
|| name.equalsIgnoreCase("EditText") || name.equalsIgnoreCase("EditText")
@ -236,6 +244,7 @@ public class LanguageUtils {
} }
} }
return null; return null;
} }