当前位置: 首页>>代码示例>>Java>>正文


Java HtmlTextView.setHtmlFromString方法代码示例

本文整理汇总了Java中org.sufficientlysecure.htmltextview.HtmlTextView.setHtmlFromString方法的典型用法代码示例。如果您正苦于以下问题:Java HtmlTextView.setHtmlFromString方法的具体用法?Java HtmlTextView.setHtmlFromString怎么用?Java HtmlTextView.setHtmlFromString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.sufficientlysecure.htmltextview.HtmlTextView的用法示例。


在下文中一共展示了HtmlTextView.setHtmlFromString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreateView

import org.sufficientlysecure.htmltextview.HtmlTextView; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Set fragment layout
    View rootView = inflater.inflate(R.layout.fragment_pager,container,false);

    // Connect HTMLTextView object with view id in xml
    HtmlTextView mTxtContent = (HtmlTextView) rootView.findViewById(R.id.txtContent);

    // Set data to HTMLTextView
    mTxtContent.setHtmlFromString(mContent, true);

    return rootView;
}
 
开发者ID:jyjeanne,项目名称:Studyandcook,代码行数:15,代码来源:PagerFragment.java

示例2: addContent

import org.sufficientlysecure.htmltextview.HtmlTextView; //导入方法依赖的package包/类
private void addContent(String html) {
    HtmlTextView textView = new HtmlTextView(getActivity());
    ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
            ViewGroup.LayoutParams.WRAP_CONTENT);
    textView.setLayoutParams(layoutParams);
    textView.setTextAppearance(getActivity(), fontSize.getContentText());
    textView.setLineSpacing(0.0f, 1.2f);
    textView.setHtmlFromString(html, htmlOptions);
    mainContent.addView(textView);
}
 
开发者ID:kimkha,项目名称:triethocduongpho,代码行数:11,代码来源:PageFragment.java

示例3: onCreate

import org.sufficientlysecure.htmltextview.HtmlTextView; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  requestWindowFeature(Window.FEATURE_NO_TITLE);
  setContentView(R.layout.dialog_episode_details);

  streamButton        = (ImageButton)findViewById(R.id.button_stream);
  playDownloadButton  = (ImageButton)findViewById(R.id.button_download_play);
  deleteFileButton    = (ImageButton)findViewById(R.id.button_trash);
  goToProgramButton   = (Button)findViewById(R.id.button_go_to_program);
  websiteButton       = (ImageButton)findViewById(R.id.button_website);
  titleTextView       = (TextView)findViewById(R.id.episode_title);
  descriptionTextView = (HtmlTextView)findViewById(R.id.episode_description);
  addToPlaylistButton = (ImageButton)findViewById(R.id.button_add_to_playlist);

  titleTextView.setText(episode.name);
  if (episode.description.length() <= 5) {
    descriptionTextView.setHtmlFromString(getContext().getString(R.string.episode_no_description), false);
  } else {
    descriptionTextView.setHtmlFromString(episode.description, false);
  }

  addToPlaylistButton.setOnClickListener(this);
  streamButton.setOnClickListener(this);
  websiteButton.setOnClickListener(this);
  goToProgramButton.setOnClickListener(this);
  playDownloadButton.setOnClickListener(this);
  deleteFileButton.setOnClickListener(this);

  updateUI();
}
 
开发者ID:macbury,项目名称:EnklawaPlayer,代码行数:32,代码来源:EpisodeAboutDialog.java

示例4: onCreate

import org.sufficientlysecure.htmltextview.HtmlTextView; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  requestWindowFeature(Window.FEATURE_NO_TITLE);
  setContentView(R.layout.dialog_program_details);

  titleTextView        = (TextView)findViewById(R.id.program_title);
  descriptionTextView  = (HtmlTextView)findViewById(R.id.program_description);

  titleTextView.setText(program.name);
  descriptionTextView.setHtmlFromString(program.description, true);
  //int programId = getArguments().getInt(IntentManager.EXTRA_PROGRAM_ID);
  //program       = Enklawa.current().db.programs.find(programId);

}
 
开发者ID:macbury,项目名称:EnklawaPlayer,代码行数:16,代码来源:ProgramAboutDialog.java


注:本文中的org.sufficientlysecure.htmltextview.HtmlTextView.setHtmlFromString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。