custom-view

setting the key listener to a custom View

Hi, I created a custom View Round button which consists of an image and some text. I tried to bind a method to it but it doesn't work and don't know what could be the reason. In the main.xml (layout file) i set the parameter clickable to true and in the onCreate method in the main activity i added the following lines: rbActionButton =...

NSMutableDictionary throws a doesNotRecognizeSelector to objectForKey?

I'm a total noob to iPhone programming, and I've run into an exception being thrown that I just can't wrap my head around. Background: The error is happening in a custom subview, and occurs immediately upon loading the program. I'm getting an exception thrown in the overridden drawRect method. The code throwing the error follows: - (vo...

NSColorWell subclass not getting mouseMoved events

I'm trying to implement a color picker in my Cocoa app. (Yes, I know about NSColorPanel. I don't like it very much. The point of rolling my own is that I think I can do better.) Here's a picture of the current state of my picker. The wells surrounding the color wheel are NSColorWell subclasses. They are instantiated programmatically ...

How to scroll "infinitely" wide view in Android?

I am pondering the alternatives on how to scroll an "infinite", scale-like, control in android. The simple idea is to redraw the entire view on each scroll movement, but somehow it doesn't seem like the proper way. It is possible to draw the contents before-hand, but I have no clue how wide I should make the view in the first place, and ...

ASP.NET user browse selected/restricted raw data from sql-server

In an ASP.NET WebForms application I would like to allow the end-user to browse selected raw data in an sql-server database. However, I would like to restrict access for the user to only view some of the data based on the username. I'm not sure how to do this in a way that is possible for the user to understand, since SQL is not necess...

Android: Custom view based on layout: how?

I am building a Android app and I am a bit struggling with custom Views. I would like to have a reusable View that consist of a few standard layout elements. Let's say a relativelayout with some buttons in it. How should I proceed. Should I create a custom view class that extends RelativeLayout and programmaticly add those buttons? I w...

Multiple choice list with custom view?

I've seen example com.example.android.apis.view.List11 from ApiDemos. In that example, each row takes the view android.R.simple_list_item_multiple_choice. Each such view has a TextView and a CheckBox. Now I want each view to have 2 TextView's and 1 CheckBox, somewhat similar to the List3 example. I tried creating a custom layout file ro...

What method of UIView gets called when instantiated from a NIB?

I have a simple custom view that is connected via outlet to a NIB. For this particular view, there are actions that I would like to perform on the view when it is initialized, no matter what NIB it is on. Trouble is, neither the (id)init or the (id)initWithFrame:(CGRect)frame methods are getting called on the custom view. Which method ...

Android Custom View Constructor

I'm learning about using Custom Views from the following: http://developer.android.com/guide/topics/ui/custom-components.html#modifying The description says: Class Initialization As always, the super is called first. Furthermore, this is not a default constructor, but a parameterized one. The EditText is created with these...

Drupal 6: assigning custom View to dynamically generated "category filtered" blog listing...

Hi friends, I'm a drupal newbie... love it so far :) I created a view (page) for my blog listing with View Module. I have a specific output like particular place of image, title, etc... Everything is working great with that... Then I created a Category Filtering block (with View Module) for sidebar. it works fine. I click on any cat...

Drawing an "NSView" to a Custom-View - How? Am I taking the right approach?

I'm using Objective-C and Cocoa, whilst developing for Mac OS X - so not the iPhone/Cocoa Touch. (That said, I'd be interested if it was the same procedure for the iPhone) I'm working on a preferences window for a simple app. I have a NSWindow with a toolbar - there are 5 different items on the toolbar, all of which need to bring up a d...

Spring MVC AJAX and JSON using Custom View Resolver, and Custom View

custom view: public class MyView extends AbstractView { .... awesome stuff ... } controller: @RequestMapping(value="mylocation") public ModelAndView dosomething() { ... modelAndView.setView( new MyView() ); return modelAndView; } For some reason this doesn't work... The only view resolver I have is the following: <bean cl...

How to implement custom view with variable fields?

I have a ListView that displays a set of notes, each with varying ammounts of data (i.e. some have a due date, others don't). Currently, each view in the list is a RelativeLayout containing a TextView for each field, plus two Button and a CheckBox. I then simply hide the unused fields by setting visible false on each one. This has wor...

Popup toolbar upon check

Hi, In the default Mail application that ships with Android, each message in your inbox has a checkbox next to it. Clicking this checkbox pops up a toolbar from the bottom of the screen with buttons to mark all checked messages as read/unread, delete a message, and star a message. I want to replicate this popup toolbar for my applicat...

Trouble refering to a custom View in a layout XML

I am trying to refer to a custom View in the helloWorld XML layout but I get the following exception: Error inflating class acme.my.MyTextView. However, I am able to instantiate the view and add it to the main content view manually. The custom View is built from it's own XML layout. How do I get this to work? public class MyTextView...

How to create a custom UIView?

I've created a UIView subclass and corresponding xib file where I've laid out some UILabels and UIImageViews. I want to then put multiple copies of this custom UIView into a UIViewController. When I do that they appear blank in interface builder and don't appear when the app loads. What methods do I need to implement on the UIView subc...

How do I access layout_height from within my custom view?

I have a custom view and I simply wish to access the xml layout value of layout_height. I am presently getting that information and storing it during onMeasure, but that only happens when the view is first painted. My view is an XY plot and it needs to know its height as early as possible so it can start performing calculations. The ...

How to Create Customize layout?

Hai All, How to create Customize Layout in Android ? My plbm is i m dispalying Images in grid view, when the user reached the last image in the gird view , It must display " click here to View More Images" Message. ...

List Item (a view) order changes unexpextedly while (fast) scrolling in a ListView

I am new to android, and ended up (have to) ask a question here, Let's make it simple, I simply want to make my own TextView-like (MyView extends View), this is my code: public class MyView extends View { private Paint mPaint; private String mText; private Bitmap mBitmap1; private Bitmap mBitmap2; public MyView(Con...

Multiple Custom View (derived from RelativeLayout) in one line

I have created a custom view by extending Relative Layout and it looks like this: The layout for the view: <?xml version="1.0" encoding="utf-8"?> <merge xmlns:android="http://schemas.android.com/apk/res/android"&gt; <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="ce...