Bug Fixes

Bug Fixes
master
msmannan00 2020-12-24 13:55:18 +05:00
parent 5073cb8fb0
commit d6f76b3d2d
42 changed files with 709 additions and 371 deletions

View File

@ -126,7 +126,7 @@
android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize|locale|layoutDirection|smallestScreenSize|screenLayout" android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize|locale|layoutDirection|smallestScreenSize|screenLayout"
android:launchMode="singleTask" android:launchMode="singleTask"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustPan|adjustResize">
<intent-filter> <intent-filter>
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />

View File

@ -179,6 +179,7 @@ class geckoClients
} }
void onBackPressed(boolean isFinishAllowed){ void onBackPressed(boolean isFinishAllowed){
mSession.goBackSession();
if(mSession.canGoBack()){ if(mSession.canGoBack()){
mSession.goBackSession(); mSession.goBackSession();
} }

View File

@ -201,6 +201,7 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele
@Override @Override
public void onPageStart(@NonNull GeckoSession var1, @NonNull String var2) { public void onPageStart(@NonNull GeckoSession var1, @NonNull String var2) {
mCanGoBack = true;
if(mIsLoaded){ if(mIsLoaded){
if(!isPageLoading){ if(!isPageLoading){
mCurrentTitle = "loading"; mCurrentTitle = "loading";

View File

@ -18,8 +18,10 @@ import android.os.Handler;
import android.speech.RecognizerIntent; import android.speech.RecognizerIntent;
import android.text.Editable; import android.text.Editable;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.view.GestureDetector;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.WindowManager;
import android.view.inputmethod.EditorInfo; import android.view.inputmethod.EditorInfo;
import android.webkit.URLUtil; import android.webkit.URLUtil;
import android.widget.*; import android.widget.*;
@ -38,6 +40,7 @@ import com.darkweb.genesissearchengine.appManager.landingManager.landingControll
import com.darkweb.genesissearchengine.appManager.languageManager.languageController; import com.darkweb.genesissearchengine.appManager.languageManager.languageController;
import com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogController; import com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogController;
import com.darkweb.genesissearchengine.appManager.orbotManager.orbotController; import com.darkweb.genesissearchengine.appManager.orbotManager.orbotController;
import com.darkweb.genesissearchengine.appManager.settingManager.searchEngineManager.settingSearchController;
import com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage.settingController; import com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage.settingController;
import com.darkweb.genesissearchengine.appManager.tabManager.tabController; import com.darkweb.genesissearchengine.appManager.tabManager.tabController;
import com.darkweb.genesissearchengine.appManager.tabManager.tabRowModel; import com.darkweb.genesissearchengine.appManager.tabManager.tabRowModel;
@ -49,6 +52,7 @@ import com.darkweb.genesissearchengine.constants.strings;
import com.darkweb.genesissearchengine.dataManager.dataController; import com.darkweb.genesissearchengine.dataManager.dataController;
import com.darkweb.genesissearchengine.dataManager.dataEnums; import com.darkweb.genesissearchengine.dataManager.dataEnums;
import com.darkweb.genesissearchengine.helperManager.KeyboardUtils; import com.darkweb.genesissearchengine.helperManager.KeyboardUtils;
import com.darkweb.genesissearchengine.helperManager.SimpleGestureFilter;
import com.darkweb.genesissearchengine.helperManager.eventObserver; import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod; import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.darkweb.genesissearchengine.pluginManager.pluginController; import com.darkweb.genesissearchengine.pluginManager.pluginController;
@ -77,6 +81,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
private homeViewController mHomeViewController; private homeViewController mHomeViewController;
private homeModel mHomeModel; private homeModel mHomeModel;
private geckoClients mGeckoClient = null; private geckoClients mGeckoClient = null;
private GestureDetector mSwipeDirectionDetector;
/*View Webviews*/ /*View Webviews*/
private NestedGeckoView mGeckoView = null; private NestedGeckoView mGeckoView = null;
@ -97,16 +102,20 @@ public class homeController extends AppCompatActivity implements ComponentCallba
private Button mConnectButton; private Button mConnectButton;
private Button mNewTab; private Button mNewTab;
private View mFindBar; private View mFindBar;
private View mSearchEngineBar;
private EditText mFindText; private EditText mFindText;
private TextView mFindCount; private TextView mFindCount;
private ImageButton mVoiceInput; private ImageButton mVoiceInput;
private ImageButton mMenu; private ImageButton mMenu;
private FrameLayout mNestedScroll; private FrameLayout mNestedScroll;
private ImageView mBlockerFullSceen;
private TextView mCopyright;
/*Redirection Objects*/ /*Redirection Objects*/
private boolean mPageClosed = false; private boolean mPageClosed = false;
private boolean isKeyboardOpened = false; private boolean isKeyboardOpened = false;
private boolean isSuggestionChanged = false; private boolean isSuggestionChanged = false;
private String mSearchBarPreviousText = strings.GENERIC_EMPTY_STR;
/*-------------------------------------------------------INITIALIZATION-------------------------------------------------------*/ /*-------------------------------------------------------INITIALIZATION-------------------------------------------------------*/
@ -133,6 +142,13 @@ public class homeController extends AppCompatActivity implements ComponentCallba
initializeLocalEventHandlers(); initializeLocalEventHandlers();
initLandingPage(); initLandingPage();
initLocalLanguage(); initLocalLanguage();
onInitResume(savedInstanceState != null);
}
public void onInitResume(boolean pStatus){
if(pStatus){
mSplashScreen.animate().alpha(0);
}
} }
public void onInitTheme(){ public void onInitTheme(){
@ -195,7 +211,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if(status.sSettingIsAppStarted){ if(status.sSettingIsAppStarted){
mHomeViewController.onPageFinished(); mHomeViewController.onPageFinished();
mSplashScreen.setAlpha(0); mSplashScreen.animate().alpha(0);
mHomeViewController.onProgressBarUpdate(100); mHomeViewController.onProgressBarUpdate(100);
} }
} }
@ -224,18 +240,21 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mConnectButton = findViewById(R.id.Connect); mConnectButton = findViewById(R.id.Connect);
mNewTab = findViewById(R.id.pTabCounter); mNewTab = findViewById(R.id.pTabCounter);
mFindBar = findViewById(R.id.pFindBar); mFindBar = findViewById(R.id.pFindBar);
mSearchEngineBar = findViewById(R.id.pSearchEngineBar);
mFindText = findViewById(R.id.pFindText); mFindText = findViewById(R.id.pFindText);
mFindCount = findViewById(R.id.pFindCount); mFindCount = findViewById(R.id.pFindCount);
mVoiceInput = findViewById(R.id.pVoiceInput); mVoiceInput = findViewById(R.id.pVoiceInput);
mMenu = findViewById(R.id.pMenu); mMenu = findViewById(R.id.pMenu);
mBlocker = findViewById(R.id.pBlocker); mBlocker = findViewById(R.id.pBlocker);
mNestedScroll = findViewById(R.id.pNestedScroll); mNestedScroll = findViewById(R.id.pNestedScroll);
mBlockerFullSceen = findViewById(R.id.pBlockerFullSceen);
mCopyright = findViewById(R.id.pCopyright);
mGeckoView.setSaveEnabled(false); mGeckoView.setSaveEnabled(false);
mGeckoView.setSaveFromParentEnabled(false); mGeckoView.setSaveFromParentEnabled(false);
mGeckoClient = new geckoClients(); mGeckoClient = new geckoClients();
mHomeViewController.initialization(new homeViewCallback(),this,mNewTab, mWebViewContainer, mLoadingText, mProgressBar, mSearchbar, mSplashScreen, mLoadingIcon, mBannerAds,(ArrayList<historyRowModel>)dataController.getInstance().invokeSuggestion(dataEnums.eSuggestionCommands.M_GET_SUGGESTION, null), mGatewaySplash, mTopBar, mGeckoView, mBackSplash, mConnectButton, mFindBar, mFindText, mFindCount, mTopLayout, mVoiceInput, mMenu, mNestedScroll, mBlocker); mHomeViewController.initialization(new homeViewCallback(),this,mNewTab, mWebViewContainer, mLoadingText, mProgressBar, mSearchbar, mSplashScreen, mLoadingIcon, mBannerAds,(ArrayList<historyRowModel>)dataController.getInstance().invokeSuggestion(dataEnums.eSuggestionCommands.M_GET_SUGGESTION, null), mGatewaySplash, mTopBar, mGeckoView, mBackSplash, mConnectButton, mFindBar, mFindText, mFindCount, mTopLayout, mVoiceInput, mMenu, mNestedScroll, mBlocker, mBlockerFullSceen, mSearchEngineBar, mCopyright);
mGeckoView.onSetHomeEvent(new nestedGeckoViewCallback()); mGeckoView.onSetHomeEvent(new nestedGeckoViewCallback());
mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), this,false); mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), this,false);
mGeckoClient.onValidateInitializeFromStartup(); mGeckoClient.onValidateInitializeFromStartup();
@ -261,30 +280,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
} }
float oldTouchValue;
@Override @Override
public boolean dispatchTouchEvent(MotionEvent event) { public boolean dispatchTouchEvent(MotionEvent event) {
mSwipeDirectionDetector.onTouchEvent(event);
int action=event.getAction(); return super.dispatchTouchEvent(event);
switch (action) {
case (MotionEvent.ACTION_DOWN):
oldTouchValue = event.getX();
case (MotionEvent.ACTION_MOVE):
if(mSplashScreen.getVisibility()==View.VISIBLE){
float currentX = event.getX();
if (oldTouchValue < currentX-100)
{
helperMethod.openActivity(orbotController.class, constants.CONST_LIST_HISTORY, homeController.this,true);
}
else if (oldTouchValue > currentX+100 )
{
helperMethod.openActivity(orbotLogController.class, constants.CONST_LIST_HISTORY, homeController.this,true);
}
}
default:
return super.onTouchEvent(event);
}
} }
public void initPreFixes() { public void initPreFixes() {
@ -358,7 +357,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mGeckoView.setSession(mTempSession); mGeckoView.setSession(mTempSession);
mHomeViewController.onClearSelections(false); mHomeViewController.onClearSelections(false);
mHomeViewController.onUpdateSearchBar(mTempSession.getCurrentURL(),false); mHomeViewController.onUpdateSearchBar(mTempSession.getCurrentURL(),false,true);
if(mTempSession.getProgress()>0 && mTempSession.getProgress()<100){ if(mTempSession.getProgress()>0 && mTempSession.getProgress()<100){
mHomeViewController.onProgressBarUpdate(mTempSession.getProgress()); mHomeViewController.onProgressBarUpdate(mTempSession.getProgress());
}else { }else {
@ -428,7 +427,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if (actionId == EditorInfo.IME_ACTION_NEXT || actionId == EditorInfo.IME_ACTION_GO || actionId == EditorInfo.IME_ACTION_DONE) if (actionId == EditorInfo.IME_ACTION_NEXT || actionId == EditorInfo.IME_ACTION_GO || actionId == EditorInfo.IME_ACTION_DONE)
{ {
onSearchBarInvoked(v); onSearchBarInvoked(v);
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),true); mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),true,true);
mHomeViewController.onClearSelections(true); mHomeViewController.onClearSelections(true);
mGeckoClient.setLoading(true); mGeckoClient.setLoading(true);
final Handler handler = new Handler(); final Handler handler = new Handler();
@ -456,7 +455,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
helperMethod.hideKeyboard(homeController.this); helperMethod.hideKeyboard(homeController.this);
status.sSettingIsAppStarted = true; status.sSettingIsAppStarted = true;
pluginController.getInstance().onResetMessage(); pluginController.getInstance().onResetMessage();
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),false); mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),false,true);
} }
}); });
@ -477,17 +476,35 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mSearchbar.setOnFocusChangeListener((v, hasFocus) -> { mSearchbar.setOnFocusChangeListener((v, hasFocus) -> {
if(!hasFocus) if(!hasFocus)
{ {
mHomeViewController.onUpdateSearchEngineBar(false);
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
mHomeViewController.initSearchBarFocus(false); mHomeViewController.initSearchBarFocus(false);
if(!mGeckoClient.isLoading()){ if(!mGeckoClient.isLoading()){
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),false); mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),false,true);
} }
if(isSuggestionChanged){ if(isSuggestionChanged){
isSuggestionChanged = false; isSuggestionChanged = false;
mHomeViewController.initializeSuggestionView((ArrayList<historyRowModel>)dataController.getInstance().invokeSuggestion(dataEnums.eSuggestionCommands.M_GET_SUGGESTION, null)); mHomeViewController.initializeSuggestionView((ArrayList<historyRowModel>)dataController.getInstance().invokeSuggestion(dataEnums.eSuggestionCommands.M_GET_SUGGESTION, null));
} }
}else { }else {
mHomeViewController.onUpdateSearchEngineBar(true);
mHomeViewController.initSearchBarFocus(true); mHomeViewController.initSearchBarFocus(true);
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),true); getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING);
mSearchbar.setText(strings.GENERIC_EMPTY_STR);
}
});
mSwipeDirectionDetector=new GestureDetector(this,new SimpleGestureFilter(){
@Override
public boolean onSwipe(Direction direction) {
if (direction==Direction.left){
helperMethod.openActivity(orbotLogController.class, constants.CONST_LIST_HISTORY, homeController.this, true);
}
else if (direction==Direction.right){
helperMethod.openActivity(orbotController.class, constants.CONST_LIST_HISTORY, homeController.this, true);
}
return true;
} }
}); });
@ -501,15 +518,20 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if(validated_url!=null){ if(validated_url!=null){
url = validated_url; url = validated_url;
} }
mHomeViewController.onUpdateSearchBar(url,false); mHomeViewController.onUpdateSearchBar(url,false,true);
onLoadURL(url); onLoadURL(url);
} }
public void onSuggestionInvoked(View view){ public void onSuggestionInvoked(View view){
String val = ((TextView)view.findViewById(R.id.hintCompletionUrl)).getText().toString(); //String val = ((TextView)view.findViewById(R.id.hintCompletionUrl)).getText().toString();
onLoadURL(val); //onLoadURL(val);
mSearchbar.setSelection(0); //mSearchbar.setSelection(0);
mHomeViewController.onUpdateSearchBar(val,false); //mHomeViewController.onUpdateSearchBar(val,false,true);
}
public void onSuggestionMove(View view){
String val = ((ImageButton)view).getTag().toString();
mHomeViewController.onUpdateSearchBar(val,false,false);
} }
public void applyTheme(){ public void applyTheme(){
@ -532,10 +554,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba
initializeGeckoView(true, true); initializeGeckoView(true, true);
if(status.sOpenURLInNewTab){ if(status.sOpenURLInNewTab){
onLoadURL(helperMethod.getDomainName(status.sSettingSearchStatus)); onLoadURL(helperMethod.getDomainName(status.sSettingSearchStatus));
mHomeViewController. onUpdateSearchBar(helperMethod.getDomainName(status.sSettingSearchStatus),false); mHomeViewController. onUpdateSearchBar(helperMethod.getDomainName(status.sSettingSearchStatus),false,true);
}else { }else {
onLoadURL("about:blank"); onLoadURL("about:blank");
mHomeViewController. onUpdateSearchBar(strings.HOME_BLANK_PAGE,false); mHomeViewController. onUpdateSearchBar(strings.HOME_BLANK_PAGE,false,true);
} }
mHomeViewController.progressBarReset(); mHomeViewController.progressBarReset();
mHomeViewController.onNewTab(isKeyboardOpened,isKeyboardOpenedTemp); mHomeViewController.onNewTab(isKeyboardOpened,isKeyboardOpenedTemp);
@ -544,13 +566,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba
public void onOpenTabViewBoundary(View view){ public void onOpenTabViewBoundary(View view){
mGeckoClient.onRedrawPixel(); mGeckoClient.onRedrawPixel();
final Handler handler = new Handler();
mNewTab.setPressed(true); mNewTab.setPressed(true);
handler.postDelayed(() -> mGeckoClient.onRedrawPixel();
{
helperMethod.openActivity(tabController.class, constants.CONST_LIST_HISTORY, homeController.this,true); helperMethod.openActivity(tabController.class, constants.CONST_LIST_HISTORY, homeController.this,true);
overridePendingTransition(R.anim.popup_anim_in, R.anim.popup_anim_out); overridePendingTransition(R.anim.popup_anim_in, R.anim.popup_anim_out);
}, 100);
} }
public void onNotificationInvoked(String message,enums.etype e_type){ public void onNotificationInvoked(String message,enums.etype e_type){
@ -580,6 +599,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if(mFindBar.getVisibility() == View.VISIBLE){ if(mFindBar.getVisibility() == View.VISIBLE){
mHomeViewController.onUpdateFindBar(false); mHomeViewController.onUpdateFindBar(false);
} }
else if(mSearchEngineBar.getVisibility() == View.VISIBLE){
mHomeViewController.onUpdateSearchEngineBar(false);
}
else if(mGeckoClient.getFullScreenStatus()){ else if(mGeckoClient.getFullScreenStatus()){
mGeckoClient.onBackPressed(true); mGeckoClient.onBackPressed(true);
mHomeViewController.onClearSelections(true); mHomeViewController.onClearSelections(true);
@ -656,9 +678,15 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
if(status.sSettingIsAppStarted){ if(status.sSettingIsAppStarted){
onStartApplication(null); onStartApplication(null);
tabRowModel model = (tabRowModel)dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_CURRENT_TAB, null);
if(model!=null){
onLoadTab(model.getSession(),true);
} }
if((int)dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_TOTAL_TAB, null)<=0){ }
//onNewTab(false, false); if(!mSearchBarPreviousText.equals(strings.GENERIC_EMPTY_STR)){
mSearchbar.setText(mSearchBarPreviousText);
mSearchbar.requestFocus();
mSearchBarPreviousText = strings.GENERIC_EMPTY_STR;
} }
super.onResume(); super.onResume();
@ -670,7 +698,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if(resultCode == RESULT_OK && null != data){ if(resultCode == RESULT_OK && null != data){
onSearchBarInvoked(mSearchbar); onSearchBarInvoked(mSearchbar);
ArrayList<String> result = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS); ArrayList<String> result = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
mHomeViewController.onUpdateSearchBar(result.get(0),false); mHomeViewController.onUpdateSearchBar(result.get(0),false,true);
helperMethod.hideKeyboard(homeController.this); helperMethod.hideKeyboard(homeController.this);
mGeckoClient.setLoading(true); mGeckoClient.setLoading(true);
final Handler handler = new Handler(); final Handler handler = new Handler();
@ -752,7 +780,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
initializeGeckoView(true, true); initializeGeckoView(true, true);
mHomeViewController.progressBarReset(); mHomeViewController.progressBarReset();
mHomeViewController.onNewTab(false,isKeyboardOpened); mHomeViewController.onNewTab(false,isKeyboardOpened);
mHomeViewController.onUpdateSearchBar(url,false); mHomeViewController.onUpdateSearchBar(url,false,true);
mGeckoClient.loadURL(url); mGeckoClient.loadURL(url);
} }
@ -799,6 +827,11 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mGeckoClient.getSession().findInPage(mFindText.getText().toString(), GeckoSession.FINDER_FIND_MATCH_CASE & GeckoSession.FINDER_DISPLAY_HIGHLIGHT_ALL); mGeckoClient.getSession().findInPage(mFindText.getText().toString(), GeckoSession.FINDER_FIND_MATCH_CASE & GeckoSession.FINDER_DISPLAY_HIGHLIGHT_ALL);
} }
public void onOpenSearchEngine(View view){
mSearchBarPreviousText = mSearchbar.getText().toString();
helperMethod.openActivity(settingSearchController.class,constants.CONST_LIST_HISTORY, homeController.this,true);
}
public void onFindPrev(View view){ public void onFindPrev(View view){
mFindText.setText("0/0"); mFindText.setText("0/0");
mGeckoClient.getSession().findInPage(mFindText.getText().toString(), GeckoSession.FINDER_FIND_BACKWARDS & GeckoSession.FINDER_DISPLAY_HIGHLIGHT_ALL); mGeckoClient.getSession().findInPage(mFindText.getText().toString(), GeckoSession.FINDER_FIND_BACKWARDS & GeckoSession.FINDER_DISPLAY_HIGHLIGHT_ALL);
@ -827,6 +860,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
else if (menuId == R.id.menu9) { else if (menuId == R.id.menu9) {
helperMethod.hideKeyboard(this); helperMethod.hideKeyboard(this);
mGeckoClient.onRedrawPixel();
helperMethod.openActivity(tabController.class, constants.CONST_LIST_HISTORY, homeController.this,true); helperMethod.openActivity(tabController.class, constants.CONST_LIST_HISTORY, homeController.this,true);
} }
else if (menuId == R.id.menu8) { else if (menuId == R.id.menu8) {
@ -937,7 +971,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mHomeViewController.onSetBannerAdMargin((boolean)data.get(0),pluginController.getInstance().isAdvertLoaded()); mHomeViewController.onSetBannerAdMargin((boolean)data.get(0),pluginController.getInstance().isAdvertLoaded());
} }
else if(e_type.equals(enums.etype.on_url_load)){ else if(e_type.equals(enums.etype.on_url_load)){
mHomeViewController.onUpdateLogs("Starting | Genesis Search"); onOpenLinkNewTab(data.get(0).toString());
onLoadURL(data.get(0).toString()); onLoadURL(data.get(0).toString());
} }
else if(e_type.equals(enums.etype.recheck_orbot)){ else if(e_type.equals(enums.etype.recheck_orbot)){
@ -982,10 +1016,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mHomeViewController.onProgressBarUpdate((int)data.get(0)); mHomeViewController.onProgressBarUpdate((int)data.get(0));
} }
else if(e_type.equals(enums.etype.ON_UPDATE_TITLE_BAR)){ else if(e_type.equals(enums.etype.ON_UPDATE_TITLE_BAR)){
mHomeViewController.onUpdateTitleBar((boolean)data.get(0));
} }
else if(e_type.equals(enums.etype.on_url_load)){ else if(e_type.equals(enums.etype.on_url_load)){
mHomeViewController.onUpdateSearchBar(dataToStr(data.get(0),mGeckoClient.getSession().getCurrentURL()),false); mHomeViewController.onUpdateSearchBar(dataToStr(data.get(0),mGeckoClient.getSession().getCurrentURL()),false,true);
} }
else if(e_type.equals(enums.etype.back_list_empty)){ else if(e_type.equals(enums.etype.back_list_empty)){
if((int)dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_TOTAL_TAB, null)>1){ if((int)dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_TOTAL_TAB, null)>1){
@ -1039,10 +1072,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba
pluginController.getInstance().setLanguage(); pluginController.getInstance().setLanguage();
initLocalLanguage(); initLocalLanguage();
mHomeViewController.onPageFinished(); mHomeViewController.onPageFinished();
mHomeViewController.onUpdateSearchBar(dataToStr(data.get(0),mGeckoClient.getSession().getCurrentURL()),false); mHomeViewController.onUpdateSearchBar(dataToStr(data.get(0),mGeckoClient.getSession().getCurrentURL()),false,true);
} }
else if(e_type.equals(enums.etype.search_update)){ else if(e_type.equals(enums.etype.search_update)){
mHomeViewController.onUpdateSearchBar(dataToStr(data.get(0),mGeckoClient.getSession().getCurrentURL()),false); mHomeViewController.onUpdateSearchBar(dataToStr(data.get(0),mGeckoClient.getSession().getCurrentURL()),false, true);
} }
else if(e_type.equals(enums.etype.download_file_popup)){ else if(e_type.equals(enums.etype.download_file_popup)){
pluginController.getInstance().MessageManagerHandler(homeController.this,Collections.singletonList(dataToStr(data.get(0))),enums.eMessageEnums.M_DOWNLOAD_FILE); pluginController.getInstance().MessageManagerHandler(homeController.this,Collections.singletonList(dataToStr(data.get(0))),enums.eMessageEnums.M_DOWNLOAD_FILE);
@ -1083,10 +1116,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
else if(e_type.equals(dataEnums.eTabCommands.M_UPDATE_PIXEL)){ else if(e_type.equals(dataEnums.eTabCommands.M_UPDATE_PIXEL)){
try{ try{
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(data.get(1), mGeckoView.capturePixels())); dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(data.get(1), mGeckoView.capturePixels()));
}catch (Exception ignored){ }catch (Exception EX){
EX.printStackTrace();
} }
} }
else if(e_type.equals(enums.etype.FINDER_RESULT_CALLBACK)){ else if(e_type.equals(enums.etype.FINDER_RESULT_CALLBACK)){

View File

@ -10,6 +10,7 @@ import android.content.pm.ActivityInfo;
import android.content.res.Resources; import android.content.res.Resources;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.os.Build; import android.os.Build;
import android.os.Handler; import android.os.Handler;
@ -21,9 +22,9 @@ import android.view.ViewGroup;
import android.view.ViewOutlineProvider; import android.view.ViewOutlineProvider;
import android.view.Window; import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;
import android.view.animation.AccelerateDecelerateInterpolator; import android.view.animation.Animation;
import android.view.animation.AnimationUtils; import android.view.animation.AnimationUtils;
import android.view.animation.DecelerateInterpolator; import android.view.animation.Transformation;
import android.view.inputmethod.EditorInfo; import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import android.widget.*; import android.widget.*;
@ -31,10 +32,7 @@ import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatDelegate; import androidx.appcompat.app.AppCompatDelegate;
import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
import androidx.core.widget.NestedScrollView;
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel; import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
import com.darkweb.genesissearchengine.constants.*; import com.darkweb.genesissearchengine.constants.*;
import com.darkweb.genesissearchengine.dataManager.dataController; import com.darkweb.genesissearchengine.dataManager.dataController;
@ -55,7 +53,6 @@ import java.util.Collections;
import java.util.Objects; import java.util.Objects;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import static android.content.Context.LAYOUT_INFLATER_SERVICE; import static android.content.Context.LAYOUT_INFLATER_SERVICE;
import static androidx.appcompat.widget.ListPopupWindow.WRAP_CONTENT;
import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_DESKTOP; import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_DESKTOP;
class homeViewController class homeViewController
@ -81,6 +78,7 @@ class homeViewController
private Button mNewTab; private Button mNewTab;
private PopupWindow popupWindow = null; private PopupWindow popupWindow = null;
private View mFindBar; private View mFindBar;
private View mSearchEngineBar;
private EditText mFindText; private EditText mFindText;
private TextView mFindCount; private TextView mFindCount;
private FrameLayout mTopLayout; private FrameLayout mTopLayout;
@ -88,12 +86,14 @@ class homeViewController
private ImageButton mMenu; private ImageButton mMenu;
private FrameLayout mNestedScroll; private FrameLayout mNestedScroll;
private ImageView mBlocker; private ImageView mBlocker;
private ImageView mBlockerFullSceen;
private TextView mCopyright;
/*Local Variables*/ /*Local Variables*/
private Callable<String> mLogs = null; private Callable<String> mLogs = null;
private boolean isLandscape = false; private boolean isLandscape = false;
void initialization(eventObserver.eventListener event, AppCompatActivity context, Button mNewTab, FrameLayout webviewContainer, TextView loadingText, AnimatedProgressBar progressBar, AutoCompleteTextView searchbar, ConstraintLayout splashScreen, ImageView loading, AdView banner_ads, ArrayList<historyRowModel> suggestions, ImageButton gateway_splash, LinearLayout top_bar, GeckoView gecko_view, ImageView backsplash, Button connect_button, View pFindBar, EditText pFindText, TextView pFindCount, FrameLayout pTopLayout, ImageButton pVoiceInput, ImageButton pMenu, FrameLayout pNestedScroll, ImageView pBlocker){ void initialization(eventObserver.eventListener event, AppCompatActivity context, Button mNewTab, FrameLayout webviewContainer, TextView loadingText, AnimatedProgressBar progressBar, AutoCompleteTextView searchbar, ConstraintLayout splashScreen, ImageView loading, AdView banner_ads, ArrayList<historyRowModel> suggestions, ImageButton gateway_splash, LinearLayout top_bar, GeckoView gecko_view, ImageView backsplash, Button connect_button, View pFindBar, EditText pFindText, TextView pFindCount, FrameLayout pTopLayout, ImageButton pVoiceInput, ImageButton pMenu, FrameLayout pNestedScroll, ImageView pBlocker, ImageView pBlockerFullSceen, View mSearchEngineBar, TextView pCopyright){
this.mContext = context; this.mContext = context;
this.mProgressBar = progressBar; this.mProgressBar = progressBar;
this.mSearchbar = searchbar; this.mSearchbar = searchbar;
@ -118,6 +118,9 @@ class homeViewController
this.mMenu = pMenu; this.mMenu = pMenu;
this.mNestedScroll = pNestedScroll; this.mNestedScroll = pNestedScroll;
this.mBlocker = pBlocker; this.mBlocker = pBlocker;
this.mBlockerFullSceen = pBlockerFullSceen;
this.mSearchEngineBar = mSearchEngineBar;
this.mCopyright = pCopyright;
initSplashScreen(); initSplashScreen();
initializeSuggestionView(suggestions); initializeSuggestionView(suggestions);
@ -216,7 +219,7 @@ class homeViewController
animatedColor ThreeToFour = new animatedColor(ContextCompat.getColor(mContext, R.color.c_background), ContextCompat.getColor(mContext, R.color.c_background)); animatedColor ThreeToFour = new animatedColor(ContextCompat.getColor(mContext, R.color.c_background), ContextCompat.getColor(mContext, R.color.c_background));
ValueAnimator animator = ObjectAnimator.ofFloat(0f, 1f).setDuration(0); ValueAnimator animator = ObjectAnimator.ofFloat(0f, 1f).setDuration(0);
animator.setStartDelay(600); animator.setStartDelay(1200);
animator.addUpdateListener(animation -> animator.addUpdateListener(animation ->
{ {
float v = (float) animation.getAnimatedValue(); float v = (float) animation.getAnimatedValue();
@ -269,25 +272,15 @@ class homeViewController
return; return;
} }
autoCompleteAdapter suggestionAdapter = new autoCompleteAdapter(mContext, R.layout.hint_view, (ArrayList<historyRowModel>) suggestions.clone()); autoCompleteAdapter suggestionAdapter = new autoCompleteAdapter(mContext, R.layout.hint_view, (ArrayList<historyRowModel>) suggestions.clone());
int width = Math.round(helperMethod.screenWidth()); int width = Math.round(helperMethod.screenWidth());
mSearchbar.setThreshold(2); mSearchbar.setThreshold(2);
mSearchbar.setAdapter(suggestionAdapter); mSearchbar.setAdapter(suggestionAdapter);
mSearchbar.setDropDownVerticalOffset(helperMethod.pxFromDp(8)); mSearchbar.setDropDownVerticalOffset(helperMethod.pxFromDp(0));
mSearchbar.setDropDownWidth(width); mSearchbar.setDropDownWidth(width);
mSearchbar.setDropDownHeight(WRAP_CONTENT); mSearchbar.setDropDownBackgroundDrawable(new ColorDrawable(mContext.getResources().getColor(R.color.c_background)));
mSearchbar.setDropDownHeight(helperMethod.getScreenHeight(mContext)*75/100);
Drawable drawable;
Resources res = mContext.getResources();
try {
drawable = Drawable.createFromXml(res, res.getXml(R.xml.hox_rounded_corner_suggestion));
mSearchbar.setDropDownBackgroundDrawable(drawable);
mSearchbar.setOutlineProvider(ViewOutlineProvider.BACKGROUND);
mSearchbar.setClipToOutline(true);
} catch (Exception ignored) {
}
mSearchbar.setInputType(EditorInfo.TYPE_TEXT_FLAG_NO_SUGGESTIONS); mSearchbar.setInputType(EditorInfo.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
} }
@ -297,18 +290,23 @@ class homeViewController
mLoading.setAnimation(helperMethod.getRotationAnimation()); mLoading.setAnimation(helperMethod.getRotationAnimation());
mLoadingText.setAlpha(0); mLoadingText.setAlpha(0);
mLoadingText.setVisibility(View.VISIBLE); mLoadingText.setVisibility(View.VISIBLE);
mLoadingText.animate().alpha(1); mLoadingText.animate().setStartDelay(0).alpha(1);
mConnectButton.setClickable(false); mConnectButton.setClickable(false);
mGatewaySplash.setClickable(false); mGatewaySplash.setClickable(false);
mBlocker.setClickable(true);
mBlocker.setFocusable(true);
} }
void initHomePage(){ void initHomePage(){
mConnectButton.setClickable(false); mConnectButton.setClickable(false);
mGatewaySplash.setClickable(false); mGatewaySplash.setClickable(false);
mConnectButton.animate().alpha(0.4f).withEndAction(this::initSplashLoading); mConnectButton.animate().setDuration(200).alpha(0.4f).withEndAction(() -> {
mGatewaySplash.animate().alpha(0.4f); mCopyright.setVisibility(View.GONE);
initSplashLoading();
});
mGatewaySplash.animate().setDuration(200).alpha(0.4f);
} }
private void initSplashScreen(){ private void initSplashScreen(){
@ -327,7 +325,7 @@ class homeViewController
void initProxyLoading(Callable<String> logs){ void initProxyLoading(Callable<String> logs){
this.mLogs = logs; this.mLogs = logs;
if(mSplashScreen.getAlpha()==1){ if(mSplashScreen.getVisibility()==View.VISIBLE){
new Thread(){ new Thread(){
public void run(){ public void run(){
AppCompatActivity temp_context = mContext; AppCompatActivity temp_context = mContext;
@ -365,9 +363,9 @@ class homeViewController
} }
private void splashScreenDisable(){ private void splashScreenDisable(){
mTopBar.setAlpha(1); mTopBar.setAlpha(1);
if(mSplashScreen.getAlpha()>=1) if(mSplashScreen.getVisibility()==View.VISIBLE)
{ {
mSplashScreen.animate().setDuration(300).setStartDelay(500).alpha(0).withEndAction((this::triggerPostUI)); mSplashScreen.animate().setStartDelay(1000).setDuration(500).alpha(0).withEndAction((this::triggerPostUI));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
initStatusBarColor(); initStatusBarColor();
} }
@ -516,7 +514,7 @@ class homeViewController
private Handler searchBarUpdateHandler = new Handler(); private Handler searchBarUpdateHandler = new Handler();
private String handlerLocalUrl = ""; private String handlerLocalUrl = "";
void onUpdateSearchBar(String url,boolean showProtocol){ void onUpdateSearchBar(String url,boolean showProtocol, boolean pClearText){
int delay = 0; int delay = 0;
handlerLocalUrl = url; handlerLocalUrl = url;
@ -528,7 +526,7 @@ class homeViewController
searchBarUpdateHandler.postDelayed(() -> searchBarUpdateHandler.postDelayed(() ->
{ {
searchBarUpdateHandler.removeMessages(100); searchBarUpdateHandler.removeMessages(100);
triggerUpdateSearchBar(handlerLocalUrl,showProtocol); triggerUpdateSearchBar(handlerLocalUrl,showProtocol, pClearText);
}, delay); }, delay);
} }
@ -562,7 +560,22 @@ class homeViewController
} }
} }
private void triggerUpdateSearchBar(String url, boolean showProtocol){ public void onUpdateSearchEngineBar(boolean pStatus)
{
mSearchEngineBar.animate().cancel();
if(pStatus){
mSearchEngineBar.setAlpha(0f);
mSearchEngineBar.animate().setDuration(300).alpha(1);
mSearchEngineBar.setVisibility(View.VISIBLE);
}else {
mSearchEngineBar.animate().setDuration(300).alpha(0).withEndAction(() -> {
mSearchEngineBar.setAlpha(0f);
mSearchEngineBar.setVisibility(View.GONE);
});
}
}
private void triggerUpdateSearchBar(String url, boolean showProtocol, boolean pClearText){
if (mSearchbar == null || url==null) if (mSearchbar == null || url==null)
{ {
return; return;
@ -608,22 +621,10 @@ class homeViewController
void onNewTab(boolean keyboard,boolean isKeyboardOpen){ void onNewTab(boolean keyboard,boolean isKeyboardOpen){
if(keyboard){ if(keyboard){
if(!isKeyboardOpen){
final Handler handler = new Handler();
handler.postDelayed(() ->
{
InputMethodManager imm = (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
Objects.requireNonNull(imm).toggleSoftInput(InputMethodManager.RESULT_UNCHANGED_SHOWN, 0);
}, 250);
}
mSearchbar.requestFocus(); mSearchbar.requestFocus();
mSearchbar.selectAll(); mSearchbar.selectAll();
} }
} }
Handler mProgressHandler = new Handler();
Runnable mProgressBarRunnable = null;
void onUpdateLogs(String log){ void onUpdateLogs(String log){
mLoadingText.setText(log); mLoadingText.setText(log);
@ -635,62 +636,59 @@ class homeViewController
} }
void onProgressBarUpdate(int value){ void onProgressBarUpdate(int value){
if(mProgressBarRunnable!=null){
mProgressHandler.removeCallbacks(mProgressBarRunnable);
}
if(mSplashScreen.getAlpha()>0){
mProgressBar.setProgress(value*100);
}
if(value==100){
mProgressBar.setAlpha(1f); mProgressBar.setAlpha(1f);
setProgressAnimate(mProgressBar,value);
mProgressBarRunnable = () -> {
animation.removeAllListeners();
animation.end();
animation.cancel();
mProgressBar.animate().cancel();
mProgressBar.animate().alpha(0);
};
mProgressHandler.postDelayed(mProgressBarRunnable, 250);
return;
}
else if(mSplashScreen.getAlpha()==0) {
mProgressBar.setVisibility(View.VISIBLE); mProgressBar.setVisibility(View.VISIBLE);
ProgressBarAnimation mProgressAnimation = new ProgressBarAnimation(mProgressBar, 1000);
mProgressAnimation.setProgress(value*100);
}
public class ProgressBarAnimation extends Animation {
private ProgressBar mProgressBar;
private int mTo;
private int mFrom;
private long mStepDuration;
/**
* @param fullDuration - time required to fill progress from 0% to 100%
*/
public ProgressBarAnimation(ProgressBar progressBar, long fullDuration) {
super();
mProgressBar = progressBar;
mStepDuration = fullDuration / progressBar.getMax();
}
public void setProgress(int progress) {
if(progress == 10000){
mProgressBar.animate().setStartDelay(100).alpha(0);
}else {
mProgressBar.animate().cancel(); mProgressBar.animate().cancel();
mProgressBar.animate().setStartDelay(50).alpha(1); mProgressBar.setAlpha(1);
}
setProgressAnimate(mProgressBar,value);
} }
private ObjectAnimator animation = null; if (progress < 0) {
private void setProgressAnimate(ProgressBar pb, int progressTo) progress = 0;
{
int progress = 0;
if((progressTo)<mProgressBar.getProgress()){
progress = 5;
} }
if(animation!=null){ if (progress > mProgressBar.getMax()) {
animation.removeAllListeners(); progress = mProgressBar.getMax();
animation.end();
animation.cancel();
} }
animation = ObjectAnimator.ofInt(pb, "progress", pb.getProgress(), progressTo * 100); mTo = progress;
animation.setDuration(progress);
animation.setInterpolator(new DecelerateInterpolator()); mFrom = mProgressBar.getProgress();
animation.setAutoCancel(true); setDuration(Math.abs(mTo - mFrom) * mStepDuration);
animation.start(); mProgressBar.startAnimation(this);
} }
void onUpdateTitleBar(boolean pStatus){ @Override
protected void applyTransformation(float interpolatedTime, Transformation t) {
float value = mFrom + (mTo - mFrom) * interpolatedTime;
mProgressBar.setProgress((int) value);
}
} }
void onClearSelections(boolean hideKeyboard){ void onClearSelections(boolean hideKeyboard){
mSearchbar.setFocusable(false); mSearchbar.setFocusable(false);
mSearchbar.setFocusableInTouchMode(true); mSearchbar.setFocusableInTouchMode(true);
@ -716,10 +714,21 @@ class homeViewController
void onFullScreenUpdate(boolean status){ void onFullScreenUpdate(boolean status){
int value = !status ? 1 : 0; int value = !status ? 1 : 0;
this.mBlocker.setVisibility(View.VISIBLE);
this.mBlocker.setAlpha(1f);
if(status) { if(status) {
}else {
this.mBlockerFullSceen.setVisibility(View.VISIBLE);
this.mBlockerFullSceen.setAlpha(1f);
}
if(status){
this.mBlockerFullSceen.setVisibility(View.VISIBLE);
this.mBlockerFullSceen.setAlpha(0f);
this.mBlockerFullSceen.animate().setStartDelay(0).setDuration(200).alpha(1).withEndAction(() -> {
mTopBar.setClickable(!status);
disableEnableControls(!status, mTopBar);
mTopBar.setAlpha(value);
mBannerAds.setVisibility(View.GONE);
defaultFlag = mContext.getWindow().getDecorView().getSystemUiVisibility(); defaultFlag = mContext.getWindow().getDecorView().getSystemUiVisibility();
final int flags = View.SYSTEM_UI_FLAG_LAYOUT_STABLE final int flags = View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
@ -728,18 +737,7 @@ class homeViewController
| View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
mContext.getWindow().getDecorView().setSystemUiVisibility(flags); mContext.getWindow().getDecorView().setSystemUiVisibility(flags);
}else {
}
final Handler handler = new Handler();
handler.postDelayed(() ->
{
mTopBar.setClickable(!status);
disableEnableControls(!status, mTopBar);
mTopBar.setAlpha(value);
mBannerAds.setVisibility(View.GONE);
if(status){
mProgressBar.setVisibility(View.GONE); mProgressBar.setVisibility(View.GONE);
mTopBar.setVisibility(View.GONE); mTopBar.setVisibility(View.GONE);
mBannerAds.setVisibility(View.GONE); mBannerAds.setVisibility(View.GONE);
@ -755,11 +753,17 @@ class homeViewController
com.darkweb.genesissearchengine.constants.status.sFullScreenBrowsing = false; com.darkweb.genesissearchengine.constants.status.sFullScreenBrowsing = false;
initTopBarPadding(); initTopBarPadding();
this.mBlocker.animate().setStartDelay(250).setDuration(200).alpha(0).withEndAction(() -> { this.mBlockerFullSceen.animate().setStartDelay(100).setDuration(200).alpha(0).withEndAction(() -> {
mBlocker.setVisibility(View.GONE); mBlockerFullSceen.setVisibility(View.GONE);
});
}); });
} }
else { else {
mTopBar.setClickable(!status);
disableEnableControls(!status, mTopBar);
mTopBar.setAlpha(value);
mBannerAds.setVisibility(View.GONE);
mProgressBar.setVisibility(View.VISIBLE); mProgressBar.setVisibility(View.VISIBLE);
mTopBar.setVisibility(View.VISIBLE); mTopBar.setVisibility(View.VISIBLE);
mBannerAds.setVisibility(View.GONE); mBannerAds.setVisibility(View.GONE);
@ -770,23 +774,22 @@ class homeViewController
mWebviewContainer.setLayoutParams(params); mWebviewContainer.setLayoutParams(params);
ViewGroup.MarginLayoutParams params1 = (ViewGroup.MarginLayoutParams) mWebviewContainer.getLayoutParams(); ViewGroup.MarginLayoutParams params1 = (ViewGroup.MarginLayoutParams) mWebviewContainer.getLayoutParams();
params1.setMargins(0, 0, 0,helperMethod.pxFromDp(60)); params1.setMargins(0, 0, 0,helperMethod.pxFromDp(0));
mGeckoView.setLayoutParams(params1); mGeckoView.setLayoutParams(params1);
com.darkweb.genesissearchengine.constants.status.sFullScreenBrowsing = (boolean) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FULL_SCREEN_BROWSIING,true)); com.darkweb.genesissearchengine.constants.status.sFullScreenBrowsing = (boolean) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FULL_SCREEN_BROWSIING,true));
initTopBarPadding(); initTopBarPadding();
this.mBlocker.animate().setStartDelay(250).setDuration(200).alpha(0).withEndAction(() -> {
mBlocker.setVisibility(View.GONE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
mContext.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); mContext.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}else { }else {
mContext.getWindow().setStatusBarColor(mContext.getResources().getColor(R.color.blue_dark)); mContext.getWindow().setStatusBarColor(mContext.getResources().getColor(R.color.blue_dark));
} }
this.mBlockerFullSceen.animate().setStartDelay(0).setDuration(200).alpha(0).withEndAction(() -> {
mBlockerFullSceen.setVisibility(View.GONE);
}); });
} }
}, 200);
} }
@ -849,6 +852,9 @@ class homeViewController
} }
} }
} }
if(msg.what == messages.MESSAGE_PROGRESSBAR_VALIDATE)
{
}
} }
}; };
} }

