Skip to content

Commit

Permalink
sub
Browse files Browse the repository at this point in the history
  • Loading branch information
HanzoDev1375 committed Aug 5, 2024
1 parent 587a25c commit 2ee88cc
Show file tree
Hide file tree
Showing 47 changed files with 33,178 additions and 35,756 deletions.
35 changes: 30 additions & 5 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
## Ghost web ide
<div align = "center">
<h3>Ghost ide fast Editor Android</h3>

</div>

<p align="center">
<img align="center" src="https://raw.githubusercontent.com/appt2/Ghost-web-ide/main/app/src/main/res/mipmap-xxxhdpi/ghosticon.png"/>
</p>

### Image App
### ImageApp


<div align = "center">

<img style="width: 25%; height: 80%; margin-bottom :2px; border-radius :9px; " src="https://raw.githubusercontent.com/appt2/Ghost-web-ide/main/images/img1.jpg">
<img style="width: 25%; height: 80%; margin-bottom :2px; border-radius :9px; " src="https://raw.githubusercontent.com/appt2/Ghost-web-ide/main/images/img1.jpg">
<img style="width: 25%; height: 80%; margin-bottom :2px; border-radius :9px; " src="https://raw.githubusercontent.com/appt2/Ghost-web-ide/main/images/img2.jpg">
<img style="width: 25%; height: 80%; margin-bottom :2px; border-radius :9px; " src="https://raw.githubusercontent.com/appt2/Ghost-web-ide/main/images/img3.jpg">
<img style="width: 25%; height: 80%; margin-bottom :2px; border-radius :9px; text-align :left; " src="https://raw.githubusercontent.com/appt2/Ghost-web-ide/main/images/img4.jpg">

</div>


Expand Down Expand Up @@ -53,6 +55,8 @@

- [ ] Ruby Compiler

- [x] Physical keyboard


### Supported Languages

