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.

25981 questions
182
votes
5 answers

What are dictionary view objects?

In python 2.7, we got the dictionary view methods available. Now, I know the pro and cons of the following: dict.items() (and values, keys): returns a list, so you can actually store the result, and dict.iteritems() (and the like): returns a…
Bite code
  • 578,959
  • 113
  • 301
  • 329
182
votes
3 answers

What is the difference between Xamarin.Form's LayoutOptions, especially Fill and Expand?

In Xamarin.Forms every View has the two properties HorizontalOptions and VerticalOptions. Both are of type LayoutOptions and can have one of the following…
Falko
  • 17,076
  • 13
  • 60
  • 105
177
votes
5 answers

Perform Segue programmatically and pass parameters to the destination view

in my app I've a button that performs a segue programmatically: - (void)myButtonMethod { //execute segue programmatically [self performSegueWithIdentifier: @"MySegue" sender: self]; } I would like to know if there is a way to reference the…
yassassin
  • 3,185
  • 6
  • 28
  • 31
175
votes
10 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
  • 8,698
  • 22
  • 91
  • 148
170
votes
22 answers

Can we pass parameters to a view in SQL?

Can we pass a parameter to a view in Microsoft SQL Server? I tried to create view in the following way, but it doesn't work: create or replace view v_emp(eno number) as select * from emp where emp_id=&eno;
arunachalam
  • 1,889
  • 3
  • 13
  • 6
162
votes
5 answers

Android - Dynamically Add Views into View

I have a layout for a view -
Josh
  • 16,286
  • 25
  • 113
  • 158
157
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
  • 2,193
  • 5
  • 29
  • 37
152
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
  • 16,156
  • 23
  • 77
  • 92
141
votes
7 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,926
  • 14
  • 65
  • 92
141
votes
16 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
  • 59,630
  • 19
  • 106
  • 123
127
votes
4 answers

What's an elegant way to conditionally add a class to an HTML element in a view?

I occasionally have to add a class to an html element based on a condition. The problem is I can't figure out a clean way of doing it. Here's an example of the stuff I've tried:
> some message…
ryeguy
  • 65,519
  • 58
  • 198
  • 260
127
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,989
  • 19
  • 70
  • 107
126
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
  • 47,502
  • 56
  • 171
  • 285
126
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
  • 8,029
  • 11
  • 48
  • 56
122
votes
4 answers

View's SELECT contains a subquery in the FROM clause

I have two tables and I need to create a view. The tables are: credit_orders(id, client_id, number_of_credits, payment_status) credit_usage(id, client_id, credits_used, date) I use the following query to do this. The query without the "create view"…
Raouf Athar
  • 1,803
  • 2
  • 16
  • 30