Archive for the ‘General’ Category

Android Color Picker

This Android tutorial shows a color picker which we developed for our Android App City, Country, Caller ID. The source code can be downloaded as Eclipse project: Android Color Picker.

Here we have, in the first example, a predefined list with colors: android-color-picker

We use a GridView with six columns. Within the rows and columns there is an ImageView defined, which background color will be set using imageView.setBackgroundColor(colorList.get(position));.

The layout of the GridView is defined in res/layout/color_picker.xml.

Look for the colors in ColorPickerAdapter.java, which are placed in an array (for better reading).

// for convenience and better reading, we place the colors in a two dimension array
String colors[][] = { { "822111", "AC2B16", "CC3A21", "E66550", "EFA093", "F6C5BE" },
		{ "A46A21", "CF8933", "EAA041", "FFBC6B", "FFD6A2", "FFE6C7" },
		{ "AA8831", "D5AE49", "F2C960", "FCDA83", "FCE8B3", "FEF1D1" },
		{ "076239", "0B804B", "149E60", "44B984", "89D3B2", "B9E4D0" },
		{ "1A764D", "2A9C68", "3DC789", "68DFA9", "A0EAC9", "C6F3DE" },
		{ "1C4587", "285BAC", "3C78D8", "6D9EEB", "A4C2F4", "C9DAF8" },
		{ "41236D", "653E9B", "8E63CE", "B694E8", "D0BCF1", "E4D7F5" },
		{ "83334C", "B65775", "E07798", "F7A7C0", "FBC8D9", "FCDEE8" },
		{ "000000", "434343", "666666", "999999", "CCCCCC", "EFEFEF" } };
 
colorList = new ArrayList();
 
// add the color array to the list
for (int i = 0; i < colors.length; i++) {
	for (int j = 0; j < colors[i].length; j++) {
		colorList.add(Color.parseColor("#" + colors[i][j]));
	}
}

In the next step we will assign the Adapter to the GridView:

GridView gridViewColors = (GridView) findViewById(R.id.gridViewColors);
gridViewColors.setAdapter(new ColorPickerAdapter(getContext()));

The second example shows a Rainbow-Color-Picker where the number of colors is flexible:

Define the rainbow with the following steps::

// FF 00 00 --> FF FF 00
for (red = 255, green = 0, blue = 0; green <= 255; green += step)
    colorList.add(Color.rgb(red, green, blue));
 
// FF FF 00 --> 00 FF 00
for (red = 255, green = 255, blue = 0; red >= 0; red -= step)
    colorList.add(Color.rgb(red, green, blue));
 
// 00 FF 00 --> 00 FF FF
for (red = 0, green = 255, blue = 0; blue <= 255; blue += step)
    colorList.add(Color.rgb(red, green, blue));
 
// 00 FF FF -- > 00 00 FF
for (red = 0, green = 255, blue = 255; green >= 0; green -= step)
    colorList.add(Color.rgb(red, green, blue));
 
// 00 00 FF --> FF 00 FF
for (red = 0, green = 0, blue = 255; red <= 255; red += step)
    colorList.add(Color.rgb(red, green, blue));
 
// FF 00 FF -- > FF 00 00
for (red = 255, green = 0, blue = 255; blue >= 0; blue -= 256 / step)
    colorList.add(Color.rgb(red, green, blue));

Layout tipps

Right now the layout is only optimized for hdpi devices. Looking at a ldpi device (small screen) we get the following screen:

We have to adjust the GridView column width in order to have the desired layout on various screens. Creating the file res\values-small\strings.xml and setting the width with colorGridColumnWidth will solve the problem:

Download Eclipse Project Android Color Picker

New Configtool Version 15.1 for 32-bit and 64-bit Windows systems


The configuration tool for products of the ipEther232 family has been thoroughly revised and is now available for download on the respective product websites and in the support section.

Certified Windows drivers enable the installation under

  • Windows XP with ServicePack 3 (32-Bit)
  • Windows Server 2003/Vista/7/Server2008 (32-Bit and 64-Bit)
  • Windows Server 2008 R2 (64-Bit)

Apart from some corrections, the main focus was to improve and enhance the 64-bit driver for ipEther232.

The configuration tool is available for the following products:

ipEther232Virtual COM port
ipEther232.ModemEthernet Modem
ipEther232.PPPPPP – Gateway
ipEther232.IOI/O Data logger / Event logger
ipNTPNTP time server

Data Respons Medical Solutions at Embedded World 2011

Our parent company, Data Respons is presenting medical IT solutions, embedded IT products and implemented project solutions at Stand 229, Hall 9.

Besides Medical Panel PC’s and Displays you will also find the fanless Medical Box PC and the Panasonic Toughbook H1 among the special highlights.

Medical Toughbook
The Toughbook H1 ensures that caregivers have all the tools they need in a single mobile clinical assistant (MCA). This medical touchscreen device has hot-swappable twin batteries and is IP65 certifed. In addition to a camera on the back, this compact device has RFID and a barcode scanner on the bottom.

Medical Box-PC
The Medical Box-PC is a Intel® Core™ i7 Fanless System with FireWire (IEEE 1394b), eSATA, HDMI, VGA, DVI, USB, 2x GbE LAN, RS232/422/485 and more interfaces.
If that’s not enough, the Medical PC can expand via PCI respectively PCIe.

Visit the Data Respons at stand 229 in hall 9, it’s worth it.
Today is the last day of embedded world 2011.

ipcas hardware solutions at Embedded World


Today and tomorrow, we would be happy to see you and give you a live display of our produce. Visit us at embedded world 2011, Stand 129 in Hall 9 in the Nuremberg Trade Fair Center (Nürnberg Messe).

Summary of our product range:

Embedded Systems / Industrial PC LB3

Ethernet and USB I/O Extension

USB-Input-Device with temperature sensor

Floppy Disk Drive (FDD) Emulators

embedded world 2011: minimal video tour on ipcas stand 129 in hall 9

Visit us today and tomorrow, Nuremberg Trade Fair Center (Messezentrum Nürnberg)

Visit us at embedded world 2011


We will be more than glad to support you with first-hand information on our highly innovative Hardware and Software products and concepts. We would be happy to see you and give you a live display of our produce from today until 3 March 2011 at Stand 129 in Hall 9 in the Nuremberg Trade Fair Center (Messezentrum Nürnberg).

Also this year we proudly present a very special highlight:

Floppy emulator V3

The extended version of our Floppy-Emulator is to be at the ready.
In addition to higher compatibility, even to exotic disk formats, the configuration and setup is all done via graphical user interface on the PC.
Now jumpers are a thing of the past.

Take the chance to see the Floppy-Emulator 2 live at the embedded world 2011 until Thursday. Visit us at Hall 9, Stand 129.

embedded world 2011 – the countdown is on

The countdown has begun, and tomorrow you can visit us at the embedded world 2011.

You will find us in hall 9, stand 129:

More about ipcas at the embedded world 2011 >>