custom-view
Accessing a custom view from the xml layout
In an Android application, I have created a custom view extending the View class. I want to declare an object of my class in the xml layout file but, even after many tries, the application unexpectedl[详细]
2023-02-21 20:11 分类:问答Android ImageView size not scaling with source image
I have a few ImageViews inside a LinearLayout.I need to scale down the ImageViews so that they maintain their aspect ratios whilst fitting inside the LinearLayout vertically.Horizontally, I just need[详细]
2023-02-18 12:45 分类:问答Styling Custom Views
I have a few custom views in my Android project and I\'ve added the relevant details to the attrs.xml file. And now I can implement my objects throug开发者_如何转开发h XML. This works fine.[详细]
2023-02-18 05:54 分类:问答setText in custom view
I have created a custom class from a tutorial online. It works fine, but what I want to do is make it so that I can set the text of the view, just like I would any other view. How is that accomplished[详细]
2023-02-17 13:16 分类:问答How to create a custom Pulldown in the Honeycomb ActionBar?
I开发者_C百科 would like to add a custom pulldown menu to the actionbar in my project similar to the one that can be found in the google books app (screen).[详细]
2023-02-17 03:00 分类:问答Android: FrameLayout subclass does not draw
This is, what works: a) FrameLayout with two ImageViews in main.xml <FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"[详细]
2023-02-15 08:19 分类:问答Has anyone made a View that takes text, an image and lets the text wrap around the image?
I mean something like what\'s asked here. I see people are suggesting using a staticlayout, but I don\'t understand how that solves it. I\'ve also seen people suggesting webviews, but that seems stupi[详细]
2023-02-14 07:02 分类:问答Android extending views, specifically RadioButton
I\'m trying to implement a RadioButton that has a TextView on the top right part of it, like so: The Textview will hold a number, once I\'ve clicked something in the app.[详细]
2023-02-13 17:29 分类:问答Using a custom view from xml. View class cast error
When running my code i get a java.lang.Cl开发者_运维知识库assCastException: android.view.View when I initialise the XML layout for my view.[详细]
2023-02-13 12:25 分类:问答Animating a imageview on a random path in Android
The task seems fairly simple but I don\'t know what\'s the best way to implement it in Android. How it should look[详细]
2023-02-12 15:12 分类:问答