View File

@ -1,21 +1,21 @@
package com.darkweb.genesissearchengine.appManager.orbotLogManager; package com.darkweb.genesissearchengine.appManager.orbotLogManager;
import android.os.Bundle; import android.os.Bundle;
import android.view.GestureDetector;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.animation.AnimationUtils; import android.view.animation.AnimationUtils;
import android.view.animation.LayoutAnimationController; import android.view.animation.LayoutAnimationController;
import android.widget.TextView; import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.core.view.MotionEventCompat;
import androidx.core.widget.NestedScrollView; import androidx.core.widget.NestedScrollView;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.darkweb.genesissearchengine.appManager.activityContextManager; import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.helpManager.helpController; import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
import com.darkweb.genesissearchengine.appManager.settingManager.logManager.settingLogController;
import com.darkweb.genesissearchengine.constants.constants; import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.status; import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.helperManager.SimpleGestureFilter;
import com.darkweb.genesissearchengine.helperManager.eventObserver; import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod; import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.example.myapplication.R; import com.example.myapplication.R;
@ -36,19 +36,22 @@ public class orbotLogController extends AppCompatActivity {
private TextView mLogs; private TextView mLogs;
private boolean mActivityClosed = false; private boolean mActivityClosed = false;
int mLogCounter = 0; private int mLogCounter = 0;
private GestureDetector mSwipeDirectionDetector;
/* INITIALIZATIONS */ /* INITIALIZATIONS */
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
overridePendingTransition(R.anim.push_anim_out_reverse, R.anim.push_anim_in_reverse);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.orbot_log_view); setContentView(R.layout.orbot_log_view);
viewsInitializations(); viewsInitializations();
onUpdateLogs(); onUpdateLogs();
initializeLogs(); initializeLogs();
onScrollListener(); onInitListener();
} }
public void viewsInitializations() { public void viewsInitializations() {
@ -60,6 +63,7 @@ public class orbotLogController extends AppCompatActivity {
activityContextManager.getInstance().setOrbotLogController(this); activityContextManager.getInstance().setOrbotLogController(this);
mOrbotViewController = new orbotLogViewController(this, mLogs, mRecycleView); mOrbotViewController = new orbotLogViewController(this, mLogs, mRecycleView);
mOrbotModel = new orbotLogModel(); mOrbotModel = new orbotLogModel();
} }
public void initializeLogs(){ public void initializeLogs(){
@ -90,7 +94,7 @@ public class orbotLogController extends AppCompatActivity {
/* LISTENERS */ /* LISTENERS */
private void onScrollListener(){ private void onInitListener(){
mMainScroll.getViewTreeObserver().addOnScrollChangedListener(() -> { mMainScroll.getViewTreeObserver().addOnScrollChangedListener(() -> {
int scrollY = mMainScroll.getScrollY(); int scrollY = mMainScroll.getScrollY();
if(scrollY>0){ if(scrollY>0){
@ -103,6 +107,18 @@ public class orbotLogController extends AppCompatActivity {
mFloatingScroller.animate().alpha(0).withEndAction(() -> mFloatingScroller.setVisibility(View.GONE)); mFloatingScroller.animate().alpha(0).withEndAction(() -> mFloatingScroller.setVisibility(View.GONE));
} }
}); });
mSwipeDirectionDetector=new GestureDetector(this,new SimpleGestureFilter(){
@Override
public boolean onSwipe(Direction direction) {
if (direction==Direction.left || direction==Direction.right){
finish();
overridePendingTransition(R.anim.push_anim_in, R.anim.push_anim_out);
}
return true;
}
});
} }
public void onUpdateLogs(){ public void onUpdateLogs(){
@ -161,6 +177,14 @@ public class orbotLogController extends AppCompatActivity {
} }
} }
/* Helper Methods */
public void onClose(View view){
finish();
overridePendingTransition(R.anim.push_anim_in, R.anim.push_anim_out);
mActivityClosed = true;
}
/* LOCAL OVERRIDES */ /* LOCAL OVERRIDES */
@Override @Override
@ -178,42 +202,13 @@ public class orbotLogController extends AppCompatActivity {
@Override @Override
public void onBackPressed() { public void onBackPressed() {
finish(); onClose(null);
mActivityClosed = true;
} }
/* Helper Methods */
public void openLogSettings(View view) {
helperMethod.openActivity(settingLogController.class, constants.CONST_LIST_HISTORY, this,true);
}
public void onClose(View view){
finish();
mActivityClosed = true;
}
float oldTouchValue;
@Override @Override
public boolean dispatchTouchEvent(MotionEvent event) { public boolean dispatchTouchEvent(MotionEvent event) {
mSwipeDirectionDetector.onTouchEvent(event);
int action=event.getAction(); return super.dispatchTouchEvent(event);
switch (action) {
case (MotionEvent.ACTION_DOWN):
oldTouchValue = event.getX();
case (MotionEvent.ACTION_MOVE):
float currentX = event.getX();
if (oldTouchValue < currentX-100)
{
finish();
}else {
return super.onTouchEvent(event);
}
default:
return super.onTouchEvent(event);
}
} }
} }

View File

@ -1,22 +1,20 @@
package com.darkweb.genesissearchengine.appManager.orbotManager; package com.darkweb.genesissearchengine.appManager.orbotManager;
import android.os.Bundle; import android.os.Bundle;
import android.view.GestureDetector;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.core.view.MotionEventCompat;
import com.darkweb.genesissearchengine.appManager.activityContextManager; import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.bridgeManager.bridgeController; import com.darkweb.genesissearchengine.appManager.bridgeManager.bridgeController;
import com.darkweb.genesissearchengine.appManager.helpManager.helpController; import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController;
import com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogController;
import com.darkweb.genesissearchengine.constants.constants; import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.keys; import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status; import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.dataManager.dataController; import com.darkweb.genesissearchengine.dataManager.dataController;
import com.darkweb.genesissearchengine.dataManager.dataEnums; import com.darkweb.genesissearchengine.dataManager.dataEnums;
import com.darkweb.genesissearchengine.helperManager.SimpleGestureFilter;
import com.darkweb.genesissearchengine.helperManager.eventObserver; import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod; import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.darkweb.genesissearchengine.pluginManager.pluginController; import com.darkweb.genesissearchengine.pluginManager.pluginController;
@ -35,16 +33,20 @@ public class orbotController extends AppCompatActivity {
private SwitchMaterial mBridgeSwitch; private SwitchMaterial mBridgeSwitch;
private SwitchMaterial mVpnSwitch; private SwitchMaterial mVpnSwitch;
private LinearLayout mCustomizableBridgeMenu; private LinearLayout mCustomizableBridgeMenu;
private GestureDetector mSwipeDirectionDetector;
/* INITIALIZATIONS */ /* INITIALIZATIONS */
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
overridePendingTransition(R.anim.push_anim_in, R.anim.push_anim_out);
pluginController.getInstance().onCreate(this); pluginController.getInstance().onCreate(this);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.orbot_settings_view); setContentView(R.layout.orbot_settings_view);
viewsInitializations(); viewsInitializations();
onInitListener();
} }
public void viewsInitializations() { public void viewsInitializations() {
@ -63,6 +65,19 @@ public class orbotController extends AppCompatActivity {
/* LISTENERS */ /* LISTENERS */
private void onInitListener(){
mSwipeDirectionDetector=new GestureDetector(this,new SimpleGestureFilter(){
@Override
public boolean onSwipe(Direction direction) {
if (direction==Direction.left || direction==Direction.right){
onClose(null);
}
return true;
}
});
}
public class orbotModelCallback implements eventObserver.eventListener{ public class orbotModelCallback implements eventObserver.eventListener{
@Override @Override
public Object invokeObserver(List<Object> data, Object e_type) public Object invokeObserver(List<Object> data, Object e_type)
@ -87,6 +102,11 @@ public class orbotController extends AppCompatActivity {
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_VPN_ENABLED,status.sBridgeVPNStatus)); dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_VPN_ENABLED,status.sBridgeVPNStatus));
} }
public void onClose(View view){
finish();
overridePendingTransition(R.anim.push_anim_out_reverse, R.anim.push_anim_in_reverse);
}
/* LOCAL OVERRIDES */ /* LOCAL OVERRIDES */
@Override @Override
@ -105,33 +125,13 @@ public class orbotController extends AppCompatActivity {
@Override @Override
public void onBackPressed() { public void onBackPressed() {
finish(); onClose(null);
} }
public void onClose(View view){
finish();
}
float oldTouchValue;
@Override @Override
public boolean dispatchTouchEvent(MotionEvent event) { public boolean dispatchTouchEvent(MotionEvent event) {
mSwipeDirectionDetector.onTouchEvent(event);
int action=event.getAction(); return super.dispatchTouchEvent(event);
switch (action) {
case (MotionEvent.ACTION_DOWN):
oldTouchValue = event.getX();
case (MotionEvent.ACTION_MOVE):
float currentX = event.getX();
if (oldTouchValue < currentX-100)
{
finish();
}else {
return super.onTouchEvent(event);
}
default:
return super.onTouchEvent(event);
} }
}
} }

