view

Segmented Control to Swap ViewControllers in a Navigation Controller

Here is the setup of my iPhone App: I have a UITabBarController that has 4 View Controllers (1 UINavigationController & 3 UIViewControllers). Onload my app is defaulted to the UINavigationController, where there is a grouped UITableView which gives two navigation options, when the user hits the first option the relevant UITableViewCont...

Changing displayed state of Views based on a parent ViewGroup's state

I have a compound UI component built up from a ViewGroup containing a number of TextView, ImageView etc. components. Many of these have StateListDrawables as their images/backgrounds. Is there any way of making them select from this drawable based on the state of the parent ViewGroup rather than the component itself? Ideally I want to be...

passing variables to an outside class.

I split my inner View class from my Main class into its own file. In my main class, I have the view set as an onTouchListener which records user movement into a matrix so it can translate and scale the view. After separating it everything works but im unsure how to pass the matrix to the View for onDraw to update. Any suggestions? Thanks...

MVC: Relationship between controller and model

Hi, I'm slightly confused about the controller-model relationship in MVC. Should a controller be able to access any model in the system or should it have a 1:1 relationship with a specific model? Both options seem to present problems: If the relationship is 1:1 obviously if something elsewhere needs to be updated it can't for example ...

SQL View Conditional Selection

I am trying to create a view that pulls a particular record. The problem I am running into is that there are 2 records to choose from and a status flag that is either 1 or 2. It should pull the 1 record if it exists, and if not the 2 record. Is this possible from a view? ...

Android - View setText from SharedPreference Value using XML

Hello, I've chosen the path to have each Activity implement a onSharedPreferenceChangedListener. In order for a service to update values to be sent back to several Activities at once (it doesn't care which one has the focus) When the Listener is called, I only have the key. I then have to perform a lookup of that key to get the corresp...

Android TouchEvent Camera and Video?

I have a camera view over a video view in my android application. I want to use touch for both views. For Example: If i touch the camera view, i want to perform specific actions for camera view. Similarly the Video view. Kindly, tell me how to perform touch events for both the views at the same time. | VideoView | | _ | |...

Problem with indexed table...UITableView iPhone problem

Hi, I am trying to grab the data from the database and display all the values in sorted order grouped into sections from A-Z and also my UITableView is indexed. In this case the indexes are A-Z. The strange thing that's happening is when I get all the values from the DB onto the table, I see that values under section 'B' has some values...

How do I use androids LayoutInflater.Factory to create a custom view class instead of a built in class?

I am using a custom class based off RelativeLayout but it obviously doesn't render in the Eclipse layout editor. I have found this article regarding LayoutInflater.Factory and it sounds like what I need to be doing but I can find no guides to using LayoutInflater.Factory. http://www.macadamian.com/blog/post/android_-_custom_classes_fro...

TableView Cell Color

我现在遇到了个问题,如何使uitableview cell 的背景色填满整个cell ,以下是我的代码。但它不能正常工作、、、 Picture shows: http://www.flickr.com/photos/53054715@N05/4898445104/ How can I code that set the color fill in cell view? My code is below, but it does not work well. cell.contentView.backgroundColor =[UIColor groupTableViewBackgroundColor]; cell.backgroundColor=[UIColo...

How can I view my Android Apps database information?

I've tried to view the db file from the File Explorer in Eclipse but I can't open the file or copy it to another location to open. I don't have a rooted phone so I was trying to view the db from the app on my emulator. If someone could help it would be greatly appreciated as I find it hard to find much info on this subject for some reas...

Custom View extending the View-Class but still based on a XML-Layout

I want to build my own custom view which should look like the Crysis-GUI. At first I designed a XML-based Layout and made it visible via the setContentView(int resid)-Method. Worked pretty well. But now I wan't to go a step further and draw in my Layout. So I created a new Class, let it extend View and overrode the onDraw()-Method. So ...

Zend_Dojo_Data from SQL View (primary key not available, can it be done?)

Well, i'm trying to achieve something but i think it is not possible. Here's where i am. SQL Table T with columns colID , colA, colB. colID is the primary key I needed to retrieve all the values specified in colA "unioned" with colB, so I created a view CREATE OR REPLACE VIEW vw_MyView (col_Common) AS (SELECT col_A AS col_Common FROM ...

How-to create a clickable Button with a ShapeDrawable?

Hello, I'm trying to draw a shape on a Canvas and get information about the clicks that the user performs on that Canvas. I created a class which extends the Button class. class CustomDrawableButton extends Button { private final ShapeDrawable mDrawable; int x = 50; int y = 50; int width = 30; int height = 30; ...

Zend newbie - Controller/view question

Contoller iscalled MaintainusersController.php View is called maintainusers/listusers.phtml How do I push values from controller to view. foreach ($users as $value){ /// do something here } ...

ASP .NET MVC VirtualPathProvider

I am writing a VirtualPathProvider to dynamically load my MVC views, which are located in a different directory. I successfully intercept the call before MVC (in FileExists), but in my VirtualPathProvider, I get the raw, pre-routed url like: ~/Apps/Administration/Account/LogOn Personally, I know that MVC will look for ~/Apps/Adminis...

How can I optimise this query in MYSQL? What needs to be done

Please scroll down to the "25/08/2010 Update". I have a query which I have turned into a view. It runs very slowly because (as far as I understand) there are several issues with indexes on the joined tables. explain select * from view_ed_abc_print As you can see, I have table "a" using where, temporary and filesort with 4659 ro...

How to copy all properties of a view ?

Hi everyone, I’m creating an currency exchange rate application to learn Android. The app will list all exchange rate in a list, each of them has the layout like this (in essential): <TableRow> <ImageView> [properties for the Flag image here] </ImageView> <TableLayout> <TableRow> <TextView> [Buyi...

MVC 2 View Model Data Problem

Here is my database Structure Languages LangID PK LangName nvarchar(100) Category CatID Pk IsActive Bit CategoryText CatID FK CatName nvarchar(200) LangID Int Language LangID | LangName 1 | English 2 | French Category CatID | IsActive 1 | True 2 | True 3 | True CategoryText CatID | CatName | ...

asp.net mvc c# - Is it possible to access value of textbox in View from Model in CodeBehind ?

Hello, I have a problem to get a value of textbox which is in view into the controller. In WebForms it was quite easy, it needed just to call textbox in codebehind trouhg Id, but in MVC it seems not possible this way, or? Help me please! Take care, Ragims ...