view

Adding view created in Interface Builder to Progmatically created view - can it be done?

Ok so I've downloaded an open source project that I'm looking at customising for personal use (unless it turns into a great project in which case who knows) but in either case I'm having some difficulty. From a starting point I'm finding creating UI elements using progmatic methods rather difficult, just can't find a good tutorial out t...

Zend View Helper strange issue

Hello everyone, I have been working on a zend framework project on localhost (OS: Snow Leopard) and when I uploaded the files on the hosting server (shared hosting) I got some errors about a view helper i was using there. More specifically: The project structure is like this: ( i ommited some irrelevant subfolders and the numbers in th...

Extracting yyyy/MM/dd formated date from datetime datatype in T-SQL

I have my date values in postdate column in articles table in sql database table. It stores all date as well as time. I would like to get the date part only. i.e from 2010/07/01 12:45:12 i would likfe to get 2010/07/01 in my view ...

iPhone: Anchor UINavigationBar to bottom of screen

I am creating a UINavigationBar which works fine. But, it scrolls with my UITableView, which I don't want. How can I anchor the navbar at the bottom of the screen, so that it does NOT scroll? bottomNav = [[UINavigationBar alloc] initWithFrame:CGRectMake(0.0, self.view.frame.size.height, self.view.frame.size.width, 44.0)]; bott...

create if not exists view ?

HI all, Is there any way of create view if not exists in sql on mysql db or h2 db. ...

How to move/drag an entire android view that contains a bunch of shapes inside?

I know how to drag a Ball around by extending View and overriding OnDraw and then calculating the new coordinates and redrawing my Ball. What if I have hundreds of shapes inside that view and need the entire view moved around with all the shapes together. Recalculating for every single shape doesn't seem feasible. On the Iphone I can dr...

Dynamic addition of a View [Android] from background thread

I am creating an animated drawable and then adding it to a FrameLayout. The variable is created as a class field and then, each new AnimatedDrawable is created and added to the frame, like that : for (int i = 0; i < 10; i++) { sampleView = new SampleView(Drink.this); frame.addView(sampleView); } But when I do that from the backgroun...

Using Core data to store objects(pointing to seperate views) in a NSMutableArray .

Hello All, I am new to the iOS. Currently, I am using 3.1.3 base SDK for development and testing. I am developing an application to store credentials. In my Main menu, I have a NSMutable Array with some default cells(objects in NSMutableArray speak) and then the option to add some arrays.Currently I am able to add new cells and remove c...

refactoring similar code targeted at all view controllers's navigation bar

Hello I'm trying to find the best way to refactor this. Right now, each of the view controllers (about 20 of them) have a function that initializes the content of the toolbar / navigation bar like so ie, -(void)toolbarInit and on each of the controller's viewDidLoad, you will see that the function is being called ie, [self toolbarIni...

In Interface Builder, can I change the parent view of a view without changing its position?

I have a .xib file that I have many views in. I would like to move these many views into a subview, to allow my code to easily move everything all at once under a new condition in my app (I want to slide the entire display up while a keyboard is displayed). When I drag a view (button, image view, label, etc) to a different view in order...

iPhone view shows wrong orientation

I'm wrestling with this problem. I need a portrait view and a landscape view for my App. Now when I create 2 buttons that show me a portrait view and a landscape view (forced by shouldAutorotateToInterfaceOrientation) they show up just fine. But when I call the views from within the result code of an imagepicker, the portraitview works j...

Does /res/layout/main.xml describe a View or a ViewGroup?

My main.xml looks like this: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wr...

subclassing SurfaceView and overriding onDraw() to change SurfaceView parameters to generate preview of desired size

I have subclassed the SurfaceView and instantiating it in onCreate of the Activity. The preview is generated but the control never enters onDraw() which is overriden in the subclass of SurfaceView. Why is that? class ActivityClass extends Activity{ onCreate(){ mPreview = new Preview(this); setContentView(mPreview); } public void st...

Can an Android View's id be safely shared across multiple Activities?

Say I have two Activities in an Android application, EditPerson and EditEmployee. It would seem natural to have the EditPerson Activity be a base class for the EditEmployee Activity and define methods that marshal data to and from the Views defined in the layout. The EditPerson Activity's implementation would push (for example) the "Na...

i want to call an image to be displayed in a view

hi I wanted to display randomly selected images in a view. below is an example of code i am using to generate random numbers to be displayed in a lable. ( its around about way to code it and im aware there is a more concise approach to code this. im doing it this way for a particular reason that i wont go into now). i wish to replace the...

subclassing view and implementing SurfaceHolder.Callback

Can I have a class that extends View and implements SurfaceHolder.Callback and inside this class have a SurfaceView object? If this is possible, then I’d have to call on the SurfaceView constructor like this: SurfaceView sview = SurfaceView(this) inside the constructor of View’s subclass. I can’t compile because of the foll error: ‘...

iPhone - switching views trouble

I have pretty much the same setup as the ViewSwitch app from the Book Beginning iPhone 3 Development Exploring the SDK. Except I have a settings view and a view with a tableview inside it. The bottom bar is the the same as the example with the switch view button in the lower left but my app has a navigation bar too. The second view t...

Modal View is displayed full screen as it should, but behind the navigation bar...

Hi all Here is my problem, Im trying to present a modal view in front of a view with a Navigation Bar. I managed it fine with my Login modal view, which was presented by the RootView of my application. But this time the modal view is presented by one of the views of a CustomTabBarController (like in the Tweety app, I created it myself t...

Set up UITableView in a view based applicaiton

Hi! So, I have a View Based Application where i want to add a UITableView but i don't know how i can do it. :/ thanks for your help ! ...

Swapping values around in the view with information taken from a DAO

To respect requirements, I've temporarily used a hack to swap around a numerical id with a String representing a corresponding username in the view. To do this I've called a DAO directly from a TableModel. Obviously, this isn't very elegant and is probably inappropriate from a design point of view. What would be the proper approach to a...