View File

@ -122,11 +122,8 @@ public class tabController extends AppCompatActivity
public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) { public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {
int position = viewHolder.getAdapterPosition(); int position = viewHolder.getAdapterPosition();
onClearTabBackup(); onClearTabBackup();
onRemoveTab(position); onRemoveView(position);
mTabAdapter.notifyItemRemoved(position);
initTabCount();
} }
@Override @Override
@ -154,9 +151,8 @@ public class tabController extends AppCompatActivity
} }
public void onRemoveView(int pIndex){ public void onRemoveView(int pIndex){
mHomeController.onCloseCurrentTab(mListModel.getList().get(pIndex).getSession()); onRemoveTab(pIndex);
onClearTabBackup(); mListModel.getList().remove(pIndex);
//onRemoveTab(pIndex);
mTabAdapter.notifyItemRemoved(pIndex); mTabAdapter.notifyItemRemoved(pIndex);
onShowUndoDialog(); onShowUndoDialog();
} }
@ -167,9 +163,17 @@ public class tabController extends AppCompatActivity
mHomeController.initTabCount(); mHomeController.initTabCount();
} }
public void onClose(){
onClearTabBackup();
if(mListModel.getList().size()<=0){
mHomeController.onNewTab(false, false);
}
finish();
}
public void onNewTabInvoked(){ public void onNewTabInvoked(){
mHomeController.onNewTab(true,false); mHomeController.onNewTab(true,false);
finish(); onClose();
overridePendingTransition(R.anim.popup_anim_in, R.anim.popup_anim_out); overridePendingTransition(R.anim.popup_anim_in, R.anim.popup_anim_out);
} }
@ -213,11 +217,11 @@ public class tabController extends AppCompatActivity
onNewTabInvoked(); onNewTabInvoked();
} }
else if(pView.getId() == R.id.pCloseTab){ else if(pView.getId() == R.id.pCloseTab){
mListModel.getList().clear();
mtabViewController.onTrigger(tabEnums.eTabViewCommands.M_DISMISS_MENU, null); mtabViewController.onTrigger(tabEnums.eTabViewCommands.M_DISMISS_MENU, null);
initTabCount(); for(int mCounter=0;mCounter<mListModel.getList().size();mCounter++){
mRecycleView.animate().setDuration(300).alpha(0).withEndAction(() -> mTabAdapter.notifyDataSetChanged()); onRemoveView(mCounter);
onShowUndoDialog(); mCounter-=1;
}
} }
else if(pView.getId() == R.id.pOpenSetting){ else if(pView.getId() == R.id.pOpenSetting){
mtabViewController.onTrigger(tabEnums.eTabViewCommands.M_DISMISS_MENU, null); mtabViewController.onTrigger(tabEnums.eTabViewCommands.M_DISMISS_MENU, null);
@ -231,7 +235,7 @@ public class tabController extends AppCompatActivity
if(status.sSettingIsAppPaused && (level==80 || level==15)) if(status.sSettingIsAppPaused && (level==80 || level==15))
{ {
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.HOME_LOW_MEMORY,true)); dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.HOME_LOW_MEMORY,true));
finish(); onClose();
} }
} }
@ -262,7 +266,7 @@ public class tabController extends AppCompatActivity
onClearSelection(null); onClearSelection(null);
}else { }else {
super.onBackPressed(); super.onBackPressed();
finish(); onClose();
overridePendingTransition(R.anim.popup_anim_in, R.anim.popup_anim_out); overridePendingTransition(R.anim.popup_anim_in, R.anim.popup_anim_out);
} }
} }
@ -295,6 +299,7 @@ public class tabController extends AppCompatActivity
mHomeController.onLoadTab((geckoSession)data.get(0),(boolean)data.get(1)); mHomeController.onLoadTab((geckoSession)data.get(0),(boolean)data.get(1));
} }
else if(e_type.equals(tabEnums.eTabAdapterCallback.ON_REMOVE_TAB_VIEW)){ else if(e_type.equals(tabEnums.eTabAdapterCallback.ON_REMOVE_TAB_VIEW)){
onClearTabBackup();
onRemoveView((Integer) data.get(0)); onRemoveView((Integer) data.get(0));
} }
return null; return null;

