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
151
votes
5 answers

Android - Dynamically Add Views into View

I have a layout for a view -
Josh
  • 15,587
  • 25
  • 107
  • 149
141
votes
8 answers

Measuring text height to be drawn on Canvas ( Android )

Any straight forward way to measure the height of text? The way I am doing it now is by using Paint's measureText() to get the width, then by trial and error finding a value to get an approximate height. I've also been messing around with…
Danedo
  • 1,996
  • 4
  • 28
  • 37
139
votes
6 answers

Android set height and width of Custom view programmatically

I have created a custom view named Graphview . Here is the structure for the GraphView class. public class GraphView extends View { public GraphView(Context context, float[] values, String title, String[] horlabels, String[] verlabels, boolean…
dev_android
  • 7,874
  • 21
  • 84
  • 143
139
votes
17 answers

Software keyboard resizes background image on Android

Whenever the software keyboard appears, it resizes the background image. Refer to the screenshot below: As you can see, the background is sort of squeezed. Anyone can shed a light on why the background resizes? My Layout is as…
Andreas Wong
  • 55,398
  • 19
  • 100
  • 120
136
votes
10 answers

How can I check if a View exists in a Database?

I have some SQL code that needs to be executed if a certain View exists in a database. How would I go about checking if the View exists? EDIT: The DBMS being used is Microsoft SQL Server
Draco
  • 15,378
  • 23
  • 75
  • 90
118
votes
14 answers

Is it possible to determine whether ViewController is presented as Modal?

Is it possible to check inside ViewController class that it is presented as modal view controller?
lukewar
  • 2,665
  • 2
  • 17
  • 16
118
votes
1 answer

How do I access the ModelState from within my View (aspx page)?

How do I access the ModelState from within my View (aspx page)?
Saajid Ismail
  • 7,121
  • 10
  • 43
  • 55
115
votes
8 answers

When to use a View instead of a Table?

When should a View actually be used over an actual Table? What gains should I expect this to produce? Overall, what are the advantages of using a view over a table? Shouldn't I design the table in the way the view should look like in the first…
bevacqua
  • 43,414
  • 51
  • 157
  • 277
110
votes
6 answers

Create a custom View by inflating a layout?

I am trying to create a custom View that would replace a certain layout that I use at multiple places, but I am struggling to do so. Basically, I want to replace this:
nbarraille
  • 9,158
  • 14
  • 60
  • 92
104
votes
12 answers

How can I dynamically set the position of view in Android?

How can I change the position of view through code? Like changing its X, Y position. Is it possible?
Arun Badole
  • 10,339
  • 19
  • 65
  • 93
104
votes
20 answers

How to make a view with rounded corners?

I am trying to make a view in android with rounded edges. The solution I found so far is to define a shape with rounded corners and use it as the background of that view. Here is what I did, define a drawable as given…
Zach
  • 9,411
  • 18
  • 63
  • 102
98
votes
7 answers

Is there a way to retrieve the view definition from a SQL Server using plain ADO?

I'm successfully extracting column definitions from databases hosted on a SQL server using the ADO Connection OpenSchema() call in its various incarnations so I can programmatically recreate those tables in another SQL database. So far, so good. The…
Timo Geusch
  • 23,267
  • 4
  • 48
  • 70
97
votes
3 answers

Can I create view with parameter in MySQL?

I have a view like this: CREATE VIEW MyView AS SELECT Column FROM Table WHERE Value = 2; I'd like to make it more generic, it means to change 2 into a variable. I tried this: CREATE VIEW MyView AS SELECT Column FROM Table WHERE Value =…
ssobczak
  • 1,615
  • 2
  • 16
  • 28
95
votes
1 answer

What is the difference between getWidth/Height() and getMeasuredWidth/Height() in Android SDK?

The Android Documentation says that there is two sizes for a view, the measured dimensions and the drawing dimensions. The measured dimension is the one computed in the measure pass (the onMeasure method), while the drawing dimensions are the actual…
lgfischer
  • 1,298
  • 1
  • 9
  • 15
94
votes
6 answers

MVC Razor view nested foreach's model

Imagine a common scenario, this is a simpler version of what I'm coming across. I actually have a couple of layers of further nesting on mine.... But this is the scenario Theme contains List Category contains List Product contains List My…
David C
  • 2,676
  • 6
  • 25
  • 39