Skip to content
elihart edited this page Mar 20, 2013 · 4 revisions

Overview

This activity provides an interface to add text to the ad. Our goal is to provide the user with an easy way to add text to the ad, while balancing simplicity and power.

The current design flow asks the user to first click where on the picture they would like to place the text. Once they have clicked on the picture, options come up for the text. They can continue to change the text options and click on the picture to move the text

There is also a cancel button that simply returns the user to EditorActivity with no changes made.

Features

At this time, these are the current text options. They are hidden until a location is selected on the ad, and then they are all shown at once.

  1. A field to enter text and edit what has been entered

  2. A field to enter what the font size should be. This is configured to take only digits, and updates as soon as a new number is entered. There is error checking to make sure it doesn't break when nothing is entered.

  3. A button to change the font color. The text of the button is written in the currently chosen font. On click, this button launches a dialog that allows you to choose a color. We have experimented with several colorpicker libraries, and are currently using CWAC Color Mixer https://github.com/commonsguy/cwac-colormixer This is an aesthetically pleasing, touch driven color mixer where the user controls a slider for each of Red Green and Blue. This allows a full range of colors, but is limiting as the user can't see the color before picking it.Other possible libraries to explore in the future are Color Picker Preference and UberColorPicker (for advanced users).

  4. A button to choose font. The text of this button is written in the currently selected font. On click, the button launches a dialog that shows a list view of all available fonts on the device. The user can click on one to select it or hit cancel.The font picker is built on this FontManager class that searches the phone for available fonts, and returns their names and pathnames in a hashmap.The dialog was built with inspiration from the companion DialogPreference that we adapted to be a dialogfragment.This system uses TTF files, and allows us to bundle third party fonts that we would like users to have access too. No outside fonts are bundled as of yet.

  5. A save button combines the currently created text with the ad bitmap and then returns to the main EditorActivity.

Bugs

The ad bitmap is shown scaled. We track the text coordinates in relation to the scaled bitmap. When the two views are combined however, the full size bitmap is used, which means the text coordinates (and size) are different. The resulting ad has smaller text in a different position then what was placed. A similar problem happens with logo placement.

Planned Features

  1. Gesture recognition for changing the font placement and size.
  2. Ability to zoom in on the picture
  3. Rotation of the text
  4. Allowing text on a curve https://xjaphx.wordpress.com/2011/12/01/image-processing-draw-text-on-a-curve/
  5. Undo functionality
  6. Different layers of text. 7.Letting users edit text that they placed in a different session.
Clone this wiki locally