View File

@ -21,17 +21,20 @@ class tabModel
} }
public void onRemoveTab(int pIndex){ public void onRemoveTab(int pIndex){
mBackupIndex.add(mModelList.remove(pIndex)); mBackupIndex.add(mModelList.get(pIndex));
} }
public void onClearBackup(){ public void onClearBackup(){
for(int mCounter=0;mCounter<mBackupIndex.size();mCounter++){
mBackupIndex.get(mCounter).getSession().closeSession();
}
mBackupIndex.clear(); mBackupIndex.clear();
} }
public int onLoadBackup(){ public int onLoadBackup(){
int mSize = mBackupIndex.size(); int mSize = mBackupIndex.size();
for(int mCounter=0;mCounter<mBackupIndex.size();mCounter++){ for(int mCounter=0;mCounter<mBackupIndex.size();mCounter++){
mModelList.add(0,mBackupIndex.remove(mCounter)); mModelList.add(0,mBackupIndex.remove(mBackupIndex.size()-1));
mCounter-=1; mCounter-=1;
} }
return mSize; return mSize;

View File

@ -105,7 +105,7 @@ class tabViewController
mTabOptionMenu.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); mTabOptionMenu.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
mTabOptionMenu.setAnimationStyle(R.style.popup_window_animation); mTabOptionMenu.setAnimationStyle(R.style.popup_window_animation);
mTabOptionMenu.setElevation(7); mTabOptionMenu.setElevation(7);
mTabOptionMenu.showAsDropDown(view,0, helperMethod.pxFromDp(-45)); mTabOptionMenu.showAsDropDown(view,helperMethod.pxFromDp(-125), helperMethod.pxFromDp(-45));
} }
private void onCloseTabMenu() { private void onCloseTabMenu() {
@ -134,6 +134,7 @@ class tabViewController
mToastLayoutRoot.setAlpha(0); mToastLayoutRoot.setAlpha(0);
mToastLayoutRoot.animate().alpha(1); mToastLayoutRoot.animate().alpha(1);
initTabCount();
mDelayHandler.removeCallbacksAndMessages(null); mDelayHandler.removeCallbacksAndMessages(null);
mDelayHandler.postDelayed(() -> mToastLayoutRoot.animate().alpha(0).withEndAction(() -> mToastLayoutRoot.setVisibility(View.GONE)), 1500); mDelayHandler.postDelayed(() -> mToastLayoutRoot.animate().alpha(0).withEndAction(() -> mToastLayoutRoot.setVisibility(View.GONE)), 1500);
} }

