android

Android TextInputLayout Password toggle not visible in new support library

拥有回忆 提交于 2021-02-17 21:35:31
问题 I have compiled with following design library and it is displaying password HIDE/SHOW button at the right of EditText compile 'com.android.support:design:24.2.1' <android.support.design.widget.TextInputLayout android:id="@+id/login_password_text_input_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/spacing_normal"> <android.support.v7.widget.AppCompatEditText android:id="@+id/login_password_edit_text" android:layout_width=

Android TextInputLayout Password toggle not visible in new support library

六月ゝ 毕业季﹏ 提交于 2021-02-17 21:34:05
问题 I have compiled with following design library and it is displaying password HIDE/SHOW button at the right of EditText compile 'com.android.support:design:24.2.1' <android.support.design.widget.TextInputLayout android:id="@+id/login_password_text_input_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/spacing_normal"> <android.support.v7.widget.AppCompatEditText android:id="@+id/login_password_edit_text" android:layout_width=

How to stop Handler in Android

随声附和 提交于 2021-02-17 21:32:55
问题 In my application I have created a calendar with Gridview and in that Gridview I am displaying dates and some availability of events with the help of Imageview and to do this I have created a handler. Now I want to stop the handler. MainActivity.java // inside oncreate Handler handler = new Handler(); refreshCalendar(); // outside oncreate public void refreshCalendar() { calAdapter.refreshDays(); calAdapter.notifyDataSetChanged(); handler.post(calendarUpdater); calTitle.setText(android.text

How to do a single row query with Android Room

ⅰ亾dé卋堺 提交于 2021-02-17 21:31:10
问题 How do I make a single row query with Android Room with RxJava? I am able to query for List of items, no issues. Here, I want to find if a specific row exists. According to the docs, looks like I can return Single and check for EmptyResultSetException exception if no row exists. I can have something like: @Query("SELECT * FROM Users WHERE userId = :id LIMIT 1") Single<User> findByUserId(String userId); How do I use this call? Looks like there is some onError / onSuccess but cannot find those

HttpClient redirecting to URL with spaces throwing exception

a 夏天 提交于 2021-02-17 21:30:45
问题 I am accessing a URL that's redirecting me to a URL with spaces in it. (Using HttpClient 4.x) How do I prevent this from throwing an error (replacing the spaces with %20 not +) 08-06 02:45:56.486: WARN/System.err(655): org.apache.http.client.ClientProtocolException 08-06 02:45:56.493: WARN/System.err(655): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:557) 08-06 02:45:56.534: WARN/System.err(655): at org.apache.http.impl.client.AbstractHttpClient.execute

How to do a single row query with Android Room

陌路散爱 提交于 2021-02-17 21:30:19
问题 How do I make a single row query with Android Room with RxJava? I am able to query for List of items, no issues. Here, I want to find if a specific row exists. According to the docs, looks like I can return Single and check for EmptyResultSetException exception if no row exists. I can have something like: @Query("SELECT * FROM Users WHERE userId = :id LIMIT 1") Single<User> findByUserId(String userId); How do I use this call? Looks like there is some onError / onSuccess but cannot find those

Android: Simple way to make a geofence?

醉酒当歌 提交于 2021-02-17 21:29:56
问题 I'm new to Android development and am creating an app that allows a User to create a Geo fence around a specific location for reminders. For example: Making a geofence around a grocery store to remind the user as he enters to pick up Orange Juice. Does anyone know of a tutorial that could help in developing something like this? 回答1: AFAIK there are no tutorials for geofencing, but it's pretty simple (assuming you want a circular fence). This tutorial will tell you how to get the user's

How can I disable Android Lollipop ripple's alpha value?

时光怂恿深爱的人放手 提交于 2021-02-17 21:25:58
问题 I have a ripple working with a custom color. However, the color is never fully opaque. According to the answers from What should be the color of the Ripple, colorPrimary or colorAccent? (Material Design) it always has an alpha of 40%. Looking at the answers I've tried to use the following v21 specific drawable xml to force an opaque red background once selected: <?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="#ffff0000">

How can I disable Android Lollipop ripple's alpha value?

喜欢而已 提交于 2021-02-17 21:25:47
问题 I have a ripple working with a custom color. However, the color is never fully opaque. According to the answers from What should be the color of the Ripple, colorPrimary or colorAccent? (Material Design) it always has an alpha of 40%. Looking at the answers I've tried to use the following v21 specific drawable xml to force an opaque red background once selected: <?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="#ffff0000">

How can I disable Android Lollipop ripple's alpha value?

好久不见. 提交于 2021-02-17 21:25:06
问题 I have a ripple working with a custom color. However, the color is never fully opaque. According to the answers from What should be the color of the Ripple, colorPrimary or colorAccent? (Material Design) it always has an alpha of 40%. Looking at the answers I've tried to use the following v21 specific drawable xml to force an opaque red background once selected: <?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="#ffff0000">