Added logging.

This commit is contained in:
Rashiq Ahmad 2013-12-20 20:19:05 +01:00
parent e0f774fec8
commit 896d8b8596

View File

@ -31,12 +31,7 @@ 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;
@ -213,8 +208,6 @@ 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")
@ -228,8 +221,9 @@ public class LanguageUtils {
TextView textView = ((TextView) view); TextView textView = ((TextView) view);
// Set the custom typeface // Set the custom typeface
textView.setTypeface(Typeface.createFromAsset( textView.setTypeface(
mContext.getAssets(), getTypeface())); Typeface.createFromAsset(mContext.getAssets(), getTypeface()));
Log.d("kiwix", "Applying custom font");
// Reduce the text size // Reduce the text size
textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, textView.getTextSize() - 3f); textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, textView.getTextSize() - 3f);
@ -239,9 +233,10 @@ public class LanguageUtils {
return view; return view;
} catch (InflateException e) { } catch (InflateException e) {
Log.e("kiwix", "Could not apply the custom font");
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
Log.e("kiwix", "Could not apply the custom font");
} }
} }