View File

@ -6,4 +6,5 @@ public class messages
public final static int MESSAGE_UPDATE_LOADING_TEXT =1; public final static int MESSAGE_UPDATE_LOADING_TEXT =1;
public final static int MESSAGE_ON_URL_LOAD =2; public final static int MESSAGE_ON_URL_LOAD =2;
public final static int MESSAGE_PROGRESSBAR_VALIDATE =3;
} }

View File

@ -116,10 +116,12 @@ public class suggestionDataModel {
addSuggenstions("https://wowhead.com","Wow Head",true); addSuggenstions("https://wowhead.com","Wow Head",true);
addSuggenstions("https://bing.com","Bing",true); addSuggenstions("https://bing.com","Bing",true);
addSuggenstions("https://google.com","Google",true); addSuggenstions("https://google.com","Google",true);
addSuggenstions("https://boogle.store","Genesis Search",true); addSuggenstions("https://genesis.onion","Genesis Search",true);
} }
private void addSuggenstions(String url, String title,boolean isLoading){ private void addSuggenstions(String url, String title,boolean isLoading){
url = url.replace("boogle.store","genesis.onion");
title = title.replace("boogle.store","Genesis Search").replace("boogle","genesis");
url = helperMethod.removeLastSlash(url); url = helperMethod.removeLastSlash(url);
if(url.length()>1500 || title.equals("$TITLE") || title.equals("loading")){ if(url.length()>1500 || title.equals("$TITLE") || title.equals("loading")){
return; return;

View File

@ -61,6 +61,7 @@ class tabDataModel
int size = mTabs.size(); int size = mTabs.size();
for(int counter = 0; counter< size; counter++){ for(int counter = 0; counter< size; counter++){
mTabs.get(0).getSession().stop(); mTabs.get(0).getSession().stop();
mTabs.get(0).getSession().closeSession();
mTabs.remove(0); mTabs.remove(0);
} }
if(mTabs.size()>0){ if(mTabs.size()>0){
@ -68,6 +69,7 @@ class tabDataModel
} }
databaseController.getInstance().execSQL("DELETE FROM tab WHERE 1",null); databaseController.getInstance().execSQL("DELETE FROM tab WHERE 1",null);
} }
void closeTab(geckoSession mSession) { void closeTab(geckoSession mSession) {
@ -158,7 +160,7 @@ class tabDataModel
} catch (Throwable throwable) { } catch (Throwable throwable) {
throwable.printStackTrace(); throwable.printStackTrace();
} }
}, 100); }, 500);
} }
} }
} }

