我知道在后台应用中处理消息
当您的应用在后台时,Android会将通知消息定向到系统托盘.用户点按通知会默认打开应用启动器.
这包括包含通知和数据有效负载的消息.在这些情况下,通知将传递到设备的系统托盘,并且数据有效负载将在启动器活动的附加内容中传递.
但我的应用程序应该检测通知何时到达进行操作(从服务器获取数据),因为当通知到达时必须加载数据但是,当应用程序在后台我不知道通知到达用户点击通知将打开应用程序并且我将加载数据,但是某些用户没有点击通知所以数据没有加载
所以我的问题任何方式知道什么时候应用程序在后台的案例应用程序接收通知?
我正在尝试EditText使用提示文本:在英文"password"中..光标正确设置在左侧.但对于提示为"كلمهالمرور"的阿拉伯语,光标始终设置为左侧(提示的结尾)而不是右侧.
<EditText
android:id="@id/ETPass"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/etUsrName"
android:layout_marginLeft="@dimen/_25sdp"
android:layout_marginRight="@dimen/_25sdp"
android:layout_marginTop="@dimen/_5sdp"
android:background="@drawable/signup_edittext_input"
android:ellipsize="start"
android:gravity="center|right"
android:hint="@string/Password"
android:imeOptions="actionNext"
android:inputType="textPassword"
android:paddingRight="@dimen/_5sdp"
android:singleLine="true"
android:textColor="@color/orange"
android:textColorHint="@color/orange" />
Run Code Online (Sandbox Code Playgroud)
这种情况只发生在android:inputType="textPassword".对于普通文本,一切正常inputType.