Loading [MathJax]/jax/output/CommonHTML/config.js
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >ReplacementSpan -跨行的“芯片”

我正在使用一个自定义的替换span来绘制特定单词周围的背景(在单词周围添加填充,单词由周围的符号标识,就像HTML标记一样),甚至可以更改这些单词的文本大小(尽管在本例中我没有这样做)。如果只有一行代码,所有内容都会按预期显示,那么就可以正常工作:

这是通过调整覆盖的getSize中的FontMetrics,调整顶部和底部来添加背景填充,并调整返回的大小(宽度)来添加相同的填充来完成的,如下所示:

代码语言:javascript
运行
AI代码解释
复制
override fun getSize(paint: Paint, text: CharSequence, start: Int, end: Int, fm: Paint.FontMetricsInt?): Int {
    if (textSize != null) {
        paint.textSize = textSize
    }

    if (fm != null) {
        val newMetrics = paint.fontMetricsInt
        fm.descent = newMetrics.descent
        fm.ascent = newMetrics.ascent
        fm.leading = newMetrics.leading
        fm.top = (newMetrics.top - strokeWidth - padding).roundToInt()
        fm.bottom = (newMetrics.bottom + strokeWidth + padding).roundToInt()
    }

    return (padding + strokeWidth + paint.measureText(
        text.subSequence(start + 1, end - 1).toString().uppercase()
    ) + padding + strokeWidth).roundToInt()
}

onDraw负责将矩形和文本绘制到画布上。

这个问题来自于多行文本。我知道ReplacementSpan的内容不会被包装/拆分,整个ReplacementSpan都会被包装,这在本例中是意料之中的。当我们转到多行时,问题似乎出在芯片内的文本定位上。我得到了一些奇怪的顶部/底部的值,根据getSize()的字体度量,它们的大小与预期的不同。在第一行,文本显示在芯片的底部,第二行的文本显示在芯片的顶部:

在我看来,当有多行时,没有调整行的高度来处理额外的填充。我曾尝试在我的ReplacementSpan中实现LineHeightSpan,但这不起作用,因为它必须应用于整个段落。

我最接近让它工作的方法是应用一个LineHeightSpan,使用显式的高度:

代码语言:javascript
运行
AI代码解释
复制
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
    mySpan.setSpan(LineHeightSpan.Standard(71),0,narrativeString.length-1,Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
}

但这并不是一个真正的解决方案,因为它不会根据ReplacementSpan的高度进行调整。而且它看起来有点偏了(方框看起来比正常高度高一点,文本看起来有点靠近底部,而不是居中):

除了为每个单词创建单独的视图并将它们插入FlexboxLayout之类的内容之外,还有什么方法可以让它正常工作吗

更新:我尝试了Zain建议的方法,遵循Zain建议的文章和repo,它也不起作用。

首先,水平填充不会影响“单词”的宽度。如果你把芯片放在两个相邻的单词上,填充就会重叠。其次,垂直填充实际上不会改变行的高度。如果添加垂直填充超出行高或相邻行上的筹码,则添加垂直填充会将背景重叠到其他行上。位于文本视图之外的任何填充(例如,在第一行之上、最后一行之下)都会被截断。

EN

回答 1

Stack Overflow用户

发布于 2021-10-01 23:57:45

getLineForOffset()可用于检测跨度的多行文本:

代码语言:javascript
运行
AI代码解释
复制
val startLine = layout.getLineForOffset(getSpanStart(span))
val endLine = layout.getLineForOffset(getSpanEnd(span))

if (startLine == endLine) // single line span
else // multi-line span

在绘制到画布之前,可以使用唯一的渲染器处理每种情况。这允许使用不同的绘制工具处理文本的第一行、中间行和最后一行,以便跨行的区域看起来是连贯的:

这个repo很好地处理了这一点,它还考虑到了LTR/RTL文本方向:

代码语言:javascript
运行
AI代码解释
复制
/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * 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.
*/
package com.android.example.text.styling.roundedbg

import android.graphics.Canvas
import android.graphics.drawable.Drawable
import android.text.Layout
import kotlin.math.max
import kotlin.math.min

/**
 * Base class for single and multi line rounded background renderers.
 *
 * @param horizontalPadding the padding to be applied to left & right of the background
 * @param verticalPadding the padding to be applied to top & bottom of the background
 */
