view

How to handle click event on custom view with buttons?

I have a custom view that extends FrameLayout. It also uses a GestureDetector to handle onFling events. The view also contains two buttons and a checkbox, all of which work just fine. However, I also want to be able to handle a tap or click event on the view itself. The problem is I can't figure out how to let the children buttons ha...

prevent NULL in mysql view, de-normalization

Dear all, I´d love to do something like this, but with a working syntax of course :) MIN(CASE WHEN col=2 THEN CASE WHEN answer IS NULL THEN 0 ELSE answer END END) i am trying to prevent a view from getting NULL values and use zeros instead. Here is my SELECT query that creates the view: SELECT result,question_id, MIN(CASE WHEN col...

Django extend admin "index" view

I know how to change or extend a model's views in the Django admin ( http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.add_view ) but I want to extend the admin index (dashboard) view. Specifically, I want to keep it the same, but add some information to some of my models that will let me sort them ...

Adding buttons at run time to each row in a list view

I am working in an android application that uses a list view. I currently have a XML for the row layout with only one text view. Based on certain conditions, some rows will have one additional button and some other rows may have 2 additional buttons. Can I override the getView method of the adapter class to do this logic? is there any pe...

uisearchbar between navigation bar and table view

Hi all, I am developing an application, in that i have taken navigation bar and table view. I have taken a button on navigation bar. on clicking that button I want Search bar to pop up underneath navigation bar and table view should automatically slide down. After clicking cancel button in search bar it should disappear and table vie...

use CASE with SQLITE for matching fields

I have an SQLite database with student names. Each student has different classes. I have a table with student grades and classes and another table that defines class by type. I'd like to run a query (that I'll be saving as a CSV to use in OpenOffice as an Excel document for a mail merge). I need to list the student's Math grade, History ...

tab bar controllers won't open in Interface Builder

Hi all, I'm developing a new app but I've a little issue with Interface Builder... I've installed Xcode 3.2.3 and iPhone SDK 4.0 GM. When I create a new Tab Bar Application project in Xcode, opening the MainWindow.xib file in IB, the Tab Bar Controller won't open... I tried reclicking it but nothing! I also uninstalled and reinstalled al...

Creating a skeleton for a Game Algorithm in Android

Hello. I need some help on the following: I have the following class: public class Game extends Activity {... ...} My questions is: Where and how do I create my View (do I use another class that extends View....) Where and how do I implement the Runnable interface so I would be able to use threads. Where and how do I connect all...

How to animate MapView once it loads?

Could someone please help me with loading maps using animation? I am trying to load a MapView. I want it to zoom to my place once the view loads. I am trying this: - (void)viewDidAppear { [super viewDidAppear:TRUE]; MKCoordinateRegion region; CLLocationCoordinate2D location=secondMap.userLocation.coordinate; MKCoordinateSpan span; locat...

Omit HTML but keep <br> tags in rails

I need to display user comments, omitting HTML to prevent attacks (when custom styled elements can be posted as comments) The only thing, i would like to keep by displaying - is tag I displaying the comment in this way: <p class="content"><%=h comment.content.gsub(/\n/,"<br/>") %></p> Comment is suppossed to be saved in database wit...

sql server compact edition features

Does anyone know where I can find a list of supported features for SQL Server Compact Edition? I am interested in using the new version with my web app but am trying to determine if it can do what I need? specifically I want to know if it can support views and stored procedures but the microsoft site was futile. thanks in advance Edit:...

model and view in a simple strategygame with cocos2d&cocoa touch

Hey i need some general advice on how to structure my project. i am trying to make a simple strategygame where some object move around in a "worldspace" and youve got several different tactical views, which show diffent areas of the game. nothing special. but since i'm a rather unexperienced programmer, some things are not quiet clear to...

Making a view in a listview invisible android

I have a listview that's using a custom adapter. I want to dynamically show/remove items from the listview. I've tried everything inside the getView() method in my view adapter. I've tried doing setVisiblity(View.GONE) on the view I'm returning. And it infact doesn't draw the view, but it allocates space for the view and it's just a blan...

How to "push" view controller to be 2nd page in page control?

How would I push my 2nd view controller to be the 2nd page in page control. I am using scroll view too? Any help pleaseeee? ...

asp.net mvc view user control for data capturing

I am tring to add a user control to do a search. this user control is to be used on the home page and for example /category-page. where do I write the code for data capturing. is there a way to force the user control to submit to a HomeController or the controller I want? I hope my question is clear. I have the following on the homeco...

ASP.Net MVC - Sending an object from controller to view to controller

Hi everybody, I'm just starting with ASP.Net MVC 2 and might be doing something wrong. I have a controller who builds some objects and passes them to a view using ViewData. In the view I display the data etc ... and then want to submit the same data (plus other user input) back to the same controller. Is there any simple way to do this ...

MOSS 2007 - Maximum number of views for one list?

Is there a maximum number of views you can create for a list in SharePoint? I mean views like the ones which are listed in the top right corner o the AllItems.aspx page: Are there performance issues which arise when you add a lot of views to one list, like 50-100? ...

set the absolute position of a view in Android

Is it possible to set the absolute position of a view in android? (I know that there is an AbsoluteLayout, but it's deprecated...) Lets say I have a screen 240x320px, and I want to put an ImageView which is 20x20px with its center at the position (100,100). What do I have to do? Thanks for the help, this is driving me crazy. ...

IPhone - View hides behind the status bar

Hi I am trying to add a subview to my iphone window and i have written the following code for that. Problem is that when the splash view or main menu view appears on the screen, it goes behind status bar. I mean the view starts from behind the status bar. Also both view overlap when the main menu view is show after the splash view. Can a...

Creating database views with NHibernate

Does any one know how to create a view from hibernate with the results of a criteria query? We've got some legacy parts of our application that use views generated by the app for data retrieval and I like to tie the new NHibernate stuff into those for minimal friction. I'd turn it into an extension method so I could eventually do stuff...