package org.team1515.morscout.fragment.main;

import android.graphics.Typeface;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import org.team1515.morscout.R;

public class HomeFragment extends Fragment {
    TextView title;
    TextView message;

    Typeface Exo2_thin;
    Typeface Exo2_light;

    String[] msgs = {"Welcome to MorScout!", "OurScout is MorScout Than YourScout", "Made With Fifty Shades of Orange", "MorPower, MorTeamwork, MorIngenuity, MorScout", "LessWork, MorScout"};
    int randIndex;

    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_home, container, false);

        randIndex = (int) Math.floor(Math.random() * msgs.length);

        Exo2_thin = Typeface.createFromAsset(getActivity().getAssets(), "Exo2-Thin.ttf");
        Exo2_light = Typeface.createFromAsset(getActivity().getAssets(), "Exo2-Light.ttf");

        title = (TextView) view.findViewById(R.id.home_title);
        title.setTypeface(Exo2_light);

        message = (TextView) view.findViewById(R.id.home_message);
        message.setTypeface(Exo2_thin);
        message.setText(msgs[randIndex]);

        return view;
    }
}

@@ -139,16 +139,52 @@
 agment;%0A
+import android.util.DisplayMetrics;%0A
 import a
@@ -379,24 +379,66 @@
 gment %7B%0A    
+private int titleWidth = 70;%0A%0A    private 
 TextView tit
@@ -445,16 +445,24 @@
 le;%0A    
+private 
 TextView
@@ -472,24 +472,32 @@
 ssage;%0A%0A    
+private 
 Typeface Exo
@@ -508,16 +508,24 @@
 in;%0A    
+private 
 Typeface
@@ -542,16 +542,24 @@
 t;%0A%0A    
+private 
 String%5B%5D
@@ -742,16 +742,24 @@
 %22%7D;%0A    
+private 
 int rand
@@ -1451,24 +1451,348 @@
 ndIndex%5D);%0A%0A
+        DisplayMetrics displayMetrics = getContext().getResources().getDisplayMetrics();%0A        float screenWidth = displayMetrics.widthPixels;%0A        title.measure(0, 0);%0A        while(title.getMeasuredWidth() %3E screenWidth - 20) %7B%0A            title.measure(0, 0);%0A            title.setTextSize(--titleWidth);%0A        %7D%0A%0A
         retu

Fix title width on weird screen resolutions.