General :: Adding Undo / Redo Function To Text Editing

Oct 27, 2012

Would it be (easily) possible (for a dev, so not me) to add undo/redo buttons to text editing? This is a HUGE feature missing in Android, soon 2013, five years of android, and still not there...

General :: Adding undo / redo function to text editing


General :: Text Edit Copy Cut Paste - But Undo / Redo Missing?

Sep 1, 2012

On galaxy phone you can, like on iPhone, copy cut and paste text. However, undo and two is badly missing. So I'm searching for an add-on or app that would fix this.

View 9 Replies View Related

Android :: Fast Undo - Redo With Memento - Command Pattern

Jul 14, 2010

I'm writing a painting/graphics Java application for a mobile phone (so memory is limited). The application state is essentially three 1000x500 bitmaps (i.e. layers of a painting). Loading three bitmaps takes about 2 or 3 seconds.

I'm trying to write an undo engine but I just cannot work out a good way to do it. The typical approaches are:

Use the command pattern: When you undo, you reload the state of the initial file and then playback all the commands processed so far except for the final one. Doing this naively though means waiting 2 or 3 seconds to load the initial state which is too slow. There isn't enough memory to store the initial state in memory either.

Use the memento pattern: When you undo, you replace the part of the current state that was changed with the old state. This means every action needs to save bitmaps of the old state to disk because there just isn't enough memory on a mobile device to store this in memory. As saving bitmaps takes time, how do I cope if the user decides to e.g. paint many brush strokes in quick succession? I cannot make them wait.

View 1 Replies View Related

Android :: Implementing A Robust Persistent Undo/redo Feature

Oct 27, 2010

I'm writing a bitmap editor where I use the Command Pattern to represent actions that will transform the document. I keep all the commands executed so far in a list and, to implement undo, I restore the document to its initial state and then replay all but the last command.

I would like my undo/redo system to have the following feature: When the user closes the editor and returns, the document, including the available undo and redo commands, should be restored to the state it was in when the user left.

I'm implementing this for Android where your application can be given very little notice before it will be cleared from memory if e.g. the user gets a phone call. Also, some of my commands are e.g. a list of all the x,y co-ord the user painted on so these might take a few moments to save to disk.

My current idea is as follows:

When a new action is performed, the command object is added to a list S for commands that need to be saved to disk.

A background thread is used that will continually take commands from list S and save them to disk. The postfix of the filenames used will be numbered in sequence. For example, if the user filled the screen then drew 2 circles, the command files might be called FillCommand1.cmd, DrawCircleCommand2.cmd, DrawCircleCommand3.cmd.

Periodically, we save a "checkpoint" command whose purpose is to store the full document state so that, even if one of the .cmd files is corrupted, we can restore a recent version of the document.
When the user exits the app, the background thread attempts to finish up saving all the commands it can (but it might get killed).

On startup, we look for the most recent .cmd file that represents a checkpoint that we can load successfully. All the .cmd files we can load after this (i.e. some files might be corrupt) go in the redo command list, all the .cmd files we can load between the first checkpoint loaded and the oldest checkpoint we can load go in the undo list.


I want the undo limit to be about 20 or 30 commands back so I need extra logic for discarding commands, deleting .cmd files and I've got to worry about multi-threading behaviour. This system seems pretty complex and will need a lot of testing to make sure it doesn't go wrong.

Is there anything in Java or Android than can help make this easier? Am I reinventing the wheel anywhere? Maybe a database would be better?

View 2 Replies View Related

General :: Text Editing In Android Text Fields?

Jul 15, 2012

There is obviously a mechanism for selecting, cutting, pasting, and generally editing text in text fields. Little pointer widgets appear under text from time to time. In general, I can't figure out how to use them. Furthermore, on a Kindle screen (which is bigger than a smartphone screen) I can't touch or drag them accurately--they're too small, the drags required are too small, and there isn't any automatic magnifier like there is on my iPod Touch.

What I find particularly frustrating is that I can't find an easy way to move the insertion point back and forth one character at a time, the way I would with cursor keys, and I can't find any easy way to delete the character just ahead of the cursor.

Is there some kind of how-to guide that spells out just how to do text editing within text fields on a touchscreen Android device?

View 1 Replies View Related

Android :: WTF No Editing Undo On Android

Jan 29, 2010

Say you accidentally deleted too much text from a note, or an edit field. On my 2004 Windows mobile PDA phone, I could undo by tapping Ctrl+Z. On a 2006 iPhone, you can undo by shaking the phone. Undo is a a very basic and useful feature.

