小编Nik*_*hil的帖子

如何创建像Android的通知一样的短命令

如何为andriod创建推送通知等方法.通知包括通知底部带有文本的完整图像.

小通知只是文本,但是当你展开它时,它会在背景中显示图像,底部是文本.

有人可以帮我这个.以下是截图

在此输入图像描述

java android push-notification android-notifications android-studio

2
推荐指数
1
解决办法
606
查看次数

Android布局设计:使用LinearLayout和Relative布局

我希望在图像中使用与下面的布局完全相似的布局.我已经尝试了下面的代码,但它没有来.有人可以帮助我获得这种布局.

需要布局

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="?android:attr/listPreferredItemHeight"
    android:padding="6dip" >

    <TextView
        android:id="@+id/firstLine"
        android:layout_width="fill_parent"
        android:layout_height="26dip"
        android:ellipsize="marquee"
        android:singleLine="true"
        android:text="Ali Connors"
        android:textSize="12sp" />

    <TextView
        android:id="@+id/secondLine"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/firstLine"
        android:gravity="center_vertical"
        android:text="Brunch this weekend?"
        android:textSize="16sp" />

    <TextView
        android:gravity="right"
        android:id="@+id/rightTime"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="15m"
        android:textSize="16sp" />

</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

java android android-layout

0
推荐指数
1
解决办法
165
查看次数