View File

@ -0,0 +1,102 @@
package com.darkweb.genesissearchengine.helperManager;
import android.view.GestureDetector.SimpleOnGestureListener;
import android.view.MotionEvent;
public class SimpleGestureFilter extends SimpleOnGestureListener{
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
float x1 = e1.getX();
float y1 = e1.getY();
float x2 = e2.getX();
float y2 = e2.getY();
Direction direction = getDirection(x1,y1,x2,y2);
return onSwipe(direction);
}
public boolean onSwipe(Direction direction){
return false;
}
/**
* Given two points in the plane p1=(x1, x2) and p2=(y1, y1), this method
* returns the direction that an arrow pointing from p1 to p2 would have.
* @param x1 the x position of the first point
* @param y1 the y position of the first point
* @param x2 the x position of the second point
* @param y2 the y position of the second point
* @return the direction
*/
public Direction getDirection(float x1, float y1, float x2, float y2){
double angle = getAngle(x1, y1, x2, y2);
return Direction.get(angle);
}
/**
*
* Finds the angle between two points in the plane (x1,y1) and (x2, y2)
* The angle is measured with 0/360 being the X-axis to the right, angles
* increase counter clockwise.
*
* @param x1 the x position of the first point
* @param y1 the y position of the first point
* @param x2 the x position of the second point
* @param y2 the y position of the second point
* @return the angle between two points
*/
public double getAngle(float x1, float y1, float x2, float y2) {
double rad = Math.atan2(y1-y2,x2-x1) + Math.PI;
return (rad*180/Math.PI + 180)%360;
}
public enum Direction{
up,
down,
left,
right;
/**
* Returns a direction given an angle.
* Directions are defined as follows:
*
* Up: [45, 135]
* Right: [0,45] and [315, 360]
* Down: [225, 315]
* Left: [135, 225]
*
* @param angle an angle from 0 to 360 - e
* @return the direction of an angle
*/
public static Direction get(double angle){
if(inRange(angle, 45, 135)){
return Direction.up;
}
else if(inRange(angle, 0,45) || inRange(angle, 315, 360)){
return Direction.right;
}
else if(inRange(angle, 225, 315)){
return Direction.down;
}
else{
return Direction.left;
}
}
/**
* @param angle an angle
* @param init the initial bound
* @param end the final bound
* @return returns true if the given angle is in the interval [init, end).
*/
private static boolean inRange(double angle, float init, float end){
return (angle >= init) && (angle < end);
}
}
}

View File

