android-view
setContentView(R.Layout.main) vs startActivity(intent), which is more common?
Please tell me the difference between using startActivity(intent) and setContentView(R.Layout.main) Which is more preferable and which should be used in which conditions?[详细]
2023-02-23 05:40 分类:问答What is the main purpose of setTag() getTag() methods of View?
What is the main purpose of such methods as开发者_开发问答 setTag() and getTag() of View type objects?[详细]
2023-02-16 08:48 分类:问答Android: How to test a custom view?
There are several methods of unit testing in Android, what\'s the best one for testing a custom view I\'ve written?[详细]
2023-02-09 08:59 分类:问答Finding the View location (position) on display (screen) in android
I want to find the view\'s position on the display screen. To do it, I use the methods such as view.getLeft() ,view.getBottom() , view.getRight() , view.getTop(). But unfortunately, all these method[详细]
2023-02-07 06:18 分类:问答Same-named attributes in attrs.xml for custom view
I\'m writing a few custom views which share some same-named attributes. In their respective <declare-styleable> section in attrs.xml I\'d like to use the same names for attributes:[详细]
2023-01-30 04:25 分类:问答How can I create a custom View with a Relative Size?
I would like to design an application which could work with devices of any screen resolution. My idea to do so was to create one Custom View for each type of View I use, and use the layout_width and[详细]
2023-01-27 10:09 分类:问答Android dynamic table layout - adding views throws exception IllegalStateException (child already has a parent)
Creating a layout 开发者_高级运维in Java as the number of TableLayouts required is not known as designtime.[详细]
2023-01-24 09:15 分类:问答Add and Remove Views in Android Dynamically?
How do I add and remove views such as TextViews from Android app like on the original stock Android contacts screen where you press a small icon on the right side of a field and it adds or deletes a f[详细]
2023-01-21 16:45 分类:问答How to lay out Views in RelativeLayout programmatically?
I\'m trying to achieve the following programmatically (rather than declaratively via XML): <RelativeLayout...>[详细]
2023-01-10 12:25 分类:问答Using clipRect - explanation
public class POCII extends Activity { myView mv = new myView(this); @Override public void onCreate(Bundle savedInstanceState) {[详细]
2023-01-09 00:41 分类:问答