internal abstract class TextRoundedBgRenderer(
        val horizontalPadding: Int,
        val verticalPadding: Int
) {
    /**
     * Draw the background that starts at the {@code startOffset} and ends at {@code endOffset}.
     *
     * @param canvas Canvas to draw onto
     * @param layout Layout that contains the text
     * @param startLine the start line for the background
     * @param endLine the end line for the background
     * @param startOffset the character offset that the background should start at
     * @param endOffset the character offset that the background should end at
     */
    abstract fun draw(
        canvas: Canvas,
        layout: Layout,
        startLine: Int,
        endLine: Int,
        startOffset: Int,
        endOffset: Int
    )

    /**
     * Get the top offset of the line and add padding into account so that there is a gap between
     * top of the background and top of the text.
     *
     * @param layout Layout object that contains the text
     * @param line line number
     */
    protected fun getLineTop(layout: Layout, line: Int): Int {
        return layout.getLineTopWithoutPadding(line) - verticalPadding
    }

    /**
     * Get the bottom offset of the line and add padding into account so that there is a gap between
     * bottom of the background and bottom of the text.
     *
     * @param layout Layout object that contains the text
     * @param line line number
     */
    protected fun getLineBottom(layout: Layout, line: Int): Int {
        return layout.getLineBottomWithoutPadding(line) + verticalPadding
    }
}

/**
 * Draws the background for text that starts and ends on the same line.
 *
 * @param horizontalPadding the padding to be applied to left & right of the background
 * @param verticalPadding the padding to be applied to top & bottom of the background
 * @param drawable the drawable used to draw the background
 */
internal class SingleLineRenderer(
    horizontalPadding: Int,
    verticalPadding: Int,
    val drawable: Drawable
) : TextRoundedBgRenderer(horizontalPadding, verticalPadding) {

    override fun draw(
        canvas: Canvas,
        layout: Layout,
        startLine: Int,
        endLine: Int,
        startOffset: Int,
        endOffset: Int
    ) {
        val lineTop = getLineTop(layout, startLine)
        val lineBottom = getLineBottom(layout, startLine)
        // get min of start/end for left, and max of start/end for right since we don't
        // the language direction
        val left = min(startOffset, endOffset)
        val right = max(startOffset, endOffset)
        drawable.setBounds(left, lineTop, right, lineBottom)
        drawable.draw(canvas)
    }
}

/**
 * Draws the background for text that starts and ends on different lines.
 *
 * @param horizontalPadding the padding to be applied to left & right of the background
 * @param verticalPadding the padding to be applied to top & bottom of the background
 * @param drawableLeft the drawable used to draw left edge of the background
 * @param drawableMid the drawable used to draw for whole line
 * @param drawableRight the drawable used to draw right edge of the background
 */
internal class MultiLineRenderer(
    horizontalPadding: Int,
    verticalPadding: Int,
    val drawableLeft: Drawable,
    val drawableMid: Drawable,
    val drawableRight: Drawable
) : TextRoundedBgRenderer(horizontalPadding, verticalPadding) {

    override fun draw(
        canvas: Canvas,
        layout: Layout,
        startLine: Int,
        endLine: Int,
        startOffset: Int,
        endOffset: Int
    ) {
        // draw the first line
        val paragDir = layout.getParagraphDirection(startLine)
        val lineEndOffset = if (paragDir == Layout.DIR_RIGHT_TO_LEFT) {
            layout.getLineLeft(startLine) - horizontalPadding
        } else {
            layout.getLineRight(startLine) + horizontalPadding
        }.toInt()

        var lineBottom = getLineBottom(layout, startLine)
        var lineTop = getLineTop(layout, startLine)
        drawStart(canvas, startOffset, lineTop, lineEndOffset, lineBottom)

        // for the lines in the middle draw the mid drawable
        for (line in startLine + 1 until endLine) {
            lineTop = getLineTop(layout, line)
            lineBottom = getLineBottom(layout, line)
            drawableMid.setBounds(
                (layout.getLineLeft(line).toInt() - horizontalPadding),
                lineTop,
                (layout.getLineRight(line).toInt() + horizontalPadding),
                lineBottom
            )
            drawableMid.draw(canvas)
        }

        val lineStartOffset = if (paragDir == Layout.DIR_RIGHT_TO_LEFT) {
            layout.getLineRight(startLine) + horizontalPadding
        } else {
            layout.getLineLeft(startLine) - horizontalPadding
        }.toInt()

        // draw the last line
        lineBottom = getLineBottom(layout, endLine)
        lineTop = getLineTop(layout, endLine)

        drawEnd(canvas, lineStartOffset, lineTop, endOffset, lineBottom)
    }

    /**
     * Draw the first line of a multiline annotation. Handles LTR/RTL.
     *
     * @param canvas Canvas to draw onto
     * @param start start coordinate for the background
     * @param top top coordinate for the background
     * @param end end coordinate for the background
     * @param bottom bottom coordinate for the background
     */
    private fun drawStart(canvas: Canvas, start: Int, top: Int, end: Int, bottom: Int) {
        if (start > end) {
            drawableRight.setBounds(end, top, start, bottom)
            drawableRight.draw(canvas)
        } else {
            drawableLeft.setBounds(start, top, end, bottom)
            drawableLeft.draw(canvas)
        }
    }

    /**
     * Draw the last line of a multiline annotation. Handles LTR/RTL.
     *
     * @param canvas Canvas to draw onto
     * @param start start coordinate for the background
     * @param top top position for the background
     * @param end end coordinate for the background
     * @param bottom bottom coordinate for the background
     */
    private fun drawEnd(canvas: Canvas, start: Int, top: Int, end: Int, bottom: Int) {
        if (start > end) {
            drawableLeft.setBounds(end, top, start, bottom)
            drawableLeft.draw(canvas)
        } else {
            drawableRight.setBounds(start, top, end, bottom)
            drawableRight.draw(canvas)
        }
    }
}