@ -8,6 +8,7 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.Filter; import android.widget.Filter;
import android.widget.ImageButton;
import android.widget.TextView; import android.widget.TextView;
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel; import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
import com.darkweb.genesissearchengine.constants.strings; import com.darkweb.genesissearchengine.constants.strings;
@ -39,6 +40,7 @@ public class autoCompleteAdapter extends ArrayAdapter<historyRowModel> {
TextView customerNameLabel = v.findViewById(R.id.hintCompletionTitle); TextView customerNameLabel = v.findViewById(R.id.hintCompletionTitle);
TextView myTv = v.findViewById( R.id.hintCompletionUrl); TextView myTv = v.findViewById( R.id.hintCompletionUrl);
ImageButton mMoveURL = v.findViewById( R.id.pMoveURL);
if (customerNameLabel != null) { if (customerNameLabel != null) {
if(customer.getHeader().equals(strings.GENERIC_EMPTY_STR)){ if(customer.getHeader().equals(strings.GENERIC_EMPTY_STR)){
@ -47,6 +49,7 @@ public class autoCompleteAdapter extends ArrayAdapter<historyRowModel> {
customerNameLabel.setText(customer.getHeader()); customerNameLabel.setText(customer.getHeader());
} }
myTv.setText(customer.getDescription()); myTv.setText(customer.getDescription());
mMoveURL.setTag(customer.getDescription());
} }
} }
return v; return v;
@ -72,20 +75,16 @@ public class autoCompleteAdapter extends ArrayAdapter<historyRowModel> {
if(constraint != null && !constraint.equals("about:blank")) { if(constraint != null && !constraint.equals("about:blank")) {
suggestions.clear(); suggestions.clear();
for (historyRowModel customer : itemsAll) { for (historyRowModel customer : itemsAll) {
if(suggestions.size()>10){ if(suggestions.size()>4){
break; break;
} }
if(!customer.getHeader().equals("$TITLE") && customer.getHeader().length()>2 && customer.getDescription().toLowerCase().length()>2 && (customer.getHeader().toLowerCase().contains(constraint.toString().toLowerCase()) || constraint.toString().toLowerCase().toLowerCase().contains(customer.getHeader()) || constraint.toString().toLowerCase().contains(customer.getDescription().toLowerCase()) || customer.getDescription().toLowerCase().contains(constraint.toString().toLowerCase()))){
if(!customer.getHeader().equals("$TITLE") && customer.getHeader().length()>2 && customer.getDescription().toLowerCase().length()>2 && (customer.getHeader().toLowerCase().contains(constraint.toString().toLowerCase()) || customer.getDescription().toLowerCase().contains(constraint.toString().toLowerCase()))){
Log.i("memememe:","memememe:"+constraint.toString().toLowerCase().replace("https://","").replace("http://","")); Log.i("memememe:","memememe:"+constraint.toString().toLowerCase().replace("https://","").replace("http://",""));
Log.i("memememe1:","memememe2:"+customer.getDescription().replace("https://","").replace("http://","")); Log.i("memememe1:","memememe2:"+customer.getDescription().replace("https://","").replace("http://",""));
if(!constraint.toString().toLowerCase().replace("https://","").replace("http://","").equals(customer.getDescription().replace("https://","").replace("http://",""))){
suggestions.add(customer); suggestions.add(customer);
} }
} }
}
FilterResults filterResults = new FilterResults(); FilterResults filterResults = new FilterResults();
filterResults.values = suggestions; filterResults.values = suggestions;
filterResults.count = suggestions.size(); filterResults.count = suggestions.size();
@ -98,7 +97,7 @@ public class autoCompleteAdapter extends ArrayAdapter<historyRowModel> {
protected void publishResults(CharSequence constraint, FilterResults results) protected void publishResults(CharSequence constraint, FilterResults results)
{ {
try{ try{
if(results != null && results.count > 0) { if(results != null) {
ArrayList<historyRowModel> filteredList = (ArrayList<historyRowModel>)((ArrayList<historyRowModel>)results.values).clone(); ArrayList<historyRowModel> filteredList = (ArrayList<historyRowModel>)((ArrayList<historyRowModel>)results.values).clone();
clear(); clear();

View File

@ -246,6 +246,16 @@ public class helperMethod
context.startActivity(myIntent); context.startActivity(myIntent);
} }
public static void openActivityReverse( Class<?> cls,int type,AppCompatActivity context,boolean animation){
Intent myIntent = new Intent(context, cls);
myIntent.putExtra(keys.PROXY_LIST_TYPE, type);
if(!animation){
myIntent.addFlags(FLAG_ACTIVITY_NO_ANIMATION);
}
context.startActivity(myIntent);
}
public static void restartActivity( Intent pIntent, AppCompatActivity pContext){ public static void restartActivity( Intent pIntent, AppCompatActivity pContext){
pContext.finish(); pContext.finish();
pContext.startActivity(pIntent); pContext.startActivity(pIntent);

View File

@ -162,9 +162,9 @@ class orbotManager
mLogsStarted = true; mLogsStarted = true;
} }
else { else {
logs = logs.replaceAll("[^a-zA-Z0-9%\\s+]", ""); // logs = logs.replaceAll("[^a-zA-Z0-9%\\s+]", "");
logs = helperMethod.capitalizeString(logs); // logs = helperMethod.capitalizeString(logs);
logs = logs.replace("(","").replace(":","_FERROR_").replace("NOTICE","").replace(")","").replace("_FERROR_",""); // logs = logs.replace("(","").replace(":","_FERROR_").replace("NOTICE","").replace(")","").replace("_FERROR_","");
} }

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="-100%"
android:toXDelta="0"
android:interpolator="@android:anim/decelerate_interpolator"
android:duration="250"/>
</set>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="250"
android:fromXDelta="0%"
android:fromYDelta="0%"
android:toXDelta="-100%"
android:toYDelta="0%" />
</set>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="0"
android:toXDelta="100%"
android:interpolator="@android:anim/decelerate_interpolator"
android:duration="250"/>
</set>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="250"
android:fromXDelta="100%"
android:fromYDelta="0%"
android:toXDelta="0%"
android:toYDelta="0%" />
</set>

View File

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<translate <set xmlns:android="http://schemas.android.com/apk/res/android">
xmlns:android="http://schemas.android.com/apk/res/android" <translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="250" android:fromXDelta="0"
android:fromXDelta="0%p" android:toXDelta="100%"
android:toXDelta="100%p"/> android:interpolator="@android:anim/decelerate_interpolator"
android:duration="300"/>
</set>

View File

@ -14,10 +14,10 @@
android:bottom="0dp"> android:bottom="0dp">
<shape android:shape="rectangle"> <shape android:shape="rectangle">
<solid android:color="#ffffff"/> <solid android:color="@color/c_background"/>
<stroke <stroke
android:width="1dp" android:width="1dp"
android:color="@color/white_dark"/> android:color="@color/c_edittext_background_dark"/>
</shape> </shape>
</item> </item>
</ripple> </ripple>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android" <ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/c_alert_background" android:layout_height="match_parent" android:layout_width="match_parent"> android:color="@color/c_alert_background" android:layout_height="match_parent" android:layout_width="match_parent">
<item android:id="@android:id/mask"> <item android:id="@android:id/mask">
<shape android:shape="rectangle"> <shape android:shape="rectangle">
@ -16,6 +17,9 @@
android:topLeftRadius="6dp" android:topLeftRadius="6dp"
android:topRightRadius="6dp"/> android:topRightRadius="6dp"/>
<item name="android:shadowColor">#000000</item>
<item name="android:shadowRadius">5</item>
<item name="android:shadowDy">3</item>
</shape> </shape>
</item> </item>
@ -39,6 +43,8 @@
android:endColor="@color/c_alert_background" android:endColor="@color/c_alert_background"
android:startColor="@color/c_alert_background" android:startColor="@color/c_alert_background"
android:type="linear" /> android:type="linear" />
</shape> </shape>
</item> </item>
</ripple> </ripple>

View File

@ -1,5 +1,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white"/> <solid android:color="@color/c_edittext_background"/>
<corners <corners
android:bottomLeftRadius="0dp" android:bottomLeftRadius="0dp"

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:left="-5dp" android:right="-5dp" android:top="0dp" android:bottom="-5dp"> <item android:left="-5dp" android:right="-5dp" android:top="0dp" android:bottom="-15dp">
<shape <shape
android:shape="rectangle"> android:shape="rectangle">
<stroke android:width="4dp" android:color="@color/secondary" /> <stroke android:width="4dp" android:color="#7700B3B3" />
<solid android:color="#050c14" /> <solid android:color="#181b25" />
</shape> </shape>
</item> </item>
</layer-list> </layer-list>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M5,15h2V8.41L18.59,20L20,18.59L8.41,7H15V5H5V15z"/>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 864 KiB

After

Width:  |  Height:  |  Size: 875 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 864 KiB

View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/pPopupFindContainer"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/pNavigationContainer"
android:layout_width="match_parent"
android:layout_height="45dp"
android:background="@color/c_edittext_background_dark"
android:paddingBottom="1dp"
android:elevation="8dp"
android:onClick="onOpenSearchEngine"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<LinearLayout
android:id="@+id/pNavigationContainerInner"
android:layout_width="match_parent"
android:layout_height="45dp"
android:background="@color/c_background"
android:elevation="8dp"
android:onClick="onOpenSearchEngine"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<ImageView
android:id="@+id/imageView"
android:layout_width="30dp"
android:layout_height="45dp"
android:contentDescription="@string/GENERAL_TODO"
android:padding="6.5dp"
android:layout_marginStart="2dp"
android:paddingEnd="4dp"
app:srcCompat="@xml/ic_baseline_search"
tools:ignore="RtlSymmetry"
app:tint="@color/c_navigation_tint" />
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:layout_weight="3"
android:paddingTop="11dp"
android:layout_marginStart="6dp"
android:text="@string/GENERAL_SEARCH_ENGINE"
android:textColor="@color/c_text_v1"
android:textSize="15sp" />
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,50 +1,77 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingRight="0dp" android:paddingRight="0dp"
android:paddingLeft="0dp" android:paddingLeft="0dp"
android:paddingBottom="0dp" android:paddingBottom="0dp"
android:elevation="0dp"
android:orientation="vertical"> android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:paddingTop="10dp" android:background="@xml/gx_side_item_suggestions"
android:paddingBottom="10dp"
android:orientation="vertical"
android:onClick="onSuggestionInvoked" android:onClick="onSuggestionInvoked"
android:background="@xml/gx_side_item_suggestions"> android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
tools:ignore="UselessParent">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="1"
android:paddingTop="10dp"
android:paddingBottom="10dp">
<TextView <TextView
android:id="@+id/hintCompletionTitle" android:id="@+id/hintCompletionTitle"
android:layout_marginEnd="20dp"
android:clickable="false"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="20dp"
android:clickable="false"
android:ellipsize="end"
android:paddingLeft="10dp" android:paddingLeft="10dp"
android:paddingRight="10dp" android:paddingRight="10dp"
android:textColor="@color/black"
android:singleLine="true" android:singleLine="true"
android:textSize="14sp" android:text="@string/GENERAL_DEFAULT_HINT_SUGGESTION"
android:ellipsize="end" android:textColor="@color/c_text_v1"
android:text="@string/GENERAL_DEFAULT_HINT_SUGGESTION" /> android:textSize="14sp" />
<TextView <TextView
android:id="@+id/hintCompletionUrl" android:id="@+id/hintCompletionUrl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="20dp" android:layout_marginEnd="20dp"
android:clickable="false" android:clickable="false"
android:layout_width="wrap_content"
android:singleLine="true"
android:ellipsize="end" android:ellipsize="end"
android:layout_height="wrap_content"
android:paddingLeft="10dp" android:paddingLeft="10dp"
android:paddingRight="10dp" android:paddingRight="10dp"
android:textColor="@color/holo_dark_gray" android:singleLine="true"
android:textSize="12.5sp" android:text="@string/GENERAL_DEFAULT_HINT_SUGGESTION"
android:text="@string/GENERAL_DEFAULT_HINT_SUGGESTION" /> android:textColor="@color/c_text_v6"
android:textSize="12.5sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
<ImageButton
android:id="@+id/pMoveURL"
android:layout_width="55dp"
android:padding="8dp"
android:layout_height="55dp"
android:layout_gravity="center_vertical"
android:src="@xml/ic_arrow_right"
android:tag="@string/GENERAL_TODO"
android:onClick="onSuggestionMove"
android:layout_margin="2dp"
android:background="@xml/gx_ripple_default_round"
android:tint="@color/c_navigation_tint"
android:rotation="225"
android:contentDescription="@string/GENERAL_TODO" />
</LinearLayout>
</LinearLayout> </LinearLayout>

View File

@ -24,13 +24,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/c_background_keyboard" android:background="@color/c_background_keyboard"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:translationZ="10dp"> android:translationZ="3dp">
<FrameLayout <FrameLayout
android:id="@+id/pTopLayout" android:id="@+id/pTopLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:animateLayoutChanges="true" android:animateLayoutChanges="false"
android:background="#00000000" android:background="#00000000"
android:clipToPadding="false" android:clipToPadding="false"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -87,6 +87,7 @@
android:animateLayoutChanges="true" android:animateLayoutChanges="true"
android:background="@xml/gx_generic_input" android:background="@xml/gx_generic_input"
android:completionHintView="@layout/hint_view" android:completionHintView="@layout/hint_view"
android:dropDownAnchor="@id/pSearchEngineBar"
android:ems="10" android:ems="10"
android:hint="@string/GENERAL_SEARCH_HINT" android:hint="@string/GENERAL_SEARCH_HINT"
android:importantForAutofill="no" android:importantForAutofill="no"
@ -94,7 +95,7 @@
android:maxLines="1" android:maxLines="1"
android:paddingLeft="38dp" android:paddingLeft="38dp"
android:paddingRight="15dp" android:paddingRight="15dp"
android:popupElevation="5dp" android:popupElevation="0dp"
android:selectAllOnFocus="true" android:selectAllOnFocus="true"
android:text="@string/GENERAL_HOME_URL" android:text="@string/GENERAL_HOME_URL"
android:textColor="@color/c_text_v1" android:textColor="@color/c_text_v1"
@ -175,8 +176,8 @@
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:id="@+id/pNestedScroll" android:id="@+id/pNestedScroll"
android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="fill_vertical" android:layout_gravity="fill_vertical"
android:layout_marginTop="0dp" android:layout_marginTop="0dp"
@ -198,7 +199,7 @@
android:id="@+id/pProgressBar" android:id="@+id/pProgressBar"
style="@style/Base.Widget.AppCompat.ProgressBar.Horizontal" style="@style/Base.Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="4dp" android:layout_height="5dp"
android:layout_marginTop="-1dp" android:layout_marginTop="-1dp"
android:alpha="0" android:alpha="0"
android:background="@color/clear_alpha" android:background="@color/clear_alpha"
@ -227,14 +228,15 @@
<FrameLayout <FrameLayout
android:id="@+id/pSplashLayout" android:id="@+id/pSplashLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:animateLayoutChanges="true"
android:layout_height="match_parent"> android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pSplashScreen" android:id="@+id/pSplashScreen"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@xml/hox_rounded_corner_container_bottom" android:background="@color/landing_ease_blue_splash"
android:clickable="true" android:animateLayoutChanges="true"
android:focusable="true"> android:focusable="true">
<ImageView <ImageView
@ -256,10 +258,9 @@
android:id="@+id/pImageDivider" android:id="@+id/pImageDivider"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="190dp" android:layout_marginTop="103dp"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:contentDescription="@string/GENERAL_TODO" android:contentDescription="@string/GENERAL_TODO"
android:paddingBottom="15dp"
android:src="@drawable/glide" android:src="@drawable/glide"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -280,23 +281,24 @@
<View <View
android:id="@+id/view" android:id="@+id/view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="2dp" android:layout_height="3dp"
android:layout_marginStart="20dp" android:alpha="0.5"
android:layout_marginBottom="11dp" android:elevation="4dp"
android:background="#0A1727" android:background="#264d73"
android:elevation="2dp"
app:layout_constraintBottom_toTopOf="@+id/pCopyright" app:layout_constraintBottom_toTopOf="@+id/pCopyright"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" /> app:layout_constraintStart_toStartOf="parent" />
<TextView <TextView
android:id="@+id/pCopyright" android:id="@+id/pCopyright"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="21dp" android:background="#0A1727"
android:layout_marginBottom="14dp" android:paddingStart="10dp"
android:text="Copyright © by Genesis Technologies" android:paddingTop="10dp"
android:textColor="#004d4d" android:paddingBottom="10dp"
android:text="Copyright © by Genesis Technologies | Built 1.0.2.2"
android:textColor="#4a6868"
android:textSize="13sp" android:textSize="13sp"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
@ -336,17 +338,18 @@
android:id="@+id/pOrbotLogs" android:id="@+id/pOrbotLogs"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="22dp" android:layout_marginStart="18dp"
android:layout_marginEnd="23dp"
android:layout_marginBottom="20dp" android:layout_marginBottom="20dp"
android:background="@xml/hx_border_left" android:background="@xml/hx_border_left"
android:ellipsize="end" android:ellipsize="end"
android:gravity="start" android:gravity="start"
android:maxHeight="250dp" android:maxHeight="250dp"
android:paddingStart="20dp" android:maxLines="4"
android:paddingTop="10dp" android:minHeight="80dp"
android:paddingStart="15dp"
android:paddingTop="18dp"
android:paddingRight="20dp" android:paddingRight="20dp"
android:paddingBottom="10dp" android:paddingBottom="15dp"
android:text="@string/HOME_LOADING" android:text="@string/HOME_LOADING"
android:textAlignment="textStart" android:textAlignment="textStart"
android:textColor="@color/white" android:textColor="@color/white"
@ -374,11 +377,28 @@
android:layout_width="90dp" android:layout_width="90dp"
android:layout_height="90dp" android:layout_height="90dp"
android:layout_marginStart="5dp" android:layout_marginStart="5dp"
android:layout_marginTop="85dp"
android:contentDescription="@string/GENERAL_TODO"
android:translationZ="3dp" android:translationZ="3dp"
app:layout_constraintBottom_toBottomOf="@+id/pImageDivider"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/pImageDivider"
app:srcCompat="@drawable/genesis_logo_bordered" /> app:srcCompat="@drawable/genesis_logo_bordered" />
<ImageView
android:id="@+id/pBlocker"
android:layout_width="189dp"
android:layout_height="65dp"
android:layout_marginTop="14dp"
android:layout_marginBottom="13dp"
android:clickable="false"
android:contentDescription="@string/GENERAL_TODO"
android:focusable="false"
android:translationZ="3dp"
app:layout_constraintBottom_toTopOf="@+id/view"
app:layout_constraintEnd_toEndOf="@+id/pSettings"
app:layout_constraintStart_toStartOf="@+id/Connect"
app:layout_constraintTop_toBottomOf="@+id/pOrbotLogs" />
<TextView <TextView
android:id="@+id/pInfo4" android:id="@+id/pInfo4"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -392,7 +412,7 @@
android:paddingRight="15dp" android:paddingRight="15dp"
android:text="Secured by Tor Network" android:text="Secured by Tor Network"
android:textAlignment="textStart" android:textAlignment="textStart"
android:textColor="#6a9495" android:textColor="#bfbfbf"
android:textFontWeight="5" android:textFontWeight="5"
android:textSize="12.5sp" android:textSize="12.5sp"
android:textStyle="bold" android:textStyle="bold"
@ -415,7 +435,7 @@
android:paddingRight="15dp" android:paddingRight="15dp"
android:text="Builtin Onion Search Engine" android:text="Builtin Onion Search Engine"
android:textAlignment="textStart" android:textAlignment="textStart"
android:textColor="#6a9495" android:textColor="#bfbfbf"
android:textFontWeight="5" android:textFontWeight="5"
android:textSize="12.5sp" android:textSize="12.5sp"
android:textStyle="bold" android:textStyle="bold"
@ -438,7 +458,7 @@
android:paddingRight="15dp" android:paddingRight="15dp"
android:text="No Record and Digital Fingerprinting" android:text="No Record and Digital Fingerprinting"
android:textAlignment="textStart" android:textAlignment="textStart"
android:textColor="#6a9495" android:textColor="#bfbfbf"
android:textFontWeight="5" android:textFontWeight="5"
android:textSize="12.5sp" android:textSize="12.5sp"
android:textStyle="bold" android:textStyle="bold"
@ -453,10 +473,10 @@
android:layout_width="90dp" android:layout_width="90dp"
android:layout_height="90dp" android:layout_height="90dp"
android:layout_marginStart="5dp" android:layout_marginStart="5dp"
android:layout_marginTop="15dp" android:layout_marginTop="10dp"
android:translationZ="3dp" android:translationZ="3dp"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pImageDivider" app:layout_constraintTop_toBottomOf="@+id/pGenesisLogo"
app:srcCompat="@drawable/sheild_logo_bordered" /> app:srcCompat="@drawable/sheild_logo_bordered" />
<TextView <TextView
@ -472,7 +492,7 @@
android:paddingRight="15dp" android:paddingRight="15dp"
android:text="Secured by Tor Network" android:text="Secured by Tor Network"
android:textAlignment="textStart" android:textAlignment="textStart"
android:textColor="#6a9495" android:textColor="#bfbfbf"
android:textFontWeight="5" android:textFontWeight="5"
android:textSize="12.5sp" android:textSize="12.5sp"
android:textStyle="bold" android:textStyle="bold"
@ -495,7 +515,7 @@
android:paddingRight="15dp" android:paddingRight="15dp"
android:text="Builtin Onion Search Engine" android:text="Builtin Onion Search Engine"
android:textAlignment="textStart" android:textAlignment="textStart"
android:textColor="#6a9495" android:textColor="#bfbfbf"
android:textFontWeight="5" android:textFontWeight="5"
android:textSize="12.5sp" android:textSize="12.5sp"
android:textStyle="bold" android:textStyle="bold"
@ -518,7 +538,7 @@
android:paddingRight="15dp" android:paddingRight="15dp"
android:text="No Record and Digital Fingerprinting" android:text="No Record and Digital Fingerprinting"
android:textAlignment="textStart" android:textAlignment="textStart"
android:textColor="#6a9495" android:textColor="#bfbfbf"
android:textFontWeight="5" android:textFontWeight="5"
android:textSize="12.5sp" android:textSize="12.5sp"
android:textStyle="bold" android:textStyle="bold"
@ -578,17 +598,27 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<ImageView <include
android:id="@+id/pBlocker" android:id="@+id/pSearchEngineBar"
layout="@layout/popup_search_engine"
android:layout_width="match_parent" android:layout_width="match_parent"
android:clickable="true" android:layout_height="wrap_content"
android:alpha="0" android:elevation="8dp"
android:visibility="gone" android:visibility="gone"
android:layout_height="match_parent" app:layout_constraintEnd_toEndOf="parent"
tools:srcCompat="@tools:sample/avatars" app:layout_constraintStart_toStartOf="parent"
android:background="@color/black" app:layout_constraintTop_toTopOf="@+id/pAdView" />
android:contentDescription="@string/GENERAL_TODO"
android:focusable="true" />
<ImageView
android:id="@+id/pBlockerFullSceen"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:alpha="0"
android:background="@color/black"
android:clickable="true"
android:contentDescription="@string/GENERAL_TODO"
android:focusable="true"
android:visibility="gone"
tools:srcCompat="@tools:sample/avatars" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -213,7 +213,7 @@
android:layout_marginStart="5dp" android:layout_marginStart="5dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
app:tint="@color/c_icon_tint" app:tint="@color/c_icon_tint"
android:src="@drawable/ic_baseline_search" android:src="@xml/ic_baseline_search"
android:contentDescription="@string/GENERAL_TODO" /> android:contentDescription="@string/GENERAL_TODO" />
<LinearLayout <LinearLayout

View File

@ -10,8 +10,9 @@
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<LinearLayout <LinearLayout
android:layout_width="200dp" android:layout_width="150dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:elevation="7dp"
android:orientation="vertical" android:orientation="vertical"
android:background="@xml/hx_menu_popup" android:background="@xml/hx_menu_popup"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View File

@ -43,6 +43,7 @@
<color name="c_profile_radial_inner">#2c2b31</color> <color name="c_profile_radial_inner">#2c2b31</color>
<color name="c_profile_radial_outer">#2c2b31</color> <color name="c_profile_radial_outer">#2c2b31</color>
<color name="c_edittext_background">#3c3946</color> <color name="c_edittext_background">#3c3946</color>
<color name="c_edittext_background_dark">#24222a</color>
<color name="c_menu_drop_shadow_05">#00000000</color> <color name="c_menu_drop_shadow_05">#00000000</color>
<color name="c_menu_drop_shadow_10">#00000000</color> <color name="c_menu_drop_shadow_10">#00000000</color>
<color name="c_menu_drop_shadow_15">#00000000</color> <color name="c_menu_drop_shadow_15">#00000000</color>
@ -69,7 +70,7 @@
<color name="blue">#0066FF</color> <color name="blue">#0066FF</color>
<color name="ease_blue_light">#fdfeff</color> <color name="ease_blue_light">#fdfeff</color>
<color name="ease_blue">#4d88ff</color> <color name="ease_blue">#4d88ff</color>
<color name="landing_ease_blue">#212d45</color> <color name="landing_ease_blue">#0A1727</color>
<color name="landing_ease_blue_light_1">#eef1f7</color> <color name="landing_ease_blue_light_1">#eef1f7</color>
<color name="landing_ease_blue_light_2">#eef1f7</color> <color name="landing_ease_blue_light_2">#eef1f7</color>
<color name="cursor_blue">#3385ff</color> <color name="cursor_blue">#3385ff</color>

View File

@ -4,6 +4,7 @@
<string name="app_name" translatable="false">Genesis</string> <string name="app_name" translatable="false">Genesis</string>
<string name="GENERAL_SEARCH_HINT" translatable="false">Search or type web address</string> <string name="GENERAL_SEARCH_HINT" translatable="false">Search or type web address</string>
<string name="GENERAL_FIND_HINT" translatable="false">Find in page</string> <string name="GENERAL_FIND_HINT" translatable="false">Find in page</string>
<string name="GENERAL_SEARCH_ENGINE" translatable="false">Search Engine</string>
<string name="GENERAL_HOME_URL" translatable="false">https://genesis.onion</string> <string name="GENERAL_HOME_URL" translatable="false">https://genesis.onion</string>
<string name="GENERAL_ERROR_TITLE" translatable="false">\u0020\u0020\u0020Opps! Some Thing Went Wrong</string> <string name="GENERAL_ERROR_TITLE" translatable="false">\u0020\u0020\u0020Opps! Some Thing Went Wrong</string>
<string name="GENERAL_TODO" translatable="false">TODO</string> <string name="GENERAL_TODO" translatable="false">TODO</string>

View File

@ -45,6 +45,7 @@
<color name="c_profile_radial_inner">#000000</color> <color name="c_profile_radial_inner">#000000</color>
<color name="c_profile_radial_outer">#ffffff</color> <color name="c_profile_radial_outer">#ffffff</color>
<color name="c_edittext_background">#f1f3f4</color> <color name="c_edittext_background">#f1f3f4</color>
<color name="c_edittext_background_dark">#f5f5f5</color>
<color name="c_button_warning">#610505</color> <color name="c_button_warning">#610505</color>
<color name="c_rateus_warning">#b3b3b3</color> <color name="c_rateus_warning">#b3b3b3</color>
<color name="c_splash_buttons">#ffffff</color> <color name="c_splash_buttons">#ffffff</color>
@ -70,8 +71,8 @@
<color name="blue">#0066FF</color> <color name="blue">#0066FF</color>
<color name="ease_blue_light">#fdfeff</color> <color name="ease_blue_light">#fdfeff</color>
<color name="ease_blue">#4d88ff</color> <color name="ease_blue">#4d88ff</color>
<color name="landing_ease_blue">#111722</color> <color name="landing_ease_blue">#0A1727</color>
<color name="landing_ease_blue_splash">#192234</color> <color name="landing_ease_blue_splash">#191919</color>
<color name="landing_ease_blue_light_1">#eef1f7</color> <color name="landing_ease_blue_light_1">#eef1f7</color>
<color name="landing_ease_blue_light_2">#eef1f7</color> <color name="landing_ease_blue_light_2">#eef1f7</color>
<color name="cursor_blue">#3385ff</color> <color name="cursor_blue">#3385ff</color>

View File

@ -4,6 +4,7 @@
<string name="app_name" translatable="false">Genesis</string> <string name="app_name" translatable="false">Genesis</string>
<string name="GENERAL_SEARCH_HINT" translatable="false">Search or type web address</string> <string name="GENERAL_SEARCH_HINT" translatable="false">Search or type web address</string>
<string name="GENERAL_FIND_HINT" translatable="false">Find in page</string> <string name="GENERAL_FIND_HINT" translatable="false">Find in page</string>
<string name="GENERAL_SEARCH_ENGINE" translatable="false">Search Engine</string>
<string name="GENERAL_HOME_URL" translatable="false">https://genesis.onion</string> <string name="GENERAL_HOME_URL" translatable="false">https://genesis.onion</string>
<string name="GENERAL_ERROR_TITLE" translatable="false">\u0020\u0020\u0020Opps! Some Thing Went Wrong</string> <string name="GENERAL_ERROR_TITLE" translatable="false">\u0020\u0020\u0020Opps! Some Thing Went Wrong</string>
<string name="GENERAL_TODO" translatable="false">TODO</string> <string name="GENERAL_TODO" translatable="false">TODO</string>
@ -312,7 +313,7 @@
<!-- Home View --> <!-- Home View -->
<string name="HOME_TAB_TEXT" translatable="false">1</string> <string name="HOME_TAB_TEXT" translatable="false">1</string>
<string name="HOME_CONNECT" translatable="false">Connect</string> <string name="HOME_CONNECT" translatable="false">Connect</string>
<string name="HOME_LOADING" translatable="false">Idle | Waiting to start</string> <string name="HOME_LOADING" translatable="false">Idle | Genesis on standby at the moment</string>
<string name="HOME_LOADING_STATIC" translatable="false">~&#160;Genesis on standby at the moment</string> <string name="HOME_LOADING_STATIC" translatable="false">~&#160;Genesis on standby at the moment</string>
<!-- Landing Page --> <!-- Landing Page -->