I am trying to develop an android application. I've put a scroll view as main container using graphical layout in eclipse. After that, I had put some UI elements, like buttons. When the total height of elements become more than viewable area, it can be seen using scroll view as expected. There is no problem until this point. The problem is the elements that are not fit viewable are of the screen can not be seen using graphical container of the eclipse interface. There is no problem with the source code, as it runs expectedly. Is there any option in the Eclipse gui to see the UI elements that are not fit the viewport?
I know what you're talking about. When you're viewing the xml file on the Eclipse Graphical layout you can only see the elements that fit on the screen. You can't scroll down to see the entire UI.
I use Eclipse at home and work. I'm using Eclipse Helios Service Release 1, on both systems. For some reason at home, when I'm on the graphical layout, there's a button on the upper right of the graphical viewer that says something like 'Remove Clipping'. (I'm at work now. So can't look to see exactly what it says).
When I click that button, I can now scroll down to see the entire UI. However, on my copy of Eclipse at work that same button isn't displayed. I've tried to figure out what the difference is between the setup on the two copies of Eclipse. But so far haven't been able to figure it out. Note, I've tried viewing the same exact xml file, within the same project, on both copies of Eclipse.
The problem seems to only occur when you're using a scrollview and all the ui elements won't fit on the graphical layout screen within Eclipse.
I have the same problem. I've been unable to troubleshoot, so I've resorted to using my physical device instead. I try to get the bulk of work done within the the Eclipse GUI... then nudge and polish with my device. Its a PITA to be sure, uploading what seems like a million times only to move one element a tiny bit more.
Best practices recommend developing on a device. Further, the Layout-tools && scrollView basically make it mandatory to really know what is going on. I can't seem to form this into a coherent search argument as my Google-fu has let me down on this one.
BTW - I'm using the shiny new r10 ADT plugin and I've been struggling with this for about 6 months.
Another workaround: You can use a smaller-ish tablet port in the GUI to get a really rough idea of what you are working with.
If your target layout is for a phone or smaller device, simply switch the preview to a larger screen size configuration.
In the upper left corner, under where it says 'Editing config: ~default', The list provides you with a number of screen sizes to target. Pick the 10.1 in version, and it will scale the preview, and will then allow you to see and work with all of the views that have scrolled off the screen.
Cheers-
I think this is an old topic but I was having the same issue. I have 2 apps made from outsourcing. when I opened each in eclipse one would show the full contents of the scrollview and one was clipped off. After numerous google searches nothing came up as a solution. I just happen to look and saw the app that is clipped was android version 1.6 and the app that shows everything like i wanted it to so I can use the graphical layout for a scrollview was android verion 2.1.
So i changed the one app to version 2.1 and it fixed it. noone seemed to address that. so for me the fix was make sure the android version you are building for is 2.1. you can always change it back to 1.6 compatable after you are done designing.
Hope this helps
The best way i could figure out is to give negetive top margin to the root layout that will make the rest of the content visible. This is only for dev purpose and should be removed when completed
Related
I started using the USB debugging mode on Android Studio and when i run my project the display on the phone is completely wrong. The ide displays the correct way i want it to look but when i open the app on the phone the app's displayed contents are all thrown into the top of the screen. Why is it doing this? Sorry for huge picture btw.
It seems that you are using ConstraintLayout, but you haven't set any vertical constraints for your views. Therefore, when you run the app, all the views are jumping to the top. Click on the red exclamation mark, it will show you the same thing. Go to the code view, it will also show you the same error.
You should use minimum 2 constraints from top or bottom nd start or end
It will help you views to attach each other
Sorry in advance for the stupidity of this question, but it is wrecking my head!
Where is the little phone outline for my preview in Android Studio?
I know it's silly but it always helped me visualise what I was building and now for the life of me I can't find it. Is this part of the new update or what?
if you were asking about the smart phones frame like the phone given below :
I couldn't find it either,i think they removed that feature,but the frame is now available only in the Virtual Device Emulator.
You seem to be in the Design tab. Use the Text tab instead.
(source: android.com)
Build a UI with Layout Editor
If you're asking about the frame of the device, why do you need that? It just takes up space in the view. But besides, I think you can toggle that from the device drop down (where it says "Nexus 6" in your image), or at least used to be able to.
I am having trouble using android studio's drag and drop feature. I have no problem getting the items onto the preview mode of the android phone, but when I want to move the palettes, I can't seem to be able to place them where I want. A lot of times I will place let's say a TextView, and it will snap to a different location an inch away. Anyone know if any solutions?
Unless you know a way to un-snappy the editor, it's time to get to know the XML Text Editor, next tab over in Android Studio.
The way I get round the snappy side is in there: use the "android:layout_below="#+id/example" and it's brethren. Unless you have a massive amount of elements, this is very doable.
i have a problem with the gui in my android (smartphone) application.
At startup everything is fine, but after some time the GUI starts to get messed up. Some elements ore not drawn completely, sometimes im getting a full black screen in some of my tabs. And some animations do not work anymore.
I already tried to switch off hardware acceleration in application and activities, but that did not help at all.
The appearence of the bug is rather random, but i have the feeling that switching between background and foreground sometimes triggers it.
The application is rather dynamic. I have 4 tabs that are shown in a self programmed tab view, so everything is running in one activity. the content of the tabs also changes by user input or other triggers. This is done by loading predefined xml views and animations.
Anyone any ideas?
I now resolved the problem by refactoring the whole project and use the fragments api of android to generate my views instead of using my own solution.
I still have no clue why the rendering of views randomly failed or produced incomplete views without any log errors but perhaps this will help others with the same problems.
I have developed an Android app with phonegap and the content's height is bigger than the screen height. This is not a problem in most of the devices, but in some of them the app will not scroll all the way down, so I cannot see the lowest part of the app.
I edit to say that when the orientation is changed twice, and the screen is taken back to the original position, the whole height appears and the app works correctly.
Any suggestions about what the issue could be?
P.S. I do not mind providing code, but as I have no idea where the issue stands I do not know what I should show, and I do not want to drive you crazy showing code that is not necessary.
If it works on some devices and doesn't work on some, it probably be issue with the phonegap build. I have had the same problem before and it is really a nightmare. Nevertheless, may I have a look at your code, in fact, your xml?
Cheers,