存储库将这一点应用于a custom TextView

代码语言:javascript
运行
AI代码解释
复制
/**
 * A TextView that can draw rounded background to the portions of the text. See
 * [TextRoundedBgHelper] for more information.
 *
 * See [TextRoundedBgAttributeReader] for supported attributes.
 */
class RoundedBgTextView : AppCompatTextView {

    private val textRoundedBgHelper: TextRoundedBgHelper

    @JvmOverloads
    constructor(
        context: Context,
        attrs: AttributeSet? = null,
        defStyleAttr: Int = android.R.attr.textViewStyle
    ) : super(context, attrs, defStyleAttr) {
        val attributeReader = TextRoundedBgAttributeReader(context, attrs)
        textRoundedBgHelper = TextRoundedBgHelper(
            horizontalPadding = attributeReader.horizontalPadding,
            verticalPadding = attributeReader.verticalPadding,
            drawable = attributeReader.drawable,
            drawableLeft = attributeReader.drawableLeft,
            drawableMid = attributeReader.drawableMid,
            drawableRight = attributeReader.drawableRight
        )
    }

    override fun onDraw(canvas: Canvas) {
        // need to draw bg first so that text can be on top during super.onDraw()
        if (text is Spanned && layout != null) {
            canvas.withTranslation(totalPaddingLeft.toFloat(), totalPaddingTop.toFloat()) {
                textRoundedBgHelper.draw(canvas, text as Spanned, layout)
            }
        }
        super.onDraw(canvas)
    }
}
代码语言:javascript
运行
AI代码解释
复制
/**
 * Helper class to draw multi-line rounded background to certain parts of a text. The start/end
 * positions of the backgrounds are annotated with [android.text.Annotation] class. Each annotation
 * should have the annotation key set to **rounded**.
 *
 * i.e.:
 * ```
 *    <!--without the quotes at the begining and end Android strips the whitespace and also starts
 *        the annotation at the wrong position-->
 *    <string name="ltr">"this is <annotation key="rounded">a regular</annotation> paragraph."</string>
 * ```
 *
 * **Note:** BiDi text is not supported.
 *
 * @param horizontalPadding the padding to be applied to left & right of the background
 * @param verticalPadding the padding to be applied to top & bottom of the background
 * @param drawable the drawable used to draw the background
 * @param drawableLeft the drawable used to draw left edge of the background
 * @param drawableMid the drawable used to draw for whole line
 * @param drawableRight the drawable used to draw right edge of the background
 */
