please refer the image.
In the image (which is blue color is selected one). I want to click on the imageView.
I am not sure how to select a imageView, when multiple linear layout is there.
-Relative Layout:
-(0)Linear Layout
-(0)TabWidget
-(0) LinearLayout
(0)imageView
-(1) LinearLayout
(0)imageView
-(2) LinearLayout
(0)imageView (I want Click this image View).
If there are no ids and the Relative Layout is root layout, you can click on image view with index 2.
solo.clickOnImage(2);
Related
I want to show slider vertically in CodenameOne. Below is code which I tried to make it possible but still shows horizontally.
Code :
Slider s1 = new Slider();
Slider s2 = new Slider();
s1.setVertical(true);
s1.repaint();
s2.setVertical(true);
s2.repaint();
findContMainT2O(f).add(BorderLayout.EAST, s1);
findContMainT2O(f).add(BorderLayout.WEST, s2);
findContMainT2O(f).repaint();
see output image here
There is one more thing to do to make this work.
If you you look at the Slider and SliderFull styling, you could see that they have horizontal images. You will have to change this to vertical.
This is what I usually do if I want to reuse codename one slider images:
Go into my res folder and take the hd.png from these folders, depending on the theme you selected, In your case...
hd.png from sliderBlueCenter renamed to sliderBlueCenterV
hd.png from sliderBlueLeft renamed to sliderBlueBottom
hd.png from sliderBlueRight renamed to sliderBlueTop
hd.png from sliderEmpty renamed to sliderEmptyCenter
hd.png from sliderEmptyLeft renamed to sliderEmptyBottom
hd.png from sliderEmptyRight renamed to sliderEmptyTop
Then I rotate 90 degrees counter-clockwise these copied and renamed images and using Image manipulation software like Gimp or Photoshop.
Now I open my theme.res and add this images using Quick Add Multi Images and selecting all of theme and choose HD.
The next thing is manipulating my current slider styling, I double click the slider and switch to border tab. Click the 3-dots and choose Vertical Image instead of Horizontal Image. Change your images to the added images appropriately.
Do the same for SliderFull then copy these 2 styles from Unselected and paste them into Selected and Pressed to override those.
Here is a dropbox link to download slider images I manipulated earlier.
I want a background image to always be aligned with the bottom of the screen regardless of screen size, iOS Version, or Personal Hotspot messages etc. But none of the interface builder alignment options seem to work in every case.
I have 2 different sized images to fit 3.5' and 4' retina which change via code but their alignment is always thrown off by 'Personal Hotspot' and other messages changing the size of the parent view.
My images are the size of the screen and should fill the whole screen always. There is a black area where tab bar and status bar will overlay.
There are buttons aligned with the background and everything gets thrown out by messages that resize the parent view.
I want the bottom of the UIImageView to be aligned with the bottom of the screen always.
have you tried the contentMode property?
theImageView.contentMode = UIViewContentModeBottom;
There is also a menu item for this in interface builder if you prefer to set it there.
then if you are using auto layout, simply add a bottom space constraint from your image view to the bottom layout guide.
If you're not using auto layout, a fixed bottom margin on the autoresizing mask should do the trick.
How do I create a layout as in the image above in titanium?
When someone scrolls, I want the left and the right column to stay fixed to the screen (as in CSS fixed position) while only the middle column scrolls.
When someone taps on a button on either the left column or the right column, the buttons in the middle column are going to be replaced with new buttons.
.1 Create the base view that contains the left and right buttons.
.2 on top of that view, create a scrollable view transparent, with the learning, eating buttons on it.
// SCROLLER
var scroller = Titanium.UI.createScrollableView({
pagingControlColor:'transparent',
});
First of all, set current window's layout to 'horizontal'.
Then create left view(Ti.UI.View), mid view(Ti.UI.ScrollView) and right view(Ti.UI.View).
Set the layout of all of these three view to 'vertical'.
Now when you would scroll, left and right view will remain at same state while just mid view will be scrolled.
Hope it would solve your problem.
I dragged A round rect button into the nib and set a background image for the button. However, the image didn't fill up the whole space, it left out a narrow border on the sides of the button. How do I get rid of this border? Thanks.
if you want to use a custom background image for the UIButton, you should change the button type to UIButtonTypeCustom instead of UIButtonTypeRoundedRect.
(you can do this in the Interface Builder as well)
I am trying to add a cover photo above a UITableView, so that the photo appears to be in a fixed position and the UITableView scrolls over the top of it.
Both Path and EveryMe have this feature.
Image 1: Initial Appearance
Image 2: Appearance when table is scrolled vertically (Note: the top of the image does not change)
http://imgur.com/a/b35IG
It seems to me that:
The image view is placed behind the table view, so it stays in a fixed position
The background of the table view is transparent, so the image can show through
The table has a very tall header (or first row) that also has a transparent background
The other cells in the table have an opaque background