create account

ShaderEdittor Needs An Undo, And A Redo Button by rufans

View this thread on: hive.blogpeakd.comecency.com
· @rufans ·
$5.67
ShaderEdittor Needs An Undo, And A Redo Button
#### Repository: 
https://github.com/markusfisch/ShaderEditor


Suggested on the [project repository](https://github.com/markusfisch/ShaderEditor/issues/92).

#### Components
 
My suggestion will require two buttons to be added at the top of the Editor's interface.

#### Proposal

 There are some basic, or necessary features an app needs to have. Although, it doesn't mean every app out there must have every basic feature, but at least have the basic ones that are related, or needed to give better, or good user experience. 

A few days ago, I had a lot of fun using ShaderEdittor. While using the app as an editor for my shaders code, there are some options I  found missing, as these options are;

* Ability to undo
* Ability to redo the undone.

#### Effect of not having those features

Currently, while typing in the editor, and the user mistakenly deletes a line of their vital codes, the action can't be undone because there is no such key to undo the action. It'd be nice to have these two options implemented. 
The two opinions should act similar to the undo, and redo we see on other apps. Here's a brief definition;
* **Undo**: Erases the last change done to the codes. reverting it to an older state.

* **Redo:** The opposite of undo is to redo. The redo command reverses the undo action.

### One more request

 Currently, the top of Editor's interface looks occupied as you can see from the image below.
![Screenshot_20190414-050622.png](https://cdn.steemitimages.com/DQmXFyQgFBnAxRgTpbGf4bnykSqVx6nu3xyF3vMyAvo7BGc/Screenshot_20190414-050622.png)

So, I was wondering if the available icons can be made smaller? So as to have space for Redo, and Undo option. But, if making the icons smaller isn't possible, then I suggest the removal of the **Tab button**.

I understand that the tab button helps the user to modify their codes for easy readability. But, I believe that the space bar on the user's keypad can also be used to create tabs. So, the Redo an undo option is more Important than the Tab option.

#### Mockups / Examples

The first image below shows the Tab button, and how occupied the options are. The second screenshot shows the replacement of the tab button with the suggested options.

![hey1.png](https://cdn.steemitimages.com/DQmavpNguvsp2k8anZhTmMo6MU6bbEyaAPYFGWLRZCJSwhm/hey1.png)

# How can this be done?

I have taken the time to find the sample code. And, I am glad to provide this awesome code by **zeleven**.

```

public class MainActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Button redoBtn = (Button) findViewById(R.id.redo);
        Button undoBtn = (Button) findViewById(R.id.undo);
        EditText editText = (EditText) findViewById(R.id.edittext);
      
        // pass edittext object to TextViewUndoRedo class
        TextViewUndoRedo helper = new TextViewUndoRedo(edittext);
        
        // call the method from TextViewUndoRedo class
        redoBtn.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            helper.redo(); // perform redo
          }
        });
        undoBtn.setOnClickLisener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            helper.undo(); // perform undo
          }
        });
    }
}


```
The complete codes can be found [Here.](https://gist.github.com/zeleven/0cfa738c1e8b65b23ff7df1fc30c9f7e)


# Benefits of Undo & Redo button

I would love to generally state the overview importance of Redo and undo button over the Tab option.

* If the Tab option isn't available, users will be able to create tabs will space keypad.
* If the Redo, and undo option is missing, users who might have mistakenly cleared their codes would have to start typing all over again.


#### GitHub Account

[Realrufans](https://github.com/realrufans)
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 23 others
properties (23)
authorrufans
permlinkshaderedittor-needs-an-undo-and-a-redo-button
categoryutopian-io
json_metadata{"tags":["utopian-io","ideas","app","android"],"app":"steem-plus-app"}
created2019-04-14 04:52:27
last_update2019-04-14 04:52:27
depth0
children5
last_payout2019-04-21 04:52:27
cashout_time1969-12-31 23:59:59
total_payout_value4.296 HBD
curator_payout_value1.373 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,991
author_reputation101,081,674,466,198
root_title"ShaderEdittor Needs An Undo, And A Redo Button"
beneficiaries
0.
accountsteemplus-pay
weight100
1.
accountutopian.pay
weight500
max_accepted_payout100,000.000 HBD
percent_hbd10,000
post_id83,057,953
net_rshares9,672,865,761,596
author_curate_reward""
vote details (87)
@steem-plus ·
SteemPlus upvote
Hi, @rufans!

You just got a **1.72%** upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in [here](https://steemit.com/@steem-plus) to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.
properties (22)
authorsteem-plus
permlinkshaderedittor-needs-an-undo-and-a-redo-button---vote-steemplus
categoryutopian-io
json_metadata{}
created2019-04-14 14:30:48
last_update2019-04-14 14:30:48
depth1
children0
last_payout2019-04-21 14:30:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length433
author_reputation247,952,188,232,400
root_title"ShaderEdittor Needs An Undo, And A Redo Button"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id83,082,968
net_rshares0
@steem-ua ·
$0.03
#### Hi @rufans!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
**Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
πŸ‘  
properties (23)
authorsteem-ua
permlinkre-shaderedittor-needs-an-undo-and-a-redo-button-20190415t040212z
categoryutopian-io
json_metadata"{"app": "beem/0.20.19"}"
created2019-04-15 04:02:12
last_update2019-04-15 04:02:12
depth1
children0
last_payout2019-04-22 04:02:12
cashout_time1969-12-31 23:59:59
total_payout_value0.021 HBD
curator_payout_value0.007 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length285
author_reputation23,214,230,978,060
root_title"ShaderEdittor Needs An Undo, And A Redo Button"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id83,115,988
net_rshares46,437,849,223
author_curate_reward""
vote details (1)
@syedumair ·
$10.84
Hello @rufans!
Thank you for contributing.
The contribution is written nicely and you have explained every section in good detail, well done for that!
I admit that ``undo and redo`` are features of some importantance to this application but we expect much better, unique and original feature suggestions from our contributors.
I know you have the ability to contribute consistently with excellent ideas, all you need to do is to be unique and original while contributing. Don't suggest the features which are seen in every other similar application, by doing this, you will get a better score and of course a better reputation within the utopian.

We are already looking for your next contribution.


Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/7/4-3-2-3-2-4-2-3-).

---- 
Need help? Chat with us on [Discord](https://discord.gg/uTyJkNm).

[[utopian-moderator]](https://join.utopian.io/)
πŸ‘  , , , , , , , , , , , , ,
properties (23)
authorsyedumair
permlinkre-rufans-shaderedittor-needs-an-undo-and-a-redo-button-20190415t032614903z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["rufans"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/7/4-3-2-3-2-4-2-3-","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2019-04-15 03:26:18
last_update2019-04-15 03:26:18
depth1
children1
last_payout2019-04-22 03:26:18
cashout_time1969-12-31 23:59:59
total_payout_value8.218 HBD
curator_payout_value2.618 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,151
author_reputation217,827,463,642,367
root_title"ShaderEdittor Needs An Undo, And A Redo Button"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id83,114,459
net_rshares17,328,059,803,390
author_curate_reward""
vote details (14)
@utopian-io ·
Thank you for your review, @syedumair! Keep up the good work!
properties (22)
authorutopian-io
permlinkre-re-rufans-shaderedittor-needs-an-undo-and-a-redo-button-20190415t032614903z-20190417t120638z
categoryutopian-io
json_metadata"{"app": "beem/0.20.17"}"
created2019-04-17 12:06:39
last_update2019-04-17 12:06:39
depth2
children0
last_payout2019-04-24 12:06:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length61
author_reputation152,955,367,999,756
root_title"ShaderEdittor Needs An Undo, And A Redo Button"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id83,255,343
net_rshares0
@utopian-io ·
Hey, @rufans!

**Thanks for contributing on Utopian**.
We’re already looking forward to your next contribution!

**Get higher incentives and support Utopian.io!**
 Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via [SteemPlus](https://chrome.google.com/webstore/detail/steemplus/mjbkjgcplmaneajhcbegoffkedeankaj?hl=en) or [Steeditor](https://steeditor.app)).

**Want to chat? Join us on Discord https://discord.gg/h52nFrV.**

<a href='https://steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
properties (22)
authorutopian-io
permlinkre-shaderedittor-needs-an-undo-and-a-redo-button-20190415t190655z
categoryutopian-io
json_metadata"{"app": "beem/0.20.17"}"
created2019-04-15 19:06:57
last_update2019-04-15 19:06:57
depth1
children0
last_payout2019-04-22 19:06:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length588
author_reputation152,955,367,999,756
root_title"ShaderEdittor Needs An Undo, And A Redo Button"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id83,156,102
net_rshares0