Expand Down Expand Up @@ -143,4 +147,25 @@ I must say that you do not have the right to register the program under your own
```

#### Note
You can put any name you like, but English and with small letters like Jason's example. In the future, all supported languages ​​of Ghost Web support this feature.
You can put any name you like, but English and with small letters like Jason's example. In the future, all supported languages ​​of Ghost Web support this feature.

### Physical keyboard

Ghost Web supports physical keyboard
Some physical keyboard support includes

`Ctrl` and `F` -> `File creator`

`Ctrl` and `G` -> `Git clone`

`Ctrl` and `S` -> `Open Settring App`

`Ctrl` and `F1` -> `Folder creator`

`Ctrl` and `J` -> `Json to java`

`Ctrl` and `D` -> `Open Drawer`

`Ctrl` and `A` -> `Open ApkView`

`Ctrl` and `T` -> `Open Terminal`
14 changes: 14 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,20 @@
android:enabled="false"
android:targetActivity=".MainActivity"

>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>

<activity-alias
android:name=".MainActivityghost"
android:label="@string/app_name"
android:icon="@drawable/ghosticons"
android:enabled="false"
android:targetActivity=".MainActivity"

>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/java/Ninja/coder/Ghostemane/code/IdeEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -420,5 +420,14 @@ public void restoreState(@NonNull Bundle savedInstanceState) {
Log.e("EditorBindError ", err.getLocalizedMessage());
}
}

public int getLineCountes() {
return getLineCount();
}

public String formatLine() {
return String.format("%s...%s", 1, getLineCount());
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,8 @@ public void Enter() {
editor.setAutoCompletionOnComposing(false);
editor.setLineInfoTextSize(20f);
editor.setBlockLineEnabled(true);
if(getvb.contains("chars")){
editor.setCustomCharName(getvb.getString("chars",""));
if (getvb.contains("chars")) {
editor.setCustomCharName(getvb.getString("chars", ""));
}

var projectz = new ProjectManager();
Expand All @@ -599,7 +599,7 @@ public void Enter() {
modelEditor.setText(event.getEditor().getText().toString());
var cu = event.getEditor().getCursor();
modelEditor.setCursor(cu.getLeftLine() + cu.getLeftColumn());
var myChar= new CharUtil(editor.getText().toString(),titleauthor);
var myChar = new CharUtil(editor.getText().toString(), titleauthor);
});

if (sve.contains("getAutoSave")) {
Expand Down Expand Up @@ -702,7 +702,7 @@ public void Enter() {
menupopnew.setColorFilter(0xFFEEEEEE, PorterDuff.Mode.MULTIPLY);
image.setColorFilter(0xFFFFB689, PorterDuff.Mode.MULTIPLY);
titleauthor.setTextColor(0xFFFDA893);

_fab.setBackgroundTintList(ColorStateList.valueOf(0xFF2B2122));
_fab.setStrokeColor(ColorStateList.valueOf(0xFFFDB69A));
_fab.setStrokeWidth(1);
Expand Down Expand Up @@ -741,12 +741,10 @@ public void Enter() {
DataUtil.showMessage(getApplicationContext(), "Custom Font Not Found");
titleauthor.setTypeface(
Typeface.createFromAsset(getAssets(), "fonts/ghostfont.ttf"), Typeface.NORMAL);


} else {
_editorsetfontfromfile(setfont.getString("mfont", ""));
titleauthor.setTypeface(Typeface.createFromFile(new File(setfont.getString("mfont", ""))));

}
} else {
editor.setTypefaceText(Typeface.createFromAsset(getAssets(), "ghostfont.ttf"));
Expand Down Expand Up @@ -827,6 +825,7 @@ public void _managerpanel(final View _view) {
.addItem(new PowerMenuItem("Save All (Beta)", false, R.drawable.setsavefileall))
.addItem(new PowerMenuItem("Code nave", false, R.drawable.setsavefileall))
.addItem(new PowerMenuItem("File List"))
.addItem(new PowerMenuItem("Test"))
.build();
pvr.setSelectedMenuColor(0xFFFDA893);
pvr.setIconPadding(8);
Expand Down Expand Up @@ -969,6 +968,11 @@ public void onClick(DialogInterface dialog, int which) {
.show();
break;
}
case 7:
{
editor.setDuplicateLine();
break;
}
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import android.provider.Settings;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down Expand Up @@ -2448,4 +2449,56 @@ public void EndTask() {
public void onLongClick(View view, int pos) {
_newItemSheet(pos, view);
}

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (event.isCtrlPressed()) {
switch (keyCode) {
case KeyEvent.KEYCODE_S:
// open settings
startActivity(new Intent(getApplicationContext(), SettingAppActivity.class));
return true;
case KeyEvent.KEYCODE_F:
/// open dialog make folder
FolderMaker();
return true;
case KeyEvent.KEYCODE_F1:
FileMaker();
return true;
case KeyEvent.KEYCODE_G:
// git
_dialoggits();
return true;
case KeyEvent.KEYCODE_D:
// open drawer
if (!_drawer.isOpen()) {
_drawer.open();
}
return true;
case KeyEvent.KEYCODE_J:
// open gson to java
var jsonToJava =
new GsonToClass(
FileDirActivity.this,
Folder,
() -> {
reLoadFile();
});
jsonToJava.run();
return true;
case KeyEvent.KEYCODE_T:
// open terminal
startActivity(new Intent(getApplicationContext(), TerminalActivity.class));
return true;
case KeyEvent.KEYCODE_A:
// open apk manager;
startActivity(new Intent(getApplicationContext(), ApkViewActivity.class));
return true;
case KeyEvent.KEYCODE_ESCAPE:
BackPressed();
return true;
}
}
return super.onKeyDown(keyCode, event);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,10 @@ protected void onCreate(Bundle _savedInstanceState) {
setContentView(bin.getRoot());
findAndMatchIdInview();
installToRun();

}

private void findAndMatchIdInview() {

setSupportActionBar(bin.Toolbar);

getSupportActionBar().setDisplayHomeAsUpEnabled(true);
Expand All @@ -72,7 +71,7 @@ private void findAndMatchIdInview() {
qo = getSharedPreferences("qo", Activity.MODE_PRIVATE);
databind();
reloadConsoleJs();

bin.web.setWebChromeClient(
new WebChromeClient() {
@Override
Expand Down Expand Up @@ -427,8 +426,19 @@ public void reloadConsoleJs() {
+ erudaPath
+ "';"
+ "document.body.appendChild(script);"
+ "eruda.init();"
+ "script.onload = function () { eruda.add({name: 'My Theme', init: function () { var bgColor = '#333'; var textColor = '#fff'; document.querySelector('.eruda-container').style.backgroundColor = bgColor; var consoleEls = document.querySelectorAll('.eruda-console-item, .eruda-header'); for (var i = 0; i < consoleEls.length; i++) { consoleEls[i].style.color = textColor; } }}); }"
+ "eruda.init({"
+ "\n"
+ " defaults: {"
+ "\n"
+ "displaySize: 77,"
+ "\n"
+ "transparency: 1,"
+ "\n"
+ "theme: 'Material Darker'"
+ "\n"
+ "}"
+ "\n"
+ "});"
+ "})();";
bin.web.post(() -> bin.web.loadUrl("javascript:" + js));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ public void onItemClick(AdapterView<?> _param1, View _param2, int _param3, long
}
});
map.clear();
for (int c = 0; c < (int) (8); c++) {
for (int c = 0; c < 9; c++) {
{
HashMap<String, Object> item = new HashMap<>();
item.put("key", "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@

public class ListAppIconAd extends BaseAdapter implements Adapter {

List<HashMap<String, Object>> data;

private List<HashMap<String, Object>> data;

public ListAppIconAd(List<HashMap<String, Object>> arr) {
data = arr;
public ListAppIconAd(List<HashMap<String, Object>> data) {
this.data = data;
}

@Override
Expand All @@ -38,7 +37,7 @@ public long getItemId(int index) {

@Override
public View getView(int position, View v, ViewGroup container) {

AppsBinding bin = AppsBinding.inflate(LayoutInflater.from(container.getContext()));
ObjectAnimator animator =
ObjectAnimator.ofFloat(bin.imageview1, "translationX", -10f, 10f, -5f, 5f, -2f, 2f, 0f);
Expand All @@ -49,7 +48,7 @@ public View getView(int position, View v, ViewGroup container) {
animator.start();

if (position == 0) {

bin.textview1.setText("پیشفرض");
bin.imageview1.setImageResource(R.mipmap.ghosticon);
}
Expand Down Expand Up @@ -81,8 +80,10 @@ public View getView(int position, View v, ViewGroup container) {
bin.textview1.setText("ابی تیره ۲ رنگ");
bin.imageview1.setImageResource(R.drawable.ghosticonbluemod);
}


if (position == 8) {
bin.textview1.setText("Ghost");
bin.imageview1.setImageResource(R.drawable.ghosticons);
}
return bin.getRoot();
}
}
Loading

0 comments on commit 2ee88cc

Please sign in to comment.