SHOW:
|
|
- or go back to the newest paste.
1 | import android.os.Bundle; | |
2 | import android.support.v4.app.Fragment; | |
3 | import android.text.method.LinkMovementMethod; | |
4 | import android.view.LayoutInflater; | |
5 | import android.view.View; | |
6 | import android.view.ViewGroup; | |
7 | import android.widget.TextView; | |
8 | ||
9 | public class AboutFragment extends Fragment { | |
10 | - | private Activity activity; |
10 | + | private Activity activity; |
11 | - | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){ |
11 | + | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){ |
12 | View inflated = inflater.inflate(R.layout.about_fragment, container, false); | |
13 | - | View inflated = inflater.inflate(R.layout.about_fragment, container, false); |
13 | + | TextView ToS = (TextView)inflated.findViewById(R.id.ToS); |
14 | - | TextView ToS = (TextView)inflated.findViewById(R.id.ToS); |
14 | + | final LinkMovementMethod lmm = LinkMovementMethod.getInstance(); |
15 | - | ToS.setMovementMethod(LinkMovementMethod.getInstance()); |
15 | + | if (lmm != null) ToS.setMovementMethod(LinkMovementMethod.getInstance()); |
16 | - | return inflated; |
16 | + | return inflated; |
17 | } | |
18 | - | } |
18 | + |