【问题标题】:draw profile picture in android XML在android XML中绘制个人资料图片
【发布时间】:2014-06-15 08:44:26
【问题描述】:

我想要这样的结果: 而不是那个黑盒子,你放了一张个人资料图片,我想在个人资料图片下面保留阴影

如何做到这一点,

我试过这段代码,但没有结果

 <LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="140dp"
    android:background="@drawable/item_profil_amis"
    android:orientation="horizontal">

    <ImageView
        android:id="@+id/imgprof"
        android:layout_width="fill_parent"
        android:layout_height="70dp"
        android:layout_marginLeft="11dp"
        android:layout_marginRight="2.5dp"
        android:layout_weight="3"
        android:gravity="center"
        android:scaleType="centerCrop"
        android:src="@drawable/profle"
        android:layout_marginTop="55dp" />
</LinearLayout>

请帮帮我

【问题讨论】:

  • 使用RelativeLayout,而不是LinearLayout,以获得更好的定位控制。

标签: android xml android-layout imageview shadow


【解决方案1】:

您可以使用 android 的 9patch 工具来完成此操作,并在 photoshop 中制作阴影效果。

示例:

【讨论】:

  • 但是如何在这张图片中制作个人资料图片?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-11-20
  • 2015-04-14
  • 2017-09-30
  • 2013-12-09
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多