android-ui

What is the purpose of the return statement in ASynctask's doInBackground()?

情到浓时终转凉″ 提交于 2019-12-23 16:00:36
问题 This aspect of my login system works just fine if I have the return statement set to 0 or 1, but fails if I use null. This is all adapted from http://256design.com/blog/android-login-asynctask/ where this particular return looks as listed below my own code. public LoginTask(Polling activity, ProgressDialog progressDialog) { this.activity = activity; this.progressDialog = progressDialog; } protected Integer doInBackground(String... arg0) { EditText userName = (EditText)activity.findViewById(R

Gingerbread devices not using Holo style from Theme.AppCompat (support library)

戏子无情 提交于 2019-12-23 09:38:11
问题 I'm using the v4 and v7 support library to integrate the action bar and navigation drawer in my app, which supports API 10+. I've followed the guide on the developer site to use Theme.AppCompat and style/Widget.AppCompat.ActionBar as the parent of my theme and action bar style, respectively. Everything works fine, except when I test on Gingerbread devices, things like a dropdown/popup menu has a white background (skin from the phone) and text fields don't use the holo-style backgrounds (again

Android: Evernote style layout

心已入冬 提交于 2019-12-23 04:43:59
问题 I have a layout for the main screen in an app, which I would like to have an evernote style. So far, my code is this: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="fill_parent" android:gravity="center_vertical|center_horizontal" android:orientation="vertical" > <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity=

dynamically resized Thumb of SeekBar gets clipped above and below, how to draw on top (Z order)?

强颜欢笑 提交于 2019-12-23 04:41:55
问题 Many stackoverflow questions related to thumb clipping are concerned with clipping to the left and right, which is not related to my question. Thumb is an image. The image scale is reset onProgressChanged in order to scale up as the SeekBar slides right. The issue is that when the image gets tall enough to touch the top of the SeekBar view, the image continues to scale while keeping the top touching the top. So visually it looks like the thumb image is moving down the page. Desired is for (1)

Android Service and AlertDialog Activity

怎甘沉沦 提交于 2019-12-23 04:22:51
问题 I'm trying to build a service which runs in the background and pops up an alert dialog even when you are not in the application screen currently. I'm using an alarm manager. My problem is that when my alert dialog activity pops up - it shows the application activity as background. In other words, I don't want the alert dialog to change the current background and after the user is clicking "OK" it will be back to the same state, and not to my application. How can I do that ? 回答1: The easiest

Custom viewpager tabs with custom view, multiple fragment and layouts

拥有回忆 提交于 2019-12-23 02:07:08
问题 I want to make a viewpager which is just like latest facebook application. and the problem is with tabs. however i tried to make it, but i need icons with text in tabs and multiple fragments and layouts associated with it. two issue occurred when i tried to develop. 1. I compromised with my UI, and tried putting static icons in it, but they don't change on selection and they don't even have badge like in facebook application. 2. when i put that code in my application which i have developed in

Custom Tab bar in Android

独自空忆成欢 提交于 2019-12-22 12:54:34
问题 Is it possible to customize tab bar in android? Customize in the sense, like in iPhone, the tab bar is at the bottom of the screen; in Android, can we place the tab bar at the bottom and its content on top of it? 回答1: Yes It is Possible to make custom Tab Bar in android like as in iphone you can get that from link . visit here 来源: https://stackoverflow.com/questions/3911887/custom-tab-bar-in-android

Custom Tab bar in Android

纵然是瞬间 提交于 2019-12-22 12:53:36
问题 Is it possible to customize tab bar in android? Customize in the sense, like in iPhone, the tab bar is at the bottom of the screen; in Android, can we place the tab bar at the bottom and its content on top of it? 回答1: Yes It is Possible to make custom Tab Bar in android like as in iphone you can get that from link . visit here 来源: https://stackoverflow.com/questions/3911887/custom-tab-bar-in-android

Android- Issue with Image Span Replacement in different android versions for the MultiAutoCompleteTextview Text

我是研究僧i 提交于 2019-12-21 18:43:27
问题 I Am adding the customized Clickable spans to my MultiAutoCompleteTextview. After adding 2 or more Contacts in That Edit Text. i am replacing the extra Spans to Image Span with Text Contains Count . My problem is that count is displaying different in lower end devices(i.e., 2.2) and higher end devices(i.e., 4.0). Please have a look into the below Pictures. Higher End Devices. LOwer End Devices So problem with Higher end devices. each extra chip is replacing the count 2 times. Here is the code

Android Dim Background of Custom Dialog

試著忘記壹切 提交于 2019-12-21 13:03:16
问题 As titled, I cannot seem to be able to dim the background of the custom dialog box I have made. Countless solutions online mention the last 3 lines of code in the first snippet below, this has made no impact on the UI of the dialog box. See the following code: Dialog dialog = new Dialog(MainActivity.this); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setContentView(R.layout.dialog); TextView textView = (TextView) dialog.findViewById(R.id.textView); textView.setText("Custom