android-ui

Change View content in activity dynamically

假装没事ソ 提交于 2019-12-09 06:09:53
问题 My abstract class extended from Activity class consists of three View s as described in the following XML snippet: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:background="@drawable/bg"> <LinearLayout android:id="@+id/top_border"> ... </LinearLayout> <View android:id="@+id/activity_content" ... /> <LinearLayout android

How to enable selection markers for EditText in PopupWindow?

走远了吗. 提交于 2019-12-09 05:38:04
问题 I'm using a EditText in a PopupWindow . It shows OK, but the selection markers do not show up in the EditText . Neither does the Options menu change when I long press in the EditText . In LogCat I see a warning TextView does not support text selection. Action mode cancelled. As a result, the EditText cannot copy/paste text from the clipboard. Is there any way to get the "normal" EditText behaviour in a PopupWindow ? This code shows the problem, but I have also tried lots of variations:

Is it possible to launch a DialogFragment from a Preference in a PreferenceActivity?

廉价感情. 提交于 2019-12-09 02:49:47
问题 I am converting my app to use the v4 compatibility package and fragments. I have done well so far, but I need to launch a DialogFragment from a preference click in a PreferenceActivity . Since there isn't a PreferenceFragment in the compatibility library, I'm stuck with using PreferenceActivity . Is it possible to get a reference to the fragment manager and call the DialogFragment or do I just have to continue using the old dialog if I need a dialog from a preference? 回答1: Not without jumping

System UI (Statusbar and Navigation Bar) render artifact [duplicate]

半世苍凉 提交于 2019-12-08 19:57:32
This question already has answers here : Android SystemUI glitches in Lollipop (6 answers) Closed 4 years ago . I have a full screen video using Exoplayer in a FullScreenActivity where status bar and navigation bar are hidden (from android >= 4.4). When the activity is finished , I go back to last activity which is NOT a fullscreen (system ui is displayed) and 70% of the time I'm having a really strange issue on the system UI as follow : Note that the image is the original one, so the white space on the right of the navigation bar is displayed on the phone. This artefact disappear when another

Supporting Multiple Screens in android? [duplicate]

折月煮酒 提交于 2019-12-08 10:28:18
问题 This question already has answers here : multiple screen support in android (5 answers) Closed 4 years ago . In my application, I am setting multiple screen support. In my layout am using layout-normal it supports 320x480 and 480X720hdpi(I think, because it takes it from layout-normal)every layout fit to both resolution perfectly, But pop up window not fit for 480X720 resolution. Please refer my image 320x480 screen image and 480x720 screen image will know the problem. How to solve the

Transitioning between activities without moving actionbar

不问归期 提交于 2019-12-08 08:38:43
问题 Does anyone know how to transition between activities without animating the actionbar like in the Gmail app? 回答1: It is not a transition between Activities , but between Fragments . http://developer.android.com/guide/components/fragments.html Fragments were introduced in 3.0, but there is a backport library in the android SDK. You can use them from and above API level 4. 回答2: Try with this: Intent myIntent = new Intent(context, MyActivity.class); myIntent.addFlags(Intent.FLAG_ACTIVITY_NO

Custom Horizontal StackView on the Android Platform

你离开我真会死。 提交于 2019-12-08 07:52:42
问题 I'm trying to design a UI on the Android Platform (Version 4.0) which would be similar to the Cover Flow design of the Apple App Store as seen from the iPad. (Please view the attached screenshot). ![CoverFlowA][1]: http://i.stack.imgur.com/pF2EC.png The nearest Android component to this, which I found is the StackView. QUESTIONS: 1. Is this the Correct Android component? If not, then which one to use? Is it possible to extend the StackView to mimic this UI? Is there any API/Library available

Custom viewpager tabs with custom view, multiple fragment and layouts

送分小仙女□ 提交于 2019-12-08 04:33:30
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 demo app, it shows error and after researching i found that my application don't have an actionbar. so

System UI (Statusbar and Navigation Bar) render artifact [duplicate]

六眼飞鱼酱① 提交于 2019-12-08 03:23:59
问题 This question already has answers here : Android SystemUI glitches in Lollipop (6 answers) Closed 4 years ago . I have a full screen video using Exoplayer in a FullScreenActivity where status bar and navigation bar are hidden (from android >= 4.4). When the activity is finished , I go back to last activity which is NOT a fullscreen (system ui is displayed) and 70% of the time I'm having a really strange issue on the system UI as follow : Note that the image is the original one, so the white

Supporting multiple screens in android in single layout

浪尽此生 提交于 2019-12-07 23:44:40
问题 I have followed the following link so that my application can support different screen sizes: Supporting multiple screens in android That solution works perfectly. But my concern here is, when I have an android application having 8-9 screens, then it means that I will have 8-9 different .xml layout files. Now to support all screens by folder bifurcation , it means I have manage almost above fifty xml files for layouts and for a simple change in UI, I have to go to all the folders and