x500
V2EX  ›  Android

请教个 android imageview 的问题

  •  
  •   x500 · Dec 6, 2021 · 13823 views
    This topic created in 1793 days ago, the information mentioned may be changed or developed.

    android 中画竖的进度条,一般是写 xml 来做,但出来效果感觉还是不太好。 我现在弄一个 imageview/imagebuttom ,设置好图片,通过 scaley 来模拟,但发现它不像进度条的底部是固定的,不知有什么方法可以固定 Imageview/imagebuttom 的底部,使之 scaley 时不动?难道只能合成一张图片,再赋给它吗?

    12 replies  •  2021-12-08 11:34:01 +08:00
    linhua
    linhua
    Dec 6, 2021
    1
    点 9 图
    sangmingming
    sangmingming
    Dec 6, 2021
    2
    自己写一个 progressbar 不更好吗。
    x500
    x500
    OP
    Dec 6, 2021
    3
    @sangmingming 就是觉得如果底部可以固定的话,就个使用起来,还简单好多了
    x500
    x500
    OP
    Dec 6, 2021
    4
    @linhua 啥意思?
    sangmingming
    sangmingming
    Dec 6, 2021
    5
    自己写,自己根据进度绘图啊。
    这样也可以只展示一张图的一部分了。
    PPTing
    PPTing
    Dec 6, 2021
    6
    https://github.com/PPTing/ProgressView
    可以参考我的这个方案,设计出个图,然后自己根据进度进行裁剪
    x500
    x500
    OP
    Dec 6, 2021
    7
    @PPTing 谢谢,我看介绍上是横的,它可以做成竖的吗?
    PPTing
    PPTing
    Dec 6, 2021
    8
    @x500 你自己旋转一下就好了
    zxjunz
    zxjunz
    Dec 7, 2021
    9
    将 ProgressBar 竖过来不就好了吗
    x500
    x500
    OP
    Dec 8, 2021
    10
    @zxjunz 竖过来这属性怎么写呢?
    zxjunz
    zxjunz
    Dec 8, 2021❤️1
    11
    @x500 #10 android:rotation
    x500
    x500
    OP
    Dec 8, 2021
    12
    @zxjunz 多谢哈!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5108 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 07:40 · PVG 15:40 · LAX 23:40 · JFK 02:40
    ♥ Do have faith in what you're doing.