I am using an Android Gallery widget to show a series of Layouts, and I am getting some unusual rendering of the TextViews within it. Sometimes the TextViews are drawn so they appear dimmed or maybe part transparent.
This is android 2.2
Here is what the app does, with some screen shots:
1. User drags and drops onto the Gallery to set change the content. This changes the content of the Gallery View, but setting parts of the layout to visible or Gone.
The screen updates to this. Look carefully and you will see some text above the green buttons that is not rendering correctly.
3.Finally, user drags away from the Gallery and then back. Voila, the text is rendered as expected. Why does it not work in step 2?
And as a final clue, the text also disappears when the user presses to drag the gallery.
See screenshot below. (listed in order Step 1, Step 2, Step 3)
Answering my own question:
I did not set the android:textColor property in the layout.
Related
I'm trying to make a textField that accepts input. My problem is, that when a user taps a textField, the input field is maximized so that it covers half the background image (the keyboard covering the other half).
The picture below shows what the background image looks like before the user taps one of the five textFields (the grey bars).
The image below and to the left shows what currently happens when I tap a textField: the input field is enlarged and completely covers the background image. What I WANT to happen, however, is what I've tried to show below and to the right: the textField is focused and the user can start writing while the background is still visible.
The app works fine on my Samsung Galaxy tablet, but for some reason I have this issue on my Nexus 5 phone only. The phone has plenty of other apps where the example to the right is what happens, so I at least know that it's possible. How do you do it?
(Was unable to find a tag for the Nexus 5)
This is a common problem. See http://forums.coronalabs.com/topic/36320-keyboard-covers-my-textfield-when-placed-on-botton-of-the-screen/ for some ideas. Some devs create their own virtual kb, see eg https://developer.coronalabs.com/category/tags/keyboard for some libs to help with this.
This is the ExtractEditText UI; you just need to add a flag to disable it. On your EditText, set the attribute:
android:imeOptions="flagNoExtractUi"
Im working with android about image and onclick listener. The purpose of my app is to monitor the area that user clicks on the screen. For example, I have a picture containing a rectangular and a circle. Assume that the color of the whole picture is brown(wood). So when I click on the rectangular, the color of rectangle will change to yellow. When I click on the one part of the picture, the color of that part will change its color, but other parts do not change. So, Im thinking about the solution for this app. Do I have to cut this picture separately and put them into the screen by using relative review? Or is there any other way to do this(Set up a coordination system)?
Yes you have to cut this picture separately and put them into the screen by using relative review. For example two ImageView with your backgound.
You can slse the image as recommeded by the other post, or overlay the image with a RelitiveLayout with specific sized buttons (background = #android/color/transparent)
Is it possible to draw an image over another view (like a button) and still have the view work normally? The user would still be able to click on the button even though there is another image on top of it. I want to draw some mostly transparent pngs over my layout for lighting effects, but I want to make sure everything will still work correctly.
Try using a RelativeLayout with an ImageView on top of the widget(s) in your app. See this question for a quick example.
Referring to screenshot 1 below, I would like to create an image viewer circled in blue color with position of image selected circled in red color. I'm wondering which widget to use to create such layout. It looks like a Android Gallery to me however that leads to screenshot 2.
Screenshot 1
Screenshot 2
Screenshot 2 is displaying the selected image from screenshot 1 in full screen view. In addition, screenshot 2 can be scrolled by finger either left or right and correspond to the smaller gallery in screenshot1
Thank you very much for any help given.
Sounds like you wanna create a new activity in a custom dialog box with scrollable textview at the bottom. Upon clicking a smaller image it will open the new dialog window with a larger picture and the text.
I think you need to have Circle indicator for Image Viewer, here is an example which i came across during surfing: https://github.com/pakerfeldt/android-viewflow.
This might be a "duh" question but I'm going to go ahead and ask it anyway.
I have an oversized (bigger than the screen) RelativeLayout, and I'm using swipes to start a TranslateAnimation from viewing one part of the layout to another. Say for instance the layout is two screen wide and two screens tall. After the nice animation to shift the screen, I was using View.scrollTo() to set the new position. This works fine going from the first screen (top left at 0,0) to one of the others. When I swipe to animate back to the first screen though, because the View.scrollTo() invalidated that part of the layout (I assume), that part of the layout is all black as I animate through it. I tried a couple things to get it to redraw itself after the scrollTo() but haven't had any luck, so I figured I'd ask here.
thanks!
joe d
I can't help with your specific problem since I've never tried working with a layout bigger than the screen, but there might be another way to achieve what you're trying to do. If you simply want to be able to finger-swipe from one View to another, without ever displaying part of one screen and part of another (i.e. you aren't smoothly panning around a large View but rather just jumping from one distinct section of the layout to another), then these tutorials might help, here and here. They show you how to use touch events and the ViewFlipper widget to change between Views using animations.