Back to project page Android-Apps.
The source code is released under:
Apache License
If you think the Android project Android-Apps listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.kniezrec.voiceremote2; //from ww w .j ava 2s . c o m import com.kniezrec.voiceremote2.R; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.support.v4.app.Fragment; import android.text.Html; import android.text.Html.ImageGetter; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; public class HelpFragment extends Fragment { static ImageGetter imgGetter; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View fragView = inflater.inflate(R.layout.activity_help, null); TextView help = (TextView) fragView.findViewById(R.id.helpTextV); String _help = getResources().getString(R.string.helpText); imgGetter = new Html.ImageGetter() { @Override public Drawable getDrawable(String source) { int id; if (source.equals("left.png")) { id = R.drawable.left; } else if (source.equals("hdmi.png")) { id = R.drawable.hdmi; } else if (source.equals("src.png")) { id = R.drawable.src; } else if (source.equals("chlist.png")) { id = R.drawable.chlist; } else if (source.equals("stop.png")) { id = R.drawable.stop; } else if (source.equals("right.png")) { id = R.drawable.right; } else if (source.equals("enter.png")) { id = R.drawable.enter; } else { return null; } Drawable d = getResources().getDrawable(id); d.setBounds(0, 0, d.getIntrinsicWidth(), d.getIntrinsicHeight()); return d; } }; help.setText(Html.fromHtml(_help, imgGetter, null)); return fragView; } }