【问题标题】:Android: Adding Frames to imagesAndroid:向图像添加框架
【发布时间】:2020-05-19 02:26:59
【问题描述】:

我有两张图片。一个是简单的图像,第二个是精美的框架。我想在图像上设置框架。我搜索了一些博客,但找不到答案。 谁能告诉我有关如何做到这一点的想法或任何概念?

【问题讨论】:

  • 嗨,您的要求是像 snap,b612 这样的图像过滤器??
  • 这个问题有点含糊,不具体。你能详细解释一下这个问题吗?

标签: java android image canvas image-editing


【解决方案1】:

你可以FrameLayout 使用 2 个图像 1 来实现类似 Frame -

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/image1"/>

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:padding="15dp"
        android:layout_gravity="center"
        android:background="@drawable/image2"/>

    </FrameLayout>

【讨论】:

  • 是的,是的。但我想拖动 image1 以适合框架(image2)。如何做到这一点?
猜你喜欢
  • 2013-02-02
  • 2013-01-22
  • 1970-01-01
  • 2019-05-15
  • 1970-01-01
  • 2015-01-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多