View 5 Replies View Related

Android :: Adding - Editing - Deleting Entries In Call Log

Dec 15, 2009

I have been looking at Androids call log content provider and have managed to pull the data from it and display it in my own app. However I want to be able to write to the call log, is there anyway of doing this?

View 7 Replies View Related

HTC Droid Eris : Make Landscape Keyboard Available When Adding - Editing Contacts?

Mar 22, 2010

Is there ANY way to make the landscape keyboard available when adding or editing Contacts? I'm using the Talk To Me keyboard and it will not go into landscape mode when using Contacts; I remember that the stock keyboard didn't, either.

View 2 Replies View Related

General :: Adding Or Deleting Text From Lock Screen?

Feb 5, 2012

How to add or delete text from lock screen?

View 2 Replies View Related

HTC EVO 4G :: Text Editing - How Do You Move Over One Character?

May 14, 2010

On the droid, you can use the d-pad.. on the incredible, you can use the optical sensor. is there a way just to move over one character space in Android with software?

View 5 Replies View Related

HTC Incredible :: Magnify Glass When Editing Text

May 9, 2010

Is there a way to add a magnify glass to txt fields like the iphone has? it would make it ALOT easier to go back and edit text when swyping. It always takes several clicks before I put the cursor exactly where I want.

View 4 Replies View Related

HTC Hero :: (Copy / Paste) Editing Phone Number From Text Message?

May 12, 2010

I am switching from a BB. I receive text messages from my office with client's phone numbers. We prefer to keep our mobile numbers private, so we need to block our caller id on a per call basis. It wouldn't work for us to block caller id on all calls. On my BB, I would copy and paste the number and then add *67 as a prefix.

On the Hero I can't find a way to edit the phone number from the text message. I can delete it, but can't add to it. Most of these numbers I would not want to add to my address book. I had my office text the number with *67 as a prefix, but the Hero doesn't recognize the *. It just copies the digits. What workaround options do I have?

View 3 Replies View Related

Sony Ericsson Xperia X10 :: Move Phone Cursor To Different Locations In Text Editing?

Sep 1, 2010

Has anyone found an easy, reliable way to reposition the cursor so that you can modify text you've already written? The only suggestion I was given was to "swipe" the cursor over to where I wanted it, which turns into a series of moves that have the cursor jumping all over the place. Are there no equivalents to the "cursor arrows" that let you move the cursor up, right & left?

Does anyone have a better way?

View 4 Replies View Related

General :: Undo Typing In Android?

Apr 30, 2013

Is it not possible to Undo Typing in Android? I cannot tell you how many times I used the auto spell checker to correct a word and it wiped-out an entire sentence instead of the word I was typing and I wanted to through my phone on the floor in frustration! At the very least, there SHOULD be an undo feature ... somewhere!!

View 3 Replies View Related

Android :: Want To Modify A Text In File Function

Apr 4, 2010

I want to modify a text file using Android program . I searched about that and i found that I have to copy whole content of file and than Modify it and save it to other file and than Delete Original file and rename the Modified one. I tried file.delete() method But i am getting error of permission denied to delete that file. So can anyone help me As Soon As possible.

View 4 Replies View Related

HTC Droid Eris :: Vibrate Function With Text Messages

Mar 16, 2010

Im recently having a problem with the vibrate function with text messages. When getting a new text, it acts as if its on silent and not vibrate or anything but when i receive a phone call it vibrates. So i download Handscent to see if it vibrates with that app and it didnt. I have been throuh all the settings it seems like and I still cant get a vibrate with new sms messages.

View 45 Replies View Related

Nexus :: Transfer All Settings And Installations Without Having To Redo Whole Setup?

Jun 23, 2010

I want to root but is it possible to transfer all my settings and installations etc without having to redo my whole setup?

View 1 Replies View Related

Android :: How To Use Three Unicode Values In Android In Text Editing Area?

Oct 12, 2010

I am trying to display two Hindi characters in the text editing area. These characters are a combination of three unicode characters. For example: In order to display number 9, I use HTE following in the XML file:
<Key android:codes="57" android:keyLabel="9"/>

One character is a combination of three unicodes --> 0915 094D 0937 How should the XML file be modified in order to display the above two hindi characters ? How can I use three unicode values in android: codes in the text editing area?

View 3 Replies View Related

Android :: Implement Quick Search Function With Edit Text?

Oct 15, 2010

I am new to android.what i did is implementing the search with the edit text for that i am
writing the code...

