Designing a terminal like app


trying to design an application in which a user can input commands just like a terminal... let's say the interface should look like that of terminal emulator...... an example here....
for example
"user-als234e:/$" on the left and the user input commands like "ping" on the right to form "user-als234e:/$ ping127.0.0.1" (just an example).... then on pressing the enter key, the command is carried out,a reply is given below it, then the same "user-als234e:/$" reappears below for other commands.
user-als234e:/$ ping127.0.0.1
ping successful
AND ALSO, I DONT WANT "user-als234e:/$" to be modifiable....
Now the problem is what kind of widgets or views or edittexts can i use?(for example maybe putting textview on the left and edittext on the right??) and how do i organise them such that "user-als234e:/$" is never modifiable.same as the replies ("ping successful" for example)
To cut the long story short,i want it to be like a terminal...please i just need the ideas to know how to go about that it functions like a normal terminal...i will be very grateful if someone can help me pls.


Set the onChangeText on textview, to prevent this symbols removing

It sounds like you're looking for a write-once-run-anywhere solution.You can look at:

  • web-based solutions (e.g. progressive web apps)
  • hybrid solutions (e.g. Ionic)
  • near-native solutions (e.g. React Native, NativeScript)
  • cross-compiling solutions (eg. Intel XDK)

...and probably a few other categories.

If none of those suit your needs, you will have to:

  • embed the logic in Firebase security rules and/or
  • write an intermediary or auxiliary server (see this article on application architectures) and/or
  • duplicate logic into apps written in the native technology of iOS and Android

If you don't need to pass any variable after creating the Fragment instance, pass the parameter in the constructor like this.

PersonDetailFragment fragment = new PersonDetailFragment(personID);

Being the constructor of the Fragment like this:

public PersonDetailFragment(String personID) {
        // Required empty public constructor

If you want to communicate constantly with the activity you can implement interfaces. Read this article, It's a good point to start with them, listeners.

By : Enrique

This video can help you solving your question :)
By: admin