Questions tagged [view]

This tag is for questions about database view or UI / architectural view. See also the following tags: sql-view, android-view, uiview.

The purpose of almost any computer program is to process data in one form or another. When the program requires user interaction it is often necessary to provide the user with a view of that data to represent it in a useful and comprehensible manner.

View also refers to:

  • A stored query in a relational database that can be accessed as if it were a table.
  • The display or presentation layer of a MVC architecture.

Questions tagged should also be tagged with the relevant language.

20281 questions
680
votes
12 answers

Get root view from current activity

I know how to get the root view with View.getRootView(). I am also able to get the view from a button's onClick event where the argument is a View. But how can I get the view in an activity?
Lalith
  • 17,686
  • 14
  • 42
  • 54
576
votes
15 answers

Difference between a View's Padding and Margin

What is the difference between a View's Margin and Padding?
Ragunath Jawahar
  • 18,666
  • 20
  • 102
  • 154
438
votes
7 answers

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? Am I right in thinking that I can associate any number of objects with a single View?
Eugene
  • 55,777
  • 85
  • 212
  • 324
425
votes
28 answers

Android: How do I prevent the soft keyboard from pushing my view up?

I have a vertical sliding drawer at the bottom of my app. When the soft keyboard opens, it pushes the tab for the drawer up, so it sits atop the keyboard. I actually want it to remain at the bottom of the screen, becoming hidden when the keyboard is…
Christopher Perry
  • 36,832
  • 42
  • 136
  • 182
386
votes
8 answers

What is the difference between Views and Materialized Views in Oracle?

What is the difference between Views and Materialized Views in Oracle?
juan
  • 74,179
  • 49
  • 153
  • 188
359
votes
18 answers

Animate change of view background color on Android

How do you animate the change of background color of a view on Android? For example: I have a view with a red background color. The background color of the view changes to blue. How can I do a smooth transition between colors? If this can't be…
hpique
  • 112,774
  • 126
  • 328
  • 461
327
votes
3 answers

onMeasure custom view explanation

I tried to do custom component. I extended View class and do some drawing in onDraw overrided method. Why I need to override onMeasure? If I didn't, everything seen to be right. May someone explain it? How should I write my onMeasure method? I've…
sennin
  • 7,364
  • 9
  • 30
  • 44
305
votes
8 answers

How to create EditText with rounded corners?

Is there any way to create EditText that has rounded corners?
pixel
  • 21,352
  • 30
  • 113
  • 196
278
votes
10 answers

Set margins in a LinearLayout programmatically

I'm trying to use Java (not XML) to create a LinearLayout with buttons that fill the screen, and have margins. Here is code that works without margins: LinearLayout buttonsView = new…
Timmmm
  • 68,359
  • 51
  • 283
  • 367
272
votes
18 answers

Replace Fragment inside a ViewPager

I'm trying to use Fragment with a ViewPager using the FragmentPagerAdapter. What I'm looking for to achieve is to replace a fragment, positioned on the first page of the ViewPager, with another one. The pager is composed of two pages. The first one…
Noodles
  • 3,183
  • 4
  • 16
  • 22
259
votes
12 answers

setBackground vs setBackgroundDrawable (Android)

I want to set background drawable of a view. There are two methods for this (as far as I see): setBackground and setBackgroundDrawable. When I use setBackground, it says it has been added in API level 16 but my project's min SDK version is 7. I…
Pijusn
  • 10,225
  • 7
  • 49
  • 74
256
votes
5 answers

View array in Visual Studio debugger?

Is it possible to view an array in the Visual Studio debugger? QuickWatch only shows the first element of the array.
user20493
  • 5,244
  • 7
  • 31
  • 31
239
votes
9 answers

Google Chrome display JSON AJAX response as tree and not as a plain text

I cannot find an answer to this one: My AJAX calls return JSON data. In Google Chrome Developer Tools > Resources > XHR when I click on the resource on the left and then on the Content tab I see the JSON string as a string and not as a tree as…
GRboss
  • 5,501
  • 5
  • 19
  • 20
231
votes
16 answers

How to make a smooth image rotation in Android?

I'm using a RotateAnimation to rotate an image that I'm using as a custom cyclical spinner in Android. Here's my rotate_indefinitely.xml file, which I placed in res/anim/:
emmby
  • 95,927
  • 63
  • 178
  • 243
221
votes
23 answers

Is there a way to programmatically scroll a scroll view to a specific edit text?

I have a very long activity with a scrollview. It is a form with various fields that the user must fill in. I have a checkbox half way down my form, and when the user checks it I want to scroll to a specific part of the view. Is there any way to…
1
2 3
99 100