Skip to content
项目

关于

Medium Android 应用会在文章详情页中显示文字、图片、视频等内容。处理来自 CMS 的内容时,实现这一点可能很麻烦,因此我设计了这个 View 来快速显示内容。

设计与媒体

这些数字如何统计

可以做什么

  • Paragraph <p></p>
  • Image in <img/>
  • Video in IFrame <iframe></iframe>

实测星标增长

24小时
0
7天
0
15天
-1
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Medium Textview

Download

Medium android application displays content with text, image, video etc in post detail. It can be a pain to do it with content came from CMS. So i decided to design that View to display the content quickly. It's different to Webview.

Features

  • Paragraph <p></p>
  • Image in <img/>
  • Video in IFrame <iframe></iframe>

#Screenshot Screenshot

Usage

1. Add the following to your build.gradle.

dependencies {
  compile 'io.github.angebagui.mediumtextview:mediumtextview:1.0.1'
}

2. In my layout xml

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <io.github.angebagui.mediumtextview.MediumTextView
            android:id="@+id/medium_text_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/activity_horizontal_margin"
            android:layout_marginBottom="@dimen/activity_vertical_margin"
            />
    </ScrollView>

3. Now in java code we set the content now

        MediumTextView mediumTextView = (MediumTextView)findViewById(R.id.medium_text_view);
        mediumTextView.setText(getContentHtml());

Licences

Copyright 2016 Ange Bagui.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

探索相关项目

加载中…