diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 509dc8ca..205f5d9f 100755 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -34,96 +34,96 @@ android:name="com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage.settingController" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:label="@string/SETTING_HEADER" - android:windowSoftInputMode="adjustNothing" /> + android:windowSoftInputMode="adjustPan" /> + android:windowSoftInputMode="adjustPan" /> + android:windowSoftInputMode="adjustPan" /> + android:windowSoftInputMode="adjustPan" /> + android:windowSoftInputMode="adjustPan" /> + android:windowSoftInputMode="adjustPan" /> + android:windowSoftInputMode="adjustPan" /> + android:windowSoftInputMode="adjustPan" /> + android:windowSoftInputMode="adjustPan" /> + android:windowSoftInputMode="adjustPan" /> + android:windowSoftInputMode="adjustPan" /> + android:windowSoftInputMode="adjustPan" /> + android:windowSoftInputMode="adjustPan" /> + android:windowSoftInputMode="adjustPan" /> + android:windowSoftInputMode="adjustPan" /> + android:windowSoftInputMode="adjustPan" /> + android:windowSoftInputMode="adjustPan" /> diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/NestedGeckoView.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/NestedGeckoView.java index f48b9c08..95be9268 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/NestedGeckoView.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/NestedGeckoView.java @@ -59,6 +59,7 @@ public class NestedGeckoView extends GeckoView { mNestedOffsetY += mScrollOffset[1]; } + mLastY = eventY - mScrollOffset[1]; if (allowScroll && dispatchNestedScroll(0, mScrollOffset[1], 0, deltaY, mScrollOffset)) { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController.java index 40123ba5..d61fcbac 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController.java @@ -50,7 +50,6 @@ import com.darkweb.genesissearchengine.helperManager.KeyboardUtils; import com.darkweb.genesissearchengine.helperManager.eventObserver; import com.darkweb.genesissearchengine.helperManager.helperMethod; import com.darkweb.genesissearchengine.pluginManager.pluginController; -import com.darkweb.genesissearchengine.pluginManager.pluginEnums; import com.darkweb.genesissearchengine.widget.progressBar.AnimatedProgressBar; import com.example.myapplication.R; import com.google.android.gms.ads.AdView; @@ -87,6 +86,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba private ConstraintLayout mSplashScreen; private AutoCompleteTextView mSearchbar; private ImageView mLoadingIcon; + private ImageView mBlocker; private TextView mLoadingText; private AdView mBannerAds = null; private ImageButton mGatewaySplash; @@ -99,6 +99,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba private TextView mFindCount; private ImageButton mVoiceInput; private ImageButton mMenu; + private FrameLayout mNestedScroll; /*Redirection Objects*/ private boolean mPageClosed = false; @@ -129,7 +130,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba pluginController.getInstance().initialize(); initializeLocalEventHandlers(); initLandingPage(); - //onNewIntent(getIntent()); initLocalLanguage(); } @@ -208,30 +208,32 @@ public class homeController extends AppCompatActivity implements ComponentCallba { mGeckoView = findViewById(R.id.pWebView); - mProgressBar = findViewById(R.id.progressBar); - mSplashScreen = findViewById(R.id.splashScreen); + mProgressBar = findViewById(R.id.pProgressBar); + mSplashScreen = findViewById(R.id.pSplashScreen); mSearchbar = findViewById(R.id.pSearchInput); - mLoadingIcon = findViewById(R.id.imageView_loading_back); - mLoadingText = findViewById(R.id.loadingText); + mLoadingText = findViewById(R.id.pOrbotLogs); mWebViewContainer = findViewById(R.id.pWebLayoutView); mTopLayout = findViewById(R.id.pTopLayout); + mLoadingIcon = findViewById(R.id.pLoadingIcon); mBannerAds = findViewById(R.id.pAdView); - mGatewaySplash = findViewById(R.id.gateway_splash); - mTopBar = findViewById(R.id.topbar); - mBackSplash = findViewById(R.id.backsplash); + mGatewaySplash = findViewById(R.id.pSettings); + mTopBar = findViewById(R.id.pTopbar); + mBackSplash = findViewById(R.id.pTopImage); mConnectButton = findViewById(R.id.Connect); - mNewTab = findViewById(R.id.newButtonInvoke); + mNewTab = findViewById(R.id.pTabCounter); mFindBar = findViewById(R.id.pFindBar); mFindText = findViewById(R.id.pFindText); mFindCount = findViewById(R.id.pFindCount); mVoiceInput = findViewById(R.id.pVoiceInput); mMenu = findViewById(R.id.pMenu); + mBlocker = findViewById(R.id.pBlocker); + mNestedScroll = findViewById(R.id.pNestedScroll); mGeckoView.setSaveEnabled(false); mGeckoView.setSaveFromParentEnabled(false); mGeckoClient = new geckoClients(); - mHomeViewController.initialization(new homeViewCallback(),this,mNewTab, mWebViewContainer, mLoadingText, mProgressBar, mSearchbar, mSplashScreen, mLoadingIcon, mBannerAds,(ArrayList)dataController.getInstance().invokeSuggestion(dataEnums.eSuggestionCommands.M_GET_SUGGESTION, null), mGatewaySplash, mTopBar, mGeckoView, mBackSplash, mConnectButton, mFindBar, mFindText, mFindCount, mTopLayout, mVoiceInput, mMenu); + mHomeViewController.initialization(new homeViewCallback(),this,mNewTab, mWebViewContainer, mLoadingText, mProgressBar, mSearchbar, mSplashScreen, mLoadingIcon, mBannerAds,(ArrayList)dataController.getInstance().invokeSuggestion(dataEnums.eSuggestionCommands.M_GET_SUGGESTION, null), mGatewaySplash, mTopBar, mGeckoView, mBackSplash, mConnectButton, mFindBar, mFindText, mFindCount, mTopLayout, mVoiceInput, mMenu, mNestedScroll, mBlocker); mGeckoView.onSetHomeEvent(new nestedGeckoViewCallback()); mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), this,false); mGeckoClient.onValidateInitializeFromStartup(); @@ -396,14 +398,15 @@ public class homeController extends AppCompatActivity implements ComponentCallba { if (actionId == EditorInfo.IME_ACTION_NEXT || actionId == EditorInfo.IME_ACTION_GO || actionId == EditorInfo.IME_ACTION_DONE) { - helperMethod.hideKeyboard(homeController.this); + onSearchBarInvoked(v); + mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),true); + mHomeViewController.onClearSelections(true); mGeckoClient.setLoading(true); final Handler handler = new Handler(); handler.postDelayed(() -> { pluginController.getInstance().logEvent(strings.EVENT_SEARCH_INVOKED); - onSearchBarInvoked(v); - mGeckoView.clearFocus(); + mHomeViewController.onClearSelections(false); }, 500); } return true; @@ -458,8 +461,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),true); } }); - pluginController.getInstance().logEvent(strings.EVENT_APP_STARTED); + pluginController.getInstance().logEvent(strings.EVENT_APP_STARTED); KeyboardUtils.addKeyboardToggleListener(this, isVisible -> isKeyboardOpened = isVisible); } @@ -476,7 +479,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba public void onSuggestionInvoked(View view){ String val = ((TextView)view.findViewById(R.id.hintCompletionUrl)).getText().toString(); onLoadURL(val); - mSearchbar.clearFocus(); mSearchbar.setSelection(0); mHomeViewController.onUpdateSearchBar(val,false); } @@ -637,16 +639,15 @@ public class homeController extends AppCompatActivity implements ComponentCallba protected void onActivityResult(int requestCode, int resultCode, Intent data){ if(requestCode==100){ if(resultCode == RESULT_OK && null != data){ + onSearchBarInvoked(mSearchbar); ArrayList result = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS); mHomeViewController.onUpdateSearchBar(result.get(0),false); - helperMethod.hideKeyboard(homeController.this); mGeckoClient.setLoading(true); final Handler handler = new Handler(); handler.postDelayed(() -> { pluginController.getInstance().logEvent(strings.EVENT_SEARCH_INVOKED); - onSearchBarInvoked(mSearchbar); mGeckoView.clearFocus(); }, 500); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeViewController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeViewController.java index 294734b5..cbf2834f 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeViewController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeViewController.java @@ -21,6 +21,7 @@ import android.view.ViewGroup; import android.view.ViewOutlineProvider; import android.view.Window; import android.view.WindowManager; +import android.view.animation.AccelerateDecelerateInterpolator; import android.view.animation.AnimationUtils; import android.view.animation.DecelerateInterpolator; import android.view.inputmethod.EditorInfo; @@ -30,7 +31,9 @@ import androidx.annotation.RequiresApi; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatDelegate; import androidx.constraintlayout.widget.ConstraintLayout; +import androidx.coordinatorlayout.widget.CoordinatorLayout; import androidx.core.content.ContextCompat; +import androidx.core.widget.NestedScrollView; import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel; import com.darkweb.genesissearchengine.constants.*; @@ -83,12 +86,14 @@ class homeViewController private FrameLayout mTopLayout; private ImageButton mVoiceInput; private ImageButton mMenu; + private FrameLayout mNestedScroll; + private ImageView mBlocker; /*Local Variables*/ private Callable mLogs = null; 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 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){ + 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 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){ this.mContext = context; this.mProgressBar = progressBar; this.mSearchbar = searchbar; @@ -111,6 +116,8 @@ class homeViewController this.mTopLayout = pTopLayout; this.mVoiceInput = pVoiceInput; this.mMenu = pMenu; + this.mNestedScroll = pNestedScroll; + this.mBlocker = pBlocker; initSplashScreen(); initializeSuggestionView(suggestions); @@ -135,12 +142,13 @@ class homeViewController public void initSearchBarFocus(boolean pStatus){ if(!pStatus){ - this.mVoiceInput.animate().setDuration(250).alpha(0).withEndAction(() -> { + this.mVoiceInput.animate().setDuration(0).alpha(0).withEndAction(() -> { mVoiceInput.setVisibility(View.GONE); ((LinearLayout)mNewTab.getParent()).setVisibility(View.VISIBLE); mMenu.setVisibility(View.VISIBLE); - }); + mSearchbar.setPadding(mSearchbar.getPaddingLeft(),0,helperMethod.pxFromDp(15),0); + }); }else { Drawable drawable; Resources res = mContext.getResources(); @@ -158,10 +166,19 @@ class homeViewController handler.postDelayed(() -> { mVoiceInput.setVisibility(View.VISIBLE); - }, 250); + }, 0); ((LinearLayout)this.mNewTab.getParent()).setVisibility(View.GONE); this.mMenu.setVisibility(View.GONE); + + mSearchbar.setPadding(mSearchbar.getPaddingLeft(),0,helperMethod.pxFromDp(40),0); + + final Handler handler_keyboard = new Handler(); + handler_keyboard.postDelayed(() -> + { + InputMethodManager imm = (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE); + Objects.requireNonNull(imm).toggleSoftInput(InputMethodManager.RESULT_UNCHANGED_SHOWN, 0); + }, 250); } } @@ -194,8 +211,8 @@ class homeViewController @RequiresApi(api = Build.VERSION_CODES.M) private void initStatusBarColor() { - animatedColor oneToTwo = new animatedColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue), ContextCompat.getColor(mContext, R.color.landing_ease_blue)); - animatedColor twoToThree = new animatedColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue), ContextCompat.getColor(mContext, R.color.c_background)); + animatedColor oneToTwo = new animatedColor(ContextCompat.getColor(mContext, R.color.secondary), ContextCompat.getColor(mContext, R.color.secondary)); + animatedColor twoToThree = new animatedColor(ContextCompat.getColor(mContext, R.color.secondary), 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); @@ -277,33 +294,32 @@ class homeViewController public void initSplashLoading(){ mLoading.setAnimation(helperMethod.getRotationAnimation()); - mLoading.setLayoutParams(helperMethod.getCenterScreenPoint(mLoading.getLayoutParams())); mLoading.setAnimation(helperMethod.getRotationAnimation()); - mLoading.setLayoutParams(helperMethod.getCenterScreenPoint(mLoading.getLayoutParams())); + mLoadingText.setAlpha(0); mLoadingText.setVisibility(View.VISIBLE); + mLoadingText.animate().alpha(1); - mConnectButton.setVisibility(View.GONE); - mGatewaySplash.setVisibility(View.GONE); - + mConnectButton.setClickable(false); + mGatewaySplash.setClickable(false); } void initHomePage(){ mConnectButton.setClickable(false); mGatewaySplash.setClickable(false); - mConnectButton.animate().setDuration(300).alpha(0f).withEndAction((this::initSplashLoading)); - mGatewaySplash.animate().setDuration(300).alpha(0f); + mConnectButton.animate().alpha(0.4f).withEndAction(this::initSplashLoading); + mGatewaySplash.animate().alpha(0.4f); } private void initSplashScreen(){ mSearchbar.setEnabled(false); helperMethod.hideKeyboard(mContext); - mBackSplash.getLayoutParams().height = helperMethod.getScreenHeight(mContext) - helperMethod.getStatusBarHeight(mContext)*2; + //mBackSplash.getLayoutParams().height = (int)(helperMethod.getScreenHeight(mContext) - helperMethod.getStatusBarHeight(mContext)*1.5f); mSearchbar.setEnabled(false); View root = mSearchbar.getRootView(); - root.setBackgroundColor(ContextCompat.getColor(mContext, R.color.dark_purple)); + root.setBackgroundColor(ContextCompat.getColor(mContext, R.color.c_background_keyboard)); mGeckoView.setBackgroundResource( R.color.dark_purple); } @@ -359,7 +375,10 @@ class homeViewController } private void triggerPostUI(){ - mSplashScreen.setVisibility(View.GONE); + if(mSplashScreen.getVisibility()!=View.GONE){ + mSplashScreen.setVisibility(View.GONE); + mSplashScreen.invalidate(); + } if(mProgressBar.getProgress()>0 && mProgressBar.getProgress()<10000){ mProgressBar.animate().setStartDelay(0).alpha(1); @@ -605,13 +624,16 @@ class homeViewController } Handler mProgressHandler = new Handler(); Runnable mProgressBarRunnable = null; + void onUpdateLogs(String log){ mLoadingText.setText(log); } + void progressBarReset(){ mProgressBar.setProgress(5); mProgressBar.setVisibility(View.INVISIBLE); } + void onProgressBarUpdate(int value){ if(mProgressBarRunnable!=null){ mProgressHandler.removeCallbacks(mProgressBarRunnable); @@ -670,7 +692,9 @@ class homeViewController } void onClearSelections(boolean hideKeyboard){ - mSearchbar.clearFocus(); + mSearchbar.setFocusable(false); + mSearchbar.setFocusableInTouchMode(true); + mSearchbar.setFocusable(true); if(hideKeyboard){ helperMethod.hideKeyboard(mContext); } @@ -692,13 +716,10 @@ class homeViewController void onFullScreenUpdate(boolean status){ int value = !status ? 1 : 0; - mTopBar.setClickable(!status); - disableEnableControls(!status, mTopBar); - mTopBar.setAlpha(value); - mBannerAds.setVisibility(View.GONE); + this.mBlocker.setVisibility(View.VISIBLE); + this.mBlocker.setAlpha(1f); - if(status){ - mWebviewContainer.setPadding(0,0,0,0); + if(status) { defaultFlag = mContext.getWindow().getDecorView().getSystemUiVisibility(); final int flags = View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION @@ -706,35 +727,67 @@ class homeViewController | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; - mContext.getWindow().getDecorView().setSystemUiVisibility(flags); - mProgressBar.setVisibility(View.GONE); - - ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mWebviewContainer.getLayoutParams(); - params.setMargins(0, 0, 0, 0); - mWebviewContainer.setLayoutParams(params); - mBannerAds.setVisibility(View.GONE); - com.darkweb.genesissearchengine.constants.status.sFullScreenBrowsing = false; - mGeckoView.setPadding(0,0,0,0); + }else { } - else { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - mContext.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); - }else { - mContext.getWindow().setStatusBarColor(mContext.getResources().getColor(R.color.blue_dark)); + + 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); + mTopBar.setVisibility(View.GONE); + mBannerAds.setVisibility(View.GONE); + + ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mWebviewContainer.getLayoutParams(); + params.setMargins(0, helperMethod.pxFromDp(0), 0, 0); + mWebviewContainer.setLayoutParams(params); + + ViewGroup.MarginLayoutParams params1 = (ViewGroup.MarginLayoutParams) mWebviewContainer.getLayoutParams(); + params1.setMargins(0, 0, 0,0); + mGeckoView.setLayoutParams(params1); + + com.darkweb.genesissearchengine.constants.status.sFullScreenBrowsing = false; + initTopBarPadding(); + + this.mBlocker.animate().setStartDelay(250).setDuration(200).alpha(0).withEndAction(() -> { + mBlocker.setVisibility(View.GONE); + }); } + else { + mProgressBar.setVisibility(View.VISIBLE); + mTopBar.setVisibility(View.VISIBLE); + mBannerAds.setVisibility(View.GONE); + mEvent.invokeObserver(Collections.singletonList(!isLandscape), enums.etype.on_init_ads); - mContext.getWindow().getDecorView().setSystemUiVisibility(defaultFlag); - mProgressBar.setVisibility(View.VISIBLE); + ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mWebviewContainer.getLayoutParams(); + params.setMargins(0, 0, 0,0); + mWebviewContainer.setLayoutParams(params); + + ViewGroup.MarginLayoutParams params1 = (ViewGroup.MarginLayoutParams) mWebviewContainer.getLayoutParams(); + params1.setMargins(0, 0, 0,helperMethod.pxFromDp(60)); + 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)); + initTopBarPadding(); + + this.mBlocker.animate().setStartDelay(250).setDuration(200).alpha(0).withEndAction(() -> { + mBlocker.setVisibility(View.GONE); + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + mContext.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); + }else { + mContext.getWindow().setStatusBarColor(mContext.getResources().getColor(R.color.blue_dark)); + } + }); + } + }, 200); - ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mWebviewContainer.getLayoutParams(); - params.setMargins(0, helperMethod.pxFromDp(55), 0, 0); - mWebviewContainer.setLayoutParams(params); - mBannerAds.setVisibility(View.GONE); - mEvent.invokeObserver(Collections.singletonList(!isLandscape), enums.etype.on_init_ads); - com.darkweb.genesissearchengine.constants.status.sFullScreenBrowsing = (boolean) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FULL_SCREEN_BROWSIING,true)); - initTopBarPadding(); - } } void onReDraw(){ diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/landingManager/landingController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/landingManager/landingController.java index 792a251e..74694836 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/landingManager/landingController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/landingManager/landingController.java @@ -45,7 +45,7 @@ public class landingController extends AppIntro { // OPTIONAL METHODS // Override bar/separator color. - setBarColor(getResources().getColor(R.color.landing_ease_blue)); + setBarColor(getResources().getColor(R.color.secondary)); setSeparatorColor(getResources().getColor(R.color.white)); // Hide Skip/Done button. diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/landingManager/landingViewController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/landingManager/landingViewController.java index 36007213..590f8ffb 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/landingManager/landingViewController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/landingManager/landingViewController.java @@ -33,7 +33,7 @@ class landingViewController Window window = mContext.getWindow(); window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) { - window.setStatusBarColor(mContext.getResources().getColor(R.color.landing_ease_blue)); + window.setStatusBarColor(mContext.getResources().getColor(R.color.secondary)); } else { initStatusBarColor(); @@ -43,9 +43,9 @@ class landingViewController @RequiresApi(api = Build.VERSION_CODES.M) private void initStatusBarColor() { - animatedColor oneToTwo = new animatedColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue), ContextCompat.getColor(mContext, R.color.landing_ease_blue)); - animatedColor twoToThree = new animatedColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue), ContextCompat.getColor(mContext, R.color.landing_ease_blue)); - animatedColor ThreeToFour = new animatedColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue), ContextCompat.getColor(mContext, R.color.landing_ease_blue)); + animatedColor oneToTwo = new animatedColor(ContextCompat.getColor(mContext, R.color.secondary), ContextCompat.getColor(mContext, R.color.secondary)); + animatedColor twoToThree = new animatedColor(ContextCompat.getColor(mContext, R.color.secondary), ContextCompat.getColor(mContext, R.color.secondary)); + animatedColor ThreeToFour = new animatedColor(ContextCompat.getColor(mContext, R.color.secondary), ContextCompat.getColor(mContext, R.color.secondary)); ValueAnimator animator = ObjectAnimator.ofFloat(0f, 1f).setDuration(0); animator.addUpdateListener(animation -> diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/languageManager/languageController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/languageManager/languageController.java index fb25df02..7a6c5d40 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/languageManager/languageController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/languageManager/languageController.java @@ -1,6 +1,5 @@ package com.darkweb.genesissearchengine.appManager.languageManager; - import android.os.Bundle; import android.view.View; import androidx.appcompat.app.AppCompatActivity; diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotLogManager/orbotLogController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotLogManager/orbotLogController.java index 6412c8b7..6ffbf227 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotLogManager/orbotLogController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotLogManager/orbotLogController.java @@ -2,7 +2,6 @@ package com.darkweb.genesissearchengine.appManager.orbotLogManager; import android.os.Bundle; import android.view.View; -import android.view.ViewTreeObserver; import android.view.animation.AnimationUtils; import android.view.animation.LayoutAnimationController; import android.widget.TextView; @@ -11,25 +10,17 @@ import androidx.core.widget.NestedScrollView; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.darkweb.genesissearchengine.appManager.activityContextManager; +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.enums; import com.darkweb.genesissearchengine.constants.status; import com.darkweb.genesissearchengine.helperManager.eventObserver; import com.darkweb.genesissearchengine.helperManager.helperMethod; import com.example.myapplication.R; import com.google.android.material.floatingactionbutton.FloatingActionButton; - import org.torproject.android.service.wrapper.orbotLocalConstants; import java.util.Collections; import java.util.List; -import java.util.Objects; - -import jp.wasabeef.recyclerview.animators.FadeInDownAnimator; -import jp.wasabeef.recyclerview.animators.FadeInRightAnimator; -import jp.wasabeef.recyclerview.animators.FadeInUpAnimator; - -import static android.widget.NumberPicker.OnScrollListener.SCROLL_STATE_IDLE; public class orbotLogController extends AppCompatActivity { @@ -156,6 +147,10 @@ public class orbotLogController extends AppCompatActivity { mMainScroll.smoothScrollTo(0,0); } + public void onOpenInfo(View view) { + helperMethod.openActivity(helpController.class, constants.CONST_LIST_HISTORY, this,true); + } + public class orbotModelCallback implements eventObserver.eventListener{ @Override public Object invokeObserver(List data, Object e_type) diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotLogManager/orbotLogViewController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotLogManager/orbotLogViewController.java index 875c45cc..0121a32a 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotLogManager/orbotLogViewController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotLogManager/orbotLogViewController.java @@ -1,24 +1,16 @@ package com.darkweb.genesissearchengine.appManager.orbotLogManager; -import android.annotation.SuppressLint; import android.os.Build; -import android.text.Spannable; -import android.text.TextUtils; import android.view.View; import android.view.Window; import android.view.WindowManager; -import android.widget.LinearLayout; import android.widget.TextView; - import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatDelegate; import androidx.core.content.ContextCompat; import androidx.recyclerview.widget.RecyclerView; - import com.darkweb.genesissearchengine.constants.status; -import com.darkweb.genesissearchengine.helperManager.helperMethod; import com.example.myapplication.R; -import com.google.android.material.switchmaterial.SwitchMaterial; import java.util.List; class orbotLogViewController diff --git a/app/src/main/java/com/darkweb/genesissearchengine/constants/constants.java b/app/src/main/java/com/darkweb/genesissearchengine/constants/constants.java index ae7672a1..d857c46b 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/constants/constants.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/constants/constants.java @@ -15,7 +15,7 @@ public class constants public static final String CONST_GENESIS_UPDATE_URL = "https://boogle.store/manual?abi="; public static final String CONST_PLAYSTORE_URL = "https://play.google.com/store/apps/details?id=com.darkweb.genesissearchengine"; - public static final String CONST_BACKEND_GENESIS_URL = "https://boogle.store/search?q=$sa&p_num=1&s_type=all"; + public static final String CONST_BACKEND_GENESIS_URL = "https://boogle.store/search?q=$s&p_num=1&s_type=all"; public static final String CONST_BACKEND_GOOGLE_URL = "https://www.google.com/search?q=$s"; public static final String CONST_BACKEND_DUCK_DUCK_GO_URL = "https://duckduckgo.com/q=$s"; public static final String CONST_BACKEND_BING_URL = "https://bing.com/search?q=$s"; diff --git a/app/src/main/java/com/darkweb/genesissearchengine/constants/status.java b/app/src/main/java/com/darkweb/genesissearchengine/constants/status.java index c89f5220..23eeb80c 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/constants/status.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/constants/status.java @@ -37,7 +37,7 @@ public class status public static boolean sStatusDoNotTrack = true; public static boolean sRestoreTabs = false; public static boolean sCharacterEncoding = false; - public static boolean sShowWebFonts = false; + public static boolean sShowWebFonts = true; public static boolean sAutoPlay = false; public static boolean sFullScreenBrowsing = false; public static boolean sOpenURLInNewTab = false; @@ -89,7 +89,7 @@ public class status status.sRestoreTabs = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_RESTORE_TAB,false)); status.sCharacterEncoding = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_CHARACTER_ENCODING,false)); status.sShowImages = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_SHOW_IMAGES,0)); - status.sShowWebFonts = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_SHOW_FONTS,false)); + status.sShowWebFonts = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_SHOW_FONTS,true)); status.sAutoPlay = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_AUTO_PLAY,false)); status.sFullScreenBrowsing = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FULL_SCREEN_BROWSIING,true)); status.sTheme = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_THEME,enums.Theme.THEME_DEFAULT)); diff --git a/app/src/main/java/com/darkweb/genesissearchengine/helperManager/helperMethod.java b/app/src/main/java/com/darkweb/genesissearchengine/helperManager/helperMethod.java index 1fe0cddc..7a2d3e9e 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/helperManager/helperMethod.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/helperManager/helperMethod.java @@ -98,13 +98,13 @@ public class helperMethod if (url.contains("https://")) { SpannableString ss = new SpannableString(url); - ss.setSpan(new ForegroundColorSpan(Color.argb(255, 0, 123, 43)), 0, 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); + ss.setSpan(new ForegroundColorSpan(Color.argb(255, 0, 153, 54)), 0, 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); ss.setSpan(new ForegroundColorSpan(Color.GRAY), 5, 8, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); return ss; } else if (url.contains("http://")) { SpannableString ss = new SpannableString(url); - ss.setSpan(new ForegroundColorSpan(Color.argb(255, 0, 128, 43)), 0, 4, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); + ss.setSpan(new ForegroundColorSpan(Color.argb(255, 0, 153, 54)), 0, 4, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); ss.setSpan(new ForegroundColorSpan(Color.GRAY), 4, 7, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); return ss; } else diff --git a/app/src/main/res/custom-xml/home/xml/hox_rounded_corner_container_bottom.xml b/app/src/main/res/custom-xml/home/xml/hox_rounded_corner_container_bottom.xml index 2a485e68..a0298500 100644 --- a/app/src/main/res/custom-xml/home/xml/hox_rounded_corner_container_bottom.xml +++ b/app/src/main/res/custom-xml/home/xml/hox_rounded_corner_container_bottom.xml @@ -1,13 +1,14 @@ - + + android:bottomLeftRadius="0dp" + android:bottomRightRadius="0dp"/> diff --git a/app/src/main/res/custom-xml/home/xml/hox_splash_gradient.xml b/app/src/main/res/custom-xml/home/xml/hox_splash_gradient.xml index eab94c04..f207f728 100644 --- a/app/src/main/res/custom-xml/home/xml/hox_splash_gradient.xml +++ b/app/src/main/res/custom-xml/home/xml/hox_splash_gradient.xml @@ -4,7 +4,7 @@ + android:gravity="center" + android:src="@mipmap/splashlogoclip"/> - + \ No newline at end of file diff --git a/app/src/main/res/custom-xml/home/xml/hx_border_left.xml b/app/src/main/res/custom-xml/home/xml/hx_border_left.xml new file mode 100644 index 00000000..a0464396 --- /dev/null +++ b/app/src/main/res/custom-xml/home/xml/hx_border_left.xml @@ -0,0 +1,13 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/custom-xml/home/xml/hx_border_left_right.xml b/app/src/main/res/custom-xml/home/xml/hx_border_left_right.xml new file mode 100644 index 00000000..24ed8780 --- /dev/null +++ b/app/src/main/res/custom-xml/home/xml/hx_border_left_right.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-hdpi/back.png b/app/src/main/res/drawable-hdpi/back.png new file mode 100644 index 00000000..8edffb3a Binary files /dev/null and b/app/src/main/res/drawable-hdpi/back.png differ diff --git a/app/src/main/res/drawable-hdpi/background.png b/app/src/main/res/drawable-hdpi/background.png new file mode 100644 index 00000000..94d2bde9 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/background.png differ diff --git a/app/src/main/res/drawable-hdpi/glide.png b/app/src/main/res/drawable-hdpi/glide.png new file mode 100644 index 00000000..b9af9dbf Binary files /dev/null and b/app/src/main/res/drawable-hdpi/glide.png differ diff --git a/app/src/main/res/drawable-hdpi/wall1.jpg b/app/src/main/res/drawable-hdpi/wall1.jpg new file mode 100644 index 00000000..38d32cb0 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/wall1.jpg differ diff --git a/app/src/main/res/drawable-hdpi/wall2.png b/app/src/main/res/drawable-hdpi/wall2.png new file mode 100644 index 00000000..0a9f31e2 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/wall2.png differ diff --git a/app/src/main/res/drawable-hdpi/wall3.jpg b/app/src/main/res/drawable-hdpi/wall3.jpg new file mode 100644 index 00000000..8bede749 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/wall3.jpg differ diff --git a/app/src/main/res/layouts/orbotLog/layout/orbot_log_view.xml b/app/src/main/res/layouts/orbotLog/layout/orbot_log_view.xml index 5a5c5046..cb4eafce 100644 --- a/app/src/main/res/layouts/orbotLog/layout/orbot_log_view.xml +++ b/app/src/main/res/layouts/orbotLog/layout/orbot_log_view.xml @@ -8,14 +8,17 @@ + app:layout_constraintTop_toTopOf="parent" + tools:ignore="RtlSymmetry"> + android:textStyle="bold" /> - + - + android:onClick="onOpenInfo" + android:padding="0dp" + android:paddingStart="3dp" + android:src="@drawable/info" + app:tint="@color/c_icon_tint_light" /> diff --git a/app/src/main/res/layouts/other/layout/home_view.xml b/app/src/main/res/layouts/other/layout/home_view.xml index f64d45d6..93ee1a4a 100644 --- a/app/src/main/res/layouts/other/layout/home_view.xml +++ b/app/src/main/res/layouts/other/layout/home_view.xml @@ -4,67 +4,75 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/c_background" + android:background="@color/c_background_keyboard" tools:context="com.darkweb.genesissearchengine.appManager.homeManager.homeController"> + android:layout_height="match_parent" + android:background="@color/c_background_keyboard" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> + android:background="@color/c_background_keyboard" + android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" + android:translationZ="10dp"> + app:layout_constraintTop_toTopOf="parent" + app:layout_scrollFlags="scroll|enterAlways|snap"> + tools:targetApi="o"> @@ -102,38 +110,38 @@ android:id="@+id/pVoiceInput" android:layout_width="36dp" android:layout_height="36dp" - android:scaleX="1.1" - android:scaleY="1.1" - android:onClick="onVoiceClick" + android:layout_gravity="center_vertical" + android:layout_marginStart="-60dp" android:layout_marginTop="-1dp" android:layout_marginEnd="15dp" - android:layout_marginStart="-60dp" - android:visibility="gone" + android:background="@color/clear_alpha" + android:contentDescription="@string/GENERAL_TODO" + android:onClick="onVoiceClick" + android:scaleX="1.1" + android:scaleY="1.1" android:src="@xml/ic_baseline_keyboard_voice" android:tint="@color/c_navigation_tint" - android:background="@color/clear_alpha" - android:layout_gravity="center_vertical" - android:contentDescription="@string/GENERAL_TODO" /> + android:visibility="gone" /> + android:onClick="onOpenTabViewBoundary">