it works fine,but i am getting problem when key pad of device in active.it dose implement when keypad in active while minimizing the key pad code then only it runs. what's problem i can not understand pls help me.post some code or link.

View 1 Replies View Related

Android :: How To Redo Application To Display Incoming Phone Number?

May 6, 2009

How would one redo the application that displays the incoming phone number. I assume it's a content provider or a service that can be replaced.

View 2 Replies View Related

Adding Text Inside A Circle

Oct 10, 2012

how can I add text inside a circle? the circle is made by Canvas.

View 3 Replies View Related

Samsung Captivate :: Cut And Paste Function From Browser Window Or Text Editor?

Nov 19, 2010

Can't I cut and paste from a browser window or text editor like you can on the iPhone?

View 1 Replies View Related

Android :: Adding Scroll To XML (Images And Text) Possible?

Nov 8, 2010

I asked about adding images and text and I was told to put it in to a xml. Now my text goes farther than the xml. Is there a way I can add a scroll to it or will I have to go about another route to get the effects I need.

View 1 Replies View Related

HTC Droid Eris :: Adding Phone Number To A Text

Dec 21, 2009

Is there a way to add a phone number from your Contacts to a text message, without attaching the contact as a vCard? Some of my friends can't get the attachment and I just want to be able to copy and paste the number into the text body.

View 2 Replies View Related

Android :: Adding Button To Efficient Adapter Which Has Icon And Text?

Apr 19, 2010

I want to create a layout in such a way that on top edittext and button should be there in one row. The search text I enter in editext and click on search button. Then I want to display a custom list view where each row contains image and text.(As per the API demos example list14 I have tried). But when I run the application, button and edittext are being added to each row (i.e., Each row contains a image, text, editext, button.

Below is my xml file:
<!--
<FrameLayout android:layout_width="wrap_content"
android:layout_height="0dip" android:layout_weight="1"></FrameLayout>
-->
<ImageView android:id="@+id/icon" android:layout_width="48dip"
android:layout_height="48dip" />
<TextView android:id="@+id/text" android:layout_gravity="center_vertical"
android:layout_width="0dip" android:layout_weight="1.0"
android:layout_height="wrap_content" />
<!--
<EditText android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/prdsearchtb"
android:text="@string/tb_prd_search_lbl"></EditText>
-->
<!--
<TableLayout android:id="@+id/TableLayout01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"> <TableRow>
-->
<Button android:id="@+id/prdsrcbutton" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="@string/btn_lbl_prd_search"
android:layout_x="2px" android:layout_y="410px"></Button>
<!-- </TableRow>
</TableLayout>
-->
and Java File:
/**
*
*/
package org.techdata.activity;

import android.app.AlertDialog;
import android.app.ListActivity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

/**
* @author jayanthg
*
*/
public class ProductSearch extends ListActivity {
private static class ProductSearchAdapter extends BaseAdapter {
private LayoutInflater mInflater;
private Bitmap mIcon1; private Bitmap mIcon2;
public ProductSearchAdapter(Context context) {
mInflater = LayoutInflater.from(context);
// Icons bound to the rows.
mIcon1 = BitmapFactory.decodeResource(context.getResources(),
R.drawable.icon48x48_1);
mIcon2 = BitmapFactory.decodeResource(context.getResources(),
R.drawable.icon48x48_2);
} @Override public int getCount() { return DATA.length;
} @Override public Object getItem(int position) { return position;
} @Override public long getItemId(int position) { return position;
} @Override public View getView(final int position, View convertView,
ViewGroup parent) { ViewHolder holder; Button btn=null;
if (convertView == null) { convertView = mInflater.inflate(R.layout.productsearch, null);
// Creates a ViewHolder and store references to the two children
// views // we want to bind data to. holder = new ViewHolder();
holder.text = (TextView) convertView.findViewById(R.id.text);
holder.icon = (ImageView) convertView.findViewById(R.id.icon);
btn=(Button)convertView.findViewById(R.id.prdsrcbutton);
convertView.setTag(holder);
} else {
// Get the ViewHolder back to get fast access to the TextView
// and the ImageView. holder = (ViewHolder) convertView.getTag();
}
// Bind the data efficiently with the holder.
holder.text.setText(DATA[position]);
holder.icon.setImageBitmap((position & 1) == 1 ? mIcon1 : mIcon2);
holder.icon.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
Log.i("image", " u clicked on icon Position" + position);
} } );
holder.text.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
Log.i("Text", " u clicked on text Position" + position);
} } );
btn.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
Log.i("Button","U clicked on button");
} } ); return convertView;
} static class ViewHolder { TextView text; ImageView icon;
} private static final String[] DATA = ListView product_search_list;
Button srch_btn;
EditText srch_text; @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setListAdapter(new ProductSearchAdapter(this));
// setContentView(R.layout.productsearch);
// getListView().setEmptyView(findViewById(R.id.text));
// srch_text = (EditText)findViewById(R.id.prdsearchtb);
// srch_btn = (Button) findViewById(R.id.prdsearchtb);
// srch_btn.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// callProductSearchAdapter();
// }
// });
} void callProductSearchAdapter() { setListAdapter(new ProductSearchAdapter(this));
} private void createDialog(String title, String text, final Intent i) {
if (i == null) { AlertDialog ad = new AlertDialog.Builder(this).setIcon(
R.drawable.alert_dialog_icon).setPositiveButton("Ok", null)
.setTitle(title).setMessage(text).create();
ad.show();
} } }

