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
73
votes
1 answer

How do I clone a View?

My question is almost exactly this question: Clone textview to append it to a ViewGroup However, I was inflating a view, and then attempting to clone it at the object level for performance reasons (I don't want to parse XML every single time), so…
SapphireSun
  • 9,170
  • 11
  • 46
  • 59
73
votes
4 answers

getLocationOnScreen() vs getLocationInWindow()

What is the difference between screen and view in the context of these two methods? I have a button and I want to get the x coordinate of its center. I guess this would be enough: public int getButtonXPosition() { return…
Elad Benda
  • 35,076
  • 87
  • 265
  • 471
72
votes
4 answers

When a Fragment is replaced and put in the back stack (or removed) does it stay in memory?

Is the behavior similar to the way Activities work? For example with Activities it works like this: Activity A starts Activity B, while B is on screen, the system is able to remove A from memory if it is needed by the system. Upon pressing BACK, A…
cottonBallPaws
  • 21,220
  • 37
  • 123
  • 171
72
votes
5 answers

Pass In "WHERE" parameters to PostgreSQL View?

I have a rather complicated query on my PostgreSQL database spanning 4 tables via a series of nested subqueries. However, despite the slightly tricky looking appearance and setup, ultimately it will return two columns (from the same table, if that…
Devin
  • 996
  • 2
  • 8
  • 19
71
votes
9 answers

Convert view to bitmap on Android

I need to convert a view to a bitmap to preview my view and to save it as an image. I tried using the following code, but it creates a blank image. I cannot understand where I made a mistake. View viewToBeConverted; Bitmap viewBitmap = …
SAM Bhadani
  • 831
  • 2
  • 10
  • 13
71
votes
6 answers

Android: How to get a custom View's height and width?

How do I use getMeasuredWidth() and getMeasuredHeight()? It always returns 0. What is the difference between this and getHeight() and getWidth()?
Rohith Nandakumar
  • 11,367
  • 11
  • 50
  • 60
71
votes
9 answers

Laravel 5 - global Blade view variable available in all templates

How can I in Laravel 5 make global variable which will be available in all Blade templates?
Limon Monte
  • 52,539
  • 45
  • 182
  • 213
71
votes
8 answers

How to make CREATE OR REPLACE VIEW work in SQL Server?

CREATE OR REPLACE VIEW doesn't seem to work in SQL Server. So how do I port CREATE OR REPLACE VIEW to work on SQL Server? This is what I'm trying to do: CREATE OR REPLACE VIEW data_VVVV AS SELECT VCV.xxxx, VCV.yyyy AS yyyy, …
Alexander Kalian
  • 1,059
  • 2
  • 9
  • 17
70
votes
7 answers

Android : Get view Reference to a Menu Item

I plan to use quick actions UI pattern in my application. Android Quick Actions UI Pattern . The quick action window needs a pivot view to stick to. quickAction.show(View pivotView); I intend to use quick action for the menu Item, I can get…
Yashwanth Kumar
  • 28,931
  • 15
  • 65
  • 69
70
votes
13 answers

How to send view to back ? How to control the z-order programmatically?

I have a problem to send the view to back. In Android we have a method like bringToFront(), to place the view on top of the another view. Like that, I want to put the view on below the previous image. Is there any method like sendToBack() or…
Lukap
  • 31,523
  • 64
  • 157
  • 244
70
votes
4 answers

Pandas: Knowing when an operation affects the original dataframe

I love pandas and have been using it for years and feel pretty confident I have a good handle on how to subset dataframes and deal with views vs copies appropriately (though I use a lot of assertions to be sure). I also know that there have been…
ejolly
  • 809
  • 1
  • 8
  • 6
69
votes
14 answers

How to make Supplementary View float in UICollectionView as Section Headers do in UITableView plain style

I'm struggling to achieve a "floating section header" effect with UICollectionView. Something that's been easy enough in UITableView (default behavior for UITableViewStylePlain) seems impossible in UICollectionView without lots of hard work. Am I…
100grams
  • 3,502
  • 3
  • 30
  • 27
69
votes
1 answer

How does local_assigns work in Rails?

I've been googling around about this and can't find the right path. I'm working on a Rails app that is using a method called local_assigns. This appears to be something in Rails or a gem, and not specific to my app, but it's used for rendering a…
Lee McAlilly
  • 9,084
  • 12
  • 60
  • 94
68
votes
4 answers

Ruby on Rails Generating Views

Is there a way to generate the views separately using the rails generate command? I would also be willing to install a gem to accomplish that task f one exists. Basically the scaffolding command gives me too much and I would rather code my…
Jason Yost
  • 4,807
  • 7
  • 42
  • 65
68
votes
5 answers

How to set unit for Paint.setTextSize()

Is it possible to change the unit for Paint.setTextSize()? As far as I know, it's pixel but I like to set the text size in DIP for multiple screen support.
Yverman
  • 683
  • 1
  • 5
  • 5