class TextRoundedBgHelper(
    val horizontalPadding: Int,
    verticalPadding: Int,
    drawable: Drawable,
    drawableLeft: Drawable,
    drawableMid: Drawable,
    drawableRight: Drawable
) {

    private val singleLineRenderer: TextRoundedBgRenderer by lazy {
        SingleLineRenderer(
            horizontalPadding = horizontalPadding,
            verticalPadding = verticalPadding,
            drawable = drawable
        )
    }

    private val multiLineRenderer: TextRoundedBgRenderer by lazy {
        MultiLineRenderer(
            horizontalPadding = horizontalPadding,
            verticalPadding = verticalPadding,
            drawableLeft = drawableLeft,
            drawableMid = drawableMid,
            drawableRight = drawableRight
        )
    }

    /**
     * Call this function during onDraw of another widget such as TextView.
     *
     * @param canvas Canvas to draw onto
     * @param text
     * @param layout Layout that contains the text
     */
    fun draw(canvas: Canvas, text: Spanned, layout: Layout) {
        // ideally the calculations here should be cached since they are not cheap. However, proper
        // invalidation of the cache is required whenever anything related to text has changed.
        val spans = text.getSpans(0, text.length, Annotation::class.java)
        spans.forEach { span ->
            if (span.value.equals("rounded")) {
                val spanStart = text.getSpanStart(span)
                val spanEnd = text.getSpanEnd(span)
                val startLine = layout.getLineForOffset(spanStart)
                val endLine = layout.getLineForOffset(spanEnd)

                // start can be on the left or on the right depending on the language direction.
                val startOffset = (layout.getPrimaryHorizontal(spanStart)
                    + -1 * layout.getParagraphDirection(startLine) * horizontalPadding).toInt()
                // end can be on the left or on the right depending on the language direction.
                val endOffset = (layout.getPrimaryHorizontal(spanEnd)
                    + layout.getParagraphDirection(endLine) * horizontalPadding).toInt()

                val renderer = if (startLine == endLine) singleLineRenderer else multiLineRenderer
                renderer.draw(canvas, layout, startLine, endLine, startOffset, endOffset)
            }
        }
    }
}

并且所需的跨度可绘制可以附加在具有TextRoundedBgAttributeReader中定义的附加属性的XML中。

示例用法:

代码语言:javascript
运行
AI代码解释
复制
<com.android.example.text.styling.roundedbg.RoundedBgTextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="@string/my_annotated_text"
    app:roundedTextDrawable="@drawable/rounded"
    app:roundedTextDrawableLeft="@drawable/rounded_left"
    app:roundedTextDrawableMid="@drawable/rounded_mid"
    app:roundedTextDrawableRight="@drawable/rounded_right" />

您可以在strings.xml中为跨度添加注释:

代码语言:javascript
运行
AI代码解释
复制
<string name="my_annotated_text">"this is <annotation key="rounded">a regular</annotation> paragraph."</string>

或者以编程的方式:

代码语言:javascript
运行
AI代码解释
复制
val span = SpannableString("this is my text value that needs to be spanned")
span.setSpan(Annotation("", "rounded"), 0, 10, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
span.setSpan(Annotation("", "rounded"), 15, 19, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)

This article对此进行了深入的解释;提到的存储库具有samples of testing.

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69410892

复制
相关文章
边缘计算点燃跨行业的创新革命
从制造业、农业、医疗保健到网络优化、工作场所安全和零售业,边缘计算在各行业领域应用的可能性几乎是无限的。通过减少对云计算平台的依赖,可以加快数据传输,提高敏捷性,降低成本,并支持下一代创新。
静一
2022/12/08
9210
python多行注释和跨行字符串
3》三个单引号(或三个双引号)也可以表示跨行字符串,如: >>> s=''' ... hello ... python ... ''' >>> s '\nhello\npython\n'
py3study
2020/01/07
2.7K0
跨行求职数分的面试经验 + 未来职业规划
这周刚结束一家公司的 3 轮面试,拿到了数据分析岗的 offer。虽然岗位没变,但是在有一年gap year 和跨行求职的前提下拿到的 offer 。
猴子数据分析
2023/09/06
2420
跨行求职数分的面试经验 + 未来职业规划
那些0基础跨行当程序猿的人,是怎样找到工作的?
最近,小N老师收到不少小伙伴的留言,咨询的话题中不少同“转行学开发”有关。 这个话题透露着年底求职的焦虑——对目前的工作薪酬不满意,想从事IT行业的开发工作,又不知道0基础的自己该从何学起。 一方面是工作机会的诱惑,另一方面是技术知识的短板。 正巧,小N老师刚好收到一枚NEXT学院的一位优秀学员的实反馈,聊了一下有关他跨界转行的经历—— 学员:严皇 经历:通过学习NEXT学院课程(前端学位课、小游戏开发课),从电商平面设计师转行做小程序开发 竞争中的机遇 我和NEXT学院的起源,要从一个月黑风高的夜晚
腾讯NEXT学位
2018/12/04
6740
那些0基础跨行当程序猿的人,是怎样找到工作的?
vue+element实现表格跨行或跨列合并
vue+element用于pc后台管理系统比较多,所以后台管理系统一般以处理数据为主,数据结构的复杂程度变高,相对应的前端展示成本也提高, 有些产品经理或许会要求表格跨行或跨列合并,如果你正在想怎么实现,那就接着往下看 最新封装了一个表格合并和编辑插件:vue-split-table,戳一戳 效果图
火狼1
2019/04/17
7.9K0
vue+element实现表格跨行或跨列合并
element-ui中el-table的跨行,合并行计算方式
只有第一列合并行,跨行。合并的规则是纵向相邻的连续N行,如果id一致,则合并。
拿我格子衫来
2022/04/10
2.9K0
element-ui中el-table的跨行,合并行计算方式
element-ui中el-table的跨行,合并行计算方式
看到这个需求一开始我以为很简单,表格跨行.跨列,不就是设置rowspan 和colspan。于是我就把这个功能点放到最后来实现了。
拿我格子衫来
2022/03/28
4.3K0
HTML编程-模板生成含有纵向跨行或横向跨列的表格。
平时我们在开发web网页时,经常遇到把数据呈现为表格报告的情况,有时需要跨列合并或跨行合并单元格来让数据更加直观突出更加条理分明。
MiaoGIS
2021/11/16
2.6K0
HTML编程-模板生成含有纵向跨行或横向跨列的表格。
非科班、跨行业的如何走前端这条路?
近日,由于土哥心血来潮,在知乎上回答了一些前端入门方面的问题,导致很多同学关注了我的公号,以及添加了我的私人微信。
闰土大叔
2019/03/14
7540
数据库事务系列-MySQL跨行事务模型
说来和MySQL倒是有缘,毕业的第一份工作就被分配到了RDS团队,主要负责把MySQL弄到云上做成数据库服务。虽说整天和MySQL打交道,但说实话那段时间并没有很深入的理解MySQL内核,做的事情基本都是围绕着MySQL做管控系统,比较上层。好在周边都是MySQL内核神级人物,在他们的熏陶下多多少少对MySQL的一些基本知识有一些零碎的记录和模糊的认识,这些基础对于今天整理理解MySQL跨行事务模型非常重要。更重要的,有很多不解的地方也可以向大神请教。
Java_老男孩
2019/12/02
1.6K0
数据库事务系列-MySQL跨行事务模型
说来和MySQL倒是有缘,毕业的第一份工作就被分配到了RDS团队,主要负责把MySQL弄到云上做成数据库服务。虽说整天和MySQL打交道,但说实话那段时间并没有很深入的理解MySQL内核,做的事情基本都是围绕着MySQL做管控系统,比较上层。好在周边都是MySQL内核神级人物,在他们的熏陶下多多少少对MySQL的一些基本知识有一些零碎的记录和模糊的认识,这些基础对于今天整理理解MySQL跨行事务模型非常重要。更重要的,有很多不解的地方也可以向大神请教。
星哥玩云
2022/08/18
1.2K0
数据库事务系列-MySQL跨行事务模型
小程序跨行跨列多列复杂表格实现
上面的例子中,最外层一共有4行:基础工资,加班工资,岗位工资,合计。第一层数据的 name 展示为第一列,如果每组数据有 children,取出 children 展示为第二列… 如果 children 长度为0,则直接显示工资数额。
solocoder
2022/04/06
1.9K0
小程序跨行跨列多列复杂表格实现
AI 芯片和传统芯片的区别
比如,自动驾驶需要识别道路行人红绿灯等状况,但是如果是当前的CPU去算,那么估计车翻到河里了还没发现前方是河,这是速度慢,时间就是生命。如果用GPU,的确速度要快得多,但是,功耗大,汽车的电池估计无法长时间支撑正常使用,而且,老黄家的GPU巨贵,经常单块上万,普通消费者也用不起,还经常缺货。另外,GPU因为不是专门针对AI算法开发的ASIC,所以,说到底,速度还没到极限,还有提升空间。而类似智能驾驶这样的领域,必须快!在手机终端,可以自行人脸识别、语音识别等AI应用,这个必须功耗低,所以GPU OUT!
刘盼
2018/12/19
1.6K0
AI 芯片和传统芯片的区别
这是你的芯片!不,这是你的芯片!
清晨6点,沉浸在深深的梦乡里,我追逐着恋人在草地上嬉笑、奔跑、打滚,杠铃般的笑声弥漫了整个梦境......
一斤代码
2018/08/21
5540
这是你的芯片!不,这是你的芯片!
硅光芯片与电芯片的封装
上周中国科协发布了2020重大科学问题和工程技术难题,硅光技术榜上有名,“硅光技术能否促成光电子和微电子的融合?”。这篇笔记聊一聊硅光芯片与电芯片的封装方案。
光学小豆芽
2020/08/27
4.5K0
硅光芯片与电芯片的封装
【HTML】HTML 表格 ③ ( 合并单元格 | 跨行合并 | 跨列合并 | 单元格合并顺序 | 跨行设置 rowspan 属性 | 跨列设置 colspan 属性 )
文章目录 一、合并单元格 1、合并单元格方式 2、合并单元格顺序 3、合并单元格流程 二、合并单元格示例 1、原始表格 2、跨行合并单元格 3、跨列合并单元格 一、合并单元格 ---- 1、合并单元格方式 单元格合并方式 : 跨行合并 : 垂直方向上的 上下 单元格合并 是 跨行合并 , 在 <td> 单元格标签 中 使用 rowspan 属性 , 设置跨行合并单元格数 ; 跨列合并 : 水平方向上的 左右 单元格合并 是 跨列合并 , 在 <td> 单元格标签中 使用 colspan 属性 , 设置
韩曙亮
2023/03/30
9.1K0
【HTML】HTML 表格 ③ ( 合并单元格 | 跨行合并 | 跨列合并 | 单元格合并顺序 | 跨行设置 rowspan 属性 | 跨列设置 colspan 属性 )
【FPGA 芯片设计】FPGA 简介 ( FPGA 芯片架构 | FPGA 芯片相对于传统芯片的优点 )
摩尔定律 : 价格不变 , 在集成电路上 电子元器件的数量 , 18 ~ 24 个月增加一倍 , 同时芯片性能也增加一倍 ;
韩曙亮
2023/03/30
1.9K0
【FPGA 芯片设计】FPGA 简介 ( FPGA 芯片架构 | FPGA 芯片相对于传统芯片的优点 )
✪干货|电信运营商数据价值跨行业运营的现状与思考
作者 | 黄文 一、电信运营商数据资源概况与比较优势 电信运营商作为信息社会的综合信息服务商,拥有天然的数据管道优势,运营商的网络系统与业务平台中数据详细记录了人在现代化社会的信息指纹(如图1)。 图1 电信运营商数据概况 运营商客户的上网和通话行为、位置轨迹等都以BIT的形式流淌在运营商的管道里,而且这些数据是长期积累在运营商的数据管道里的。 因此,电信运营商数据的丰富性、连续性、完整性具有得天独厚的优势,具体来说,运营商数据具有“真、大、快、活、全”五大特点(见图2)。 同时,在跨行业应用领域,
智能算法
2018/04/02
1.9K0
✪干货|电信运营商数据价值跨行业运营的现状与思考
MLP-Like Backbone | Strip-MLP跨行Token交互比SWin Transformer更轻更强的性能
本文首发于 【集智书童】,白名单账号转载请自觉植入本公众号名片并注明来源,非白名单账号请先申请权限,违者必究。
集智书童公众号
2023/09/04
7590
MLP-Like Backbone | Strip-MLP跨行Token交互比SWin Transformer更轻更强的性能
真·富文本编辑器的演进之路-Span开胃菜
https://developer.android.com/guide/topics/text/spans
用户1907613
2021/03/16
2.6K0
真·富文本编辑器的演进之路-Span开胃菜

相似问题

未调用ReplacementSpan的draw()方法

73

ReplacementSpan不在马斯马洛工作

20

ReplacementSpan在TextView中的裁剪线

12

ForegroundColorSpan不应用于ReplacementSpan

11

跨行排序

40
添加站长 进交流群

领取专属 10元无门槛券

AI混元助手 在线答疑

扫码加入开发者社群
关注 腾讯云开发者公众号

洞察 腾讯核心技术

剖析业界实践案例

扫码关注腾讯云开发者公众号
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档