View 2 Replies View Related

HTC Incredible :: How Can You Skip Predictive Text Without Adding Word To Dictionary?

Jul 31, 2010

While using the predictive text in the DINC I sometimes want to type something that isn't a word like an acronym or some abbreviation. Predictive text will suggest a word close to what I am typing but I don't want that. It offers exactly what I am typing as an option but then it adds that text to the dictionary. Sometimes that's great but most of the time I want to simple use the term once and not add it to to dictionary. If I type space it will change my text. If I select the offered override it adds the text to my dictionary. How do I just keep what I am typing?

View 5 Replies View Related

Android :: Displaying XML-based Layout / Adding Text Dynamically

Sep 12, 2009

I have a LinearLayout defined in XML that I want to use repeatedly to display elements of a list. The XML-layout 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="wrap_content"
android:background="@drawable/background"
android:paddingBottom="5px">

<TextView
android:id="@+id/destination"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="22dp"
android:text="@string/test_destination"
android:paddingLeft="5px"/>

<TextView
android:id="@+id/date"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="15dp"
android:text="@string/test_date"
android:paddingLeft="5px"/>

<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/info"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingLeft="5px"
android:paddingTop="10px" >

I gather information about certain events from a webpage, and then I want to display all events in a list using the above layout for each event. My current approach is to have a LinearLayout as parent and then adding each event as a row.

Problem number one is to add the layout to each event (the number of events is varying). I.e., I want to dynamically inflate this layout for each event. I also don't want the text to be hard coded into the layout (as above) but added at runtime. I don't know how to do this. I have tried something like the following without any success.

LinearLayout eventView = (LinearLayout) findViewById(R.layout.event);
parentView.addView(eventView);


Problem number two is then to add these layouts to the parent view group and display it on the screen. When I try to do this using parent.addView(child), the program crashes at runtime and I can't figure out why.

It's kind of hard to describe the specific problem, since I'm new to GUI-programming on Android and I'm sort of programming by trial and error right now. Anyway, if you are able to help me with some of the problems it would be greatly appreciated. Linus

EDIT:
The problem now is adding text dynamically to the TextViews. I try this:

TextView dest = (TextView) findViewById(R.id.destination);dest.setText("myText");

only to discover that dest is null. Any ideas why and how to fix this?

EDIT 2:
I have narrowed the problem even more, but I really don't understand its nature. This is the trouble-method: Code...
it somehow works (even though the events are displayed in reverse order). Anyone knows what's going on here?

View 2 Replies View Related

General :: Editing SMS Database On PC

Aug 6, 2012

I need editing my sms database on Windows PC..

I tried SQLite Database Browser but it does not work, all that happens is the name of the db shows on the top but the browser stays empty like nothing changed. I also tried just to use notepad++ but it opens in what seems like encrypted.

What other options do I have to be able to edit it? Its my Evo3D mmssms.db that I'm looking to edit.

View 3 Replies View Related

General :: Editing Stock Rom On SGY?

Apr 18, 2012

I have a few questions about my Samsung Galaxy Young - 5360.

1. How to edit the status bar icons like battery, 3G , etc.

2. How to make a folders in the menu coz i have 7 pages of apps , and its out of order ( shuffle). This is for now.

P.S. I'm talking about the stock rom. I don't wanna a custom rom , prefer the original one. And the phone is not rooted, but i will if need.

View 8 Replies View Related

General :: Audio Editing Right On Phone?

Sep 18, 2013

Is there any editing software you can use right on the phone? For example, for podcasts or songs I have on the phone, if I want to keep just a piece of one, is there anything I can use right on the phone to trim the file down?

SAMSUNG-SGH-I317

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved