diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkController.java index 491f78ea..7044f90e 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkController.java @@ -23,7 +23,6 @@ import androidx.recyclerview.widget.ItemTouchHelper; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.darkweb.genesissearchengine.appManager.activityContextManager; -import com.darkweb.genesissearchengine.appManager.historyManager.historyEnums; import com.darkweb.genesissearchengine.databaseManager.databaseController; import com.darkweb.genesissearchengine.appManager.homeManager.homeController.editTextManager; import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController; @@ -47,7 +46,6 @@ import java.util.List; import java.util.Objects; import static com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkEnums.eBookmarkViewCommands.M_VERTIFY_SELECTION_MENU; import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_CLEAR_BOOKMARK; -import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_CLEAR_HISTORY; public class bookmarkController extends AppCompatActivity @@ -88,9 +86,12 @@ public class bookmarkController extends AppCompatActivity public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); - activityContextManager.getInstance().onResetTheme(); - theme.getInstance().onConfigurationChanged(this); + if(newConfig.uiMode != getResources().getConfiguration().uiMode){ + activityContextManager.getInstance().onResetTheme(); + theme.getInstance().onConfigurationChanged(this); + } + } public void initializeListModel(){ diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bridgeManager/bridgeController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bridgeManager/bridgeController.java index 1ecf45a3..6b158831 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bridgeManager/bridgeController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bridgeManager/bridgeController.java @@ -62,9 +62,11 @@ public class bridgeController extends AppCompatActivity { @Override public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); - theme.getInstance().onConfigurationChanged(this); - activityContextManager.getInstance().onResetTheme(); - + if(newConfig.uiMode != getResources().getConfiguration().uiMode){ + activityContextManager.getInstance().onResetTheme(); + theme.getInstance().onConfigurationChanged(this); + } + super.onConfigurationChanged(newConfig); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/helpManager/helpController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/helpManager/helpController.java index 4d762ed9..d26c0dff 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/helpManager/helpController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/helpManager/helpController.java @@ -63,8 +63,10 @@ public class helpController extends AppCompatActivity { @Override public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); - theme.getInstance().onConfigurationChanged(this); - activityContextManager.getInstance().onResetTheme(); + if(newConfig.uiMode != getResources().getConfiguration().uiMode){ + activityContextManager.getInstance().onResetTheme(); + theme.getInstance().onConfigurationChanged(this); + } super.onConfigurationChanged(newConfig); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/historyManager/historyController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/historyManager/historyController.java index eefd8a91..bf2a5e63 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/historyManager/historyController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/historyManager/historyController.java @@ -88,9 +88,11 @@ public class historyController extends AppCompatActivity public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); - activityContextManager.getInstance().onResetTheme(); + if(newConfig.uiMode != getResources().getConfiguration().uiMode){ + activityContextManager.getInstance().onResetTheme(); + theme.getInstance().onConfigurationChanged(this); + } - theme.getInstance().onConfigurationChanged(this); } public void initializeListModel(){ diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeController.java index c4030f5c..a23aeb96 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeController.java @@ -138,6 +138,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba private Button mNewTab; private View mFindBar; private View mSearchEngineBar; + private ImageView mGenesisLogo; private EditText mFindText; private TextView mFindCount; private ImageButton mVoiceInput; @@ -439,13 +440,14 @@ public class homeController extends AppCompatActivity implements ComponentCallba mCoordinatorLayout = findViewById(R.id.pCoordinatorLayout); mImageDivider = findViewById(R.id.pImageDivider); mPanicButton = findViewById(R.id.pPanicButton); + mGenesisLogo = findViewById(R.id.pGenesisLogo); mGeckoView.setSaveEnabled(false); mGeckoView.setSaveFromParentEnabled(false); mGeckoView.setAutofillEnabled(true); mGeckoClient = new geckoClients(); - mHomeViewController.initialization(new homeViewCallback(),this,mNewTab, mWebViewContainer, mLoadingText, mProgressBar, mSearchbar, mSplashScreen, mLoadingIcon, mBannerAds, mGatewaySplash, mTopBar, mGeckoView, mBackSplash, mConnectButton, mFindBar, mFindText, mFindCount, mTopLayout, mVoiceInput, mMenu, mNestedScroll, mBlocker, mBlockerFullSceen, mSearchEngineBar, mCopyright, mHintListView, mAppBar, mOrbotLogManager, mInfoLandscape, mInfoPortrait, mProgressBarIndeterminate, mTabFragment, mTopBarContainer, mSearchLock, mPopupLoadNewTab, mTopBarHider, mNewTabBlocker, mCoordinatorLayout, mImageDivider, mPanicButton); + mHomeViewController.initialization(new homeViewCallback(),this,mNewTab, mWebViewContainer, mLoadingText, mProgressBar, mSearchbar, mSplashScreen, mLoadingIcon, mBannerAds, mGatewaySplash, mTopBar, mGeckoView, mBackSplash, mConnectButton, mFindBar, mFindText, mFindCount, mTopLayout, mVoiceInput, mMenu, mNestedScroll, mBlocker, mBlockerFullSceen, mSearchEngineBar, mCopyright, mHintListView, mAppBar, mOrbotLogManager, mInfoLandscape, mInfoPortrait, mProgressBarIndeterminate, mTabFragment, mTopBarContainer, mSearchLock, mPopupLoadNewTab, mTopBarHider, mNewTabBlocker, mCoordinatorLayout, mImageDivider, mPanicButton, mGenesisLogo); mGeckoView.onSetHomeEvent(new nestedGeckoViewCallback()); mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), this,false); mGeckoClient.onValidateInitializeFromStartup(mGeckoView, homeController.this); @@ -806,6 +808,19 @@ public class homeController extends AppCompatActivity implements ComponentCallba mGeckoView.setOnTouchListener((v, event) -> { mHomeViewController.onClearSelections(true); + if (event.getAction() == MotionEvent.ACTION_DOWN) + mGatewaySplash.setElevation(9); + else if (event.getAction() == MotionEvent.ACTION_UP){ + int[] location = new int[2]; + mTopLayout.getLocationOnScreen(location); + int y = location[1]; + if(y<=-12){ + mAppBar.setExpanded(false,true); + }else { + mAppBar.setExpanded(true,true); + } + } + return false; }); @@ -945,8 +960,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba mNestedScroll.setOnScrollChangeListener((NestedScrollView.OnScrollChangeListener) (v, scrollX, scrollY, oldScrollX, oldScrollY) -> { if(v.getChildAt(v.getChildCount() - 1) != null) { - if ((scrollY >= (v.getChildAt(v.getChildCount() - 1).getMeasuredHeight() - v.getMeasuredHeight())) && - scrollY > oldScrollY) { + if ((scrollY >= (v.getChildAt(v.getChildCount() - 1).getMeasuredHeight() - v.getMeasuredHeight())) && scrollY > oldScrollY) { } } }); @@ -1646,9 +1660,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba } else if (menuId == R.id.pMenuOpenRecentTab) { - activityContextManager.getInstance().getTabController().onInit(); - mHomeViewController.onShowTabContainer(); - // overridePendingTransition(R.anim.popup_anim_in, R.anim.popup_anim_out); + onOpenTabViewBoundary(null); + mNewTab.setPressed(true); } else if (menuId == R.id.pMenuOpenNewTab) { @@ -1659,6 +1672,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba { pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_NEW_CIRCUIT); pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(this), M_NEW_IDENTITY); + mGeckoClient.onReload(mGeckoView, this); } else if (menuId == R.id.pMenuOpenCurrentTab) { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeViewController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeViewController.java index f3522efc..fd16be42 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeViewController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeViewController.java @@ -107,6 +107,7 @@ class homeViewController private CoordinatorLayout mCoordinatorLayout; private ImageView mImageDivider; private ImageButton mPanicButton; + private ImageView mGenesisLogo; /*Local Variables*/ private Callable mLogs = null; @@ -116,7 +117,7 @@ class homeViewController private Handler mTabDialogHandler = null; private Runnable mTabDialogRunnable = null; - void initialization(eventObserver.eventListener event, AppCompatActivity context, Button mNewTab, ConstraintLayout webviewContainer, TextView loadingText, AnimatedProgressBar progressBar, editTextManager searchbar, ConstraintLayout splashScreen, ImageView loading, AdView banner_ads, ImageButton gateway_splash, LinearLayout top_bar, GeckoView gecko_view, ImageView backsplash, Button connect_button, View pFindBar, EditText pFindText, TextView pFindCount, androidx.constraintlayout.widget.ConstraintLayout pTopLayout, ImageButton pVoiceInput, ImageButton pMenu, androidx.core.widget.NestedScrollView pNestedScroll, ImageView pBlocker, ImageView pBlockerFullSceen, View mSearchEngineBar, TextView pCopyright, RecyclerView pHistListView, com.google.android.material.appbar.AppBarLayout pAppBar, ImageButton pOrbotLogManager, ConstraintLayout pInfoLandscape, ConstraintLayout pInfoPortrait, ProgressBar pProgressBarIndeterminate, FragmentContainerView pTabFragment, LinearLayout pTopBarContainer, ImageView pSearchLock, View pPopupLoadNewTab, ImageView pTopBarHider, ImageView pNewTabBlocker, CoordinatorLayout mCoordinatorLayout, ImageView pImageDivider, ImageButton pPanicButton){ + void initialization(eventObserver.eventListener event, AppCompatActivity context, Button mNewTab, ConstraintLayout webviewContainer, TextView loadingText, AnimatedProgressBar progressBar, editTextManager searchbar, ConstraintLayout splashScreen, ImageView loading, AdView banner_ads, ImageButton gateway_splash, LinearLayout top_bar, GeckoView gecko_view, ImageView backsplash, Button connect_button, View pFindBar, EditText pFindText, TextView pFindCount, androidx.constraintlayout.widget.ConstraintLayout pTopLayout, ImageButton pVoiceInput, ImageButton pMenu, androidx.core.widget.NestedScrollView pNestedScroll, ImageView pBlocker, ImageView pBlockerFullSceen, View mSearchEngineBar, TextView pCopyright, RecyclerView pHistListView, com.google.android.material.appbar.AppBarLayout pAppBar, ImageButton pOrbotLogManager, ConstraintLayout pInfoLandscape, ConstraintLayout pInfoPortrait, ProgressBar pProgressBarIndeterminate, FragmentContainerView pTabFragment, LinearLayout pTopBarContainer, ImageView pSearchLock, View pPopupLoadNewTab, ImageView pTopBarHider, ImageView pNewTabBlocker, CoordinatorLayout mCoordinatorLayout, ImageView pImageDivider, ImageButton pPanicButton, ImageView pGenesisLogo){ this.mContext = context; this.mProgressBar = progressBar; this.mSearchbar = searchbar; @@ -156,6 +157,7 @@ class homeViewController this.mCoordinatorLayout = mCoordinatorLayout; this.mImageDivider = pImageDivider; this.mPanicButton = pPanicButton; + this.mGenesisLogo = pGenesisLogo; initSplashScreen(); createUpdateUiHandler(); @@ -164,6 +166,7 @@ class homeViewController initializeViews(); } + @SuppressLint("WrongConstant") public void initializeViews(){ mSearchbar.setTag(R.id.msearchbarProcessing,false); mNestedScroll.setNestedScrollingEnabled(true); @@ -194,6 +197,21 @@ class homeViewController onClearSelections(false); mGeckoView.requestFocus(); + + + mContext.runOnUiThread(() -> { + if(helperMethod.getScreenHeight(mContext)<1000){ + + ConstraintLayout.LayoutParams newLayoutParams1 = (ConstraintLayout.LayoutParams) mImageDivider.getLayoutParams(); + newLayoutParams1.bottomMargin = helperMethod.pxFromDp(200); + mImageDivider.setLayoutParams(newLayoutParams1); + + + ConstraintLayout.LayoutParams newLayoutParams = (ConstraintLayout.LayoutParams) mGenesisLogo.getLayoutParams(); + newLayoutParams.topMargin = helperMethod.pxFromDp(80); + mGenesisLogo.setLayoutParams(newLayoutParams); + } + }); } @SuppressLint("WrongConstant") 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 6c583bf1..41cb03b7 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 @@ -67,9 +67,10 @@ public class languageController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); - activityContextManager.getInstance().onResetTheme(); - - theme.getInstance().onConfigurationChanged(this); + if(newConfig.uiMode != getResources().getConfiguration().uiMode){ + activityContextManager.getInstance().onResetTheme(); + theme.getInstance().onConfigurationChanged(this); + } } private void initializeAppModel() 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 87f41b1d..b187b907 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 @@ -67,8 +67,10 @@ public class orbotLogController extends AppCompatActivity { @Override public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); - theme.getInstance().onConfigurationChanged(this); - activityContextManager.getInstance().onResetTheme(); + if(newConfig.uiMode != getResources().getConfiguration().uiMode){ + activityContextManager.getInstance().onResetTheme(); + theme.getInstance().onConfigurationChanged(this); + } super.onConfigurationChanged(newConfig); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotManager/orbotController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotManager/orbotController.java index f51c92ce..ef145d7a 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotManager/orbotController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotManager/orbotController.java @@ -64,8 +64,11 @@ public class orbotController extends AppCompatActivity { @Override public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); - theme.getInstance().onConfigurationChanged(this); - activityContextManager.getInstance().onResetTheme(); + + if(newConfig.uiMode != getResources().getConfiguration().uiMode){ + activityContextManager.getInstance().onResetTheme(); + theme.getInstance().onConfigurationChanged(this); + } super.onConfigurationChanged(newConfig); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/proxyStatusManager/proxyStatusController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/proxyStatusManager/proxyStatusController.java index 5354c221..aa4da007 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/proxyStatusManager/proxyStatusController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/proxyStatusManager/proxyStatusController.java @@ -50,9 +50,10 @@ public class proxyStatusController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); - activityContextManager.getInstance().onResetTheme(); - - theme.getInstance().onConfigurationChanged(this); + if(newConfig.uiMode != getResources().getConfiguration().uiMode){ + activityContextManager.getInstance().onResetTheme(); + theme.getInstance().onConfigurationChanged(this); + } } public void viewsInitializations() { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/accessibilityManager/settingAccessibilityController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/accessibilityManager/settingAccessibilityController.java index 97df1f95..8e624cf9 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/accessibilityManager/settingAccessibilityController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/accessibilityManager/settingAccessibilityController.java @@ -60,9 +60,10 @@ public class settingAccessibilityController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); - activityContextManager.getInstance().onResetTheme(); - - theme.getInstance().onConfigurationChanged(this); + if(newConfig.uiMode != getResources().getConfiguration().uiMode){ + activityContextManager.getInstance().onResetTheme(); + theme.getInstance().onConfigurationChanged(this); + } } private void viewsInitializations() { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/advanceManager/settingAdvanceController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/advanceManager/settingAdvanceController.java index f166a9c6..a809b44d 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/advanceManager/settingAdvanceController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/advanceManager/settingAdvanceController.java @@ -56,9 +56,11 @@ public class settingAdvanceController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); - activityContextManager.getInstance().onResetTheme(); + if(newConfig.uiMode != getResources().getConfiguration().uiMode){ + activityContextManager.getInstance().onResetTheme(); + theme.getInstance().onConfigurationChanged(this); + } - theme.getInstance().onConfigurationChanged(this); } public void viewsInitializations() { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/clearManager/settingClearController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/clearManager/settingClearController.java index 5a8e5de4..d84e6165 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/clearManager/settingClearController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/clearManager/settingClearController.java @@ -57,9 +57,11 @@ public class settingClearController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); - activityContextManager.getInstance().onResetTheme(); + if(newConfig.uiMode != getResources().getConfiguration().uiMode){ + activityContextManager.getInstance().onResetTheme(); + theme.getInstance().onConfigurationChanged(this); + } - theme.getInstance().onConfigurationChanged(this); } public void viewsInitializations() { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/generalManager/settingGeneralController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/generalManager/settingGeneralController.java index e5ff41fc..0804b333 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/generalManager/settingGeneralController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/generalManager/settingGeneralController.java @@ -64,10 +64,12 @@ public class settingGeneralController extends AppCompatActivity { super.onConfigurationChanged(newConfig); if(!mIsThemeChanging){ - //activityContextManager.getInstance().onResetTheme(); + if(newConfig.uiMode != getResources().getConfiguration().uiMode){ + activityContextManager.getInstance().onResetTheme(); + theme.getInstance().onConfigurationChanged(this); + } } - theme.getInstance().onConfigurationChanged(this); } private void viewsInitializations() { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/logManager/settingLogController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/logManager/settingLogController.java index 493550e9..9a41608f 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/logManager/settingLogController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/logManager/settingLogController.java @@ -47,9 +47,11 @@ public class settingLogController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); - activityContextManager.getInstance().onResetTheme(); + if(newConfig.uiMode != getResources().getConfiguration().uiMode){ + activityContextManager.getInstance().onResetTheme(); + theme.getInstance().onConfigurationChanged(this); + } - theme.getInstance().onConfigurationChanged(this); } private void viewsInitializations() { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/notificationManager/settingNotificationController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/notificationManager/settingNotificationController.java index f87a535f..a37deb8f 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/notificationManager/settingNotificationController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/notificationManager/settingNotificationController.java @@ -46,9 +46,11 @@ public class settingNotificationController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); - activityContextManager.getInstance().onResetTheme(); + if(newConfig.uiMode != getResources().getConfiguration().uiMode){ + activityContextManager.getInstance().onResetTheme(); + theme.getInstance().onConfigurationChanged(this); + } - theme.getInstance().onConfigurationChanged(this); } private void viewsInitializations() { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/privacyManager/settingPrivacyController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/privacyManager/settingPrivacyController.java index d1b71fac..6cae3c96 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/privacyManager/settingPrivacyController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/privacyManager/settingPrivacyController.java @@ -53,9 +53,11 @@ public class settingPrivacyController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); - activityContextManager.getInstance().onResetTheme(); + if(newConfig.uiMode != getResources().getConfiguration().uiMode){ + activityContextManager.getInstance().onResetTheme(); + theme.getInstance().onConfigurationChanged(this); + } - theme.getInstance().onConfigurationChanged(this); } private void viewsInitializations() { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/searchEngineManager/settingSearchController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/searchEngineManager/settingSearchController.java index 4790e6b1..84a6d372 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/searchEngineManager/settingSearchController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/searchEngineManager/settingSearchController.java @@ -48,9 +48,11 @@ public class settingSearchController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); - activityContextManager.getInstance().onResetTheme(); + if(newConfig.uiMode != getResources().getConfiguration().uiMode){ + activityContextManager.getInstance().onResetTheme(); + theme.getInstance().onConfigurationChanged(this); + } - theme.getInstance().onConfigurationChanged(this); } private void viewsInitializations() { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/settingHomePage/settingHomeController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/settingHomePage/settingHomeController.java index e708d860..adb626b0 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/settingHomePage/settingHomeController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/settingHomePage/settingHomeController.java @@ -68,10 +68,12 @@ public class settingHomeController extends AppCompatActivity @Override public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); - super.onConfigurationChanged(newConfig); - activityContextManager.getInstance().onResetTheme(); + if(newConfig.uiMode != getResources().getConfiguration().uiMode){ + activityContextManager.getInstance().onResetTheme(); + theme.getInstance().onConfigurationChanged(this); + } - theme.getInstance().onConfigurationChanged(this); + super.onConfigurationChanged(newConfig); } private void viewsInitializations() diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/trackingManager/settingTrackingController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/trackingManager/settingTrackingController.java index 7e38ca0f..125592b1 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/trackingManager/settingTrackingController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/trackingManager/settingTrackingController.java @@ -51,9 +51,11 @@ public class settingTrackingController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); - activityContextManager.getInstance().onResetTheme(); + if(newConfig.uiMode != getResources().getConfiguration().uiMode){ + activityContextManager.getInstance().onResetTheme(); + theme.getInstance().onConfigurationChanged(this); + } - theme.getInstance().onConfigurationChanged(this); } private void viewsInitializations() { diff --git a/app/src/main/res/custom-xml/alert/xml/ax_ripple_default_round.xml b/app/src/main/res/custom-xml/alert/xml/ax_ripple_default_round.xml new file mode 100644 index 00000000..111ed5e4 --- /dev/null +++ b/app/src/main/res/custom-xml/alert/xml/ax_ripple_default_round.xml @@ -0,0 +1,13 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/custom-xml/alert/xml/ax_ripple_default_round_right.xml b/app/src/main/res/custom-xml/alert/xml/ax_ripple_default_round_right.xml index 111ed5e4..e399ab35 100644 --- a/app/src/main/res/custom-xml/alert/xml/ax_ripple_default_round_right.xml +++ b/app/src/main/res/custom-xml/alert/xml/ax_ripple_default_round_right.xml @@ -4,10 +4,10 @@ + android:topLeftRadius="0dp" + android:topRightRadius="0dp"/> \ No newline at end of file diff --git a/app/src/main/res/layouts/alert/layout/popup_block_popup.xml b/app/src/main/res/layouts/alert/layout/popup_block_popup.xml index 40effb9f..ab8e8af5 100644 --- a/app/src/main/res/layouts/alert/layout/popup_block_popup.xml +++ b/app/src/main/res/layouts/alert/layout/popup_block_popup.xml @@ -22,7 +22,7 @@ android:id="@+id/pDescription" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="10dp" + android:layout_marginStart="15dp" android:alpha="0.8" android:paddingStart="15dp" android:paddingEnd="15dp" @@ -40,14 +40,14 @@ android:id="@+id/pOpenPrivacy" android:layout_width="wrap_content" android:layout_height="match_parent" - android:paddingStart="10dp" - android:paddingEnd="10dp" android:layout_marginTop="10dp" - android:layout_marginEnd="20dp" + android:layout_marginEnd="15dp" android:layout_marginBottom="10dp" android:layout_weight="1" - android:background="@xml/ax_ripple_default_round_right" + android:background="@xml/ax_ripple_default_round" android:padding="0dp" + android:paddingStart="10dp" + android:paddingEnd="10dp" android:text="@string/HOME_MENU_SETTING" android:textAllCaps="false" android:textColor="@color/c_button_text_v1_inverted" @@ -61,7 +61,7 @@ android:id="@+id/view6" android:layout_width="1dp" android:layout_height="30dp" - android:layout_marginEnd="18dp" + android:layout_marginEnd="15dp" android:background="@color/c_border_background_divider" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@+id/pOpenPrivacy" diff --git a/app/src/main/res/layouts/alert/layout/popup_load_new_tab.xml b/app/src/main/res/layouts/alert/layout/popup_load_new_tab.xml index 3bda52c4..a31f8067 100644 --- a/app/src/main/res/layouts/alert/layout/popup_load_new_tab.xml +++ b/app/src/main/res/layouts/alert/layout/popup_load_new_tab.xml @@ -43,10 +43,10 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_marginTop="10dp" - android:layout_marginEnd="10dp" + android:layout_marginEnd="15dp" android:layout_marginBottom="10dp" android:layout_weight="1" - android:background="@xml/ax_ripple_default_round_right" + android:background="@xml/ax_ripple_default_round" android:onClick="onLoadRecentTab" android:padding="0dp" android:text="@string/ALERT_OPEN_NEW_TAB_LOAD" @@ -77,7 +77,7 @@ android:id="@+id/view4" android:layout_width="1dp" android:layout_height="30dp" - android:layout_marginEnd="20dp" + android:layout_marginEnd="15dp" android:background="#3973ac" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@+id/pDismiss" diff --git a/app/src/main/res/layouts/alert/layout/popup_max_tab.xml b/app/src/main/res/layouts/alert/layout/popup_max_tab.xml index b836f0f8..fc724e38 100644 --- a/app/src/main/res/layouts/alert/layout/popup_max_tab.xml +++ b/app/src/main/res/layouts/alert/layout/popup_max_tab.xml @@ -40,14 +40,14 @@ android:id="@+id/pDismiss" android:layout_width="wrap_content" android:layout_height="match_parent" - android:paddingStart="10dp" - android:paddingEnd="10dp" android:layout_marginTop="10dp" - android:layout_marginEnd="20dp" + android:layout_marginEnd="15dp" android:layout_marginBottom="10dp" android:layout_weight="1" - android:background="@xml/ax_ripple_default_round_right" + android:background="@xml/ax_ripple_default_round" android:padding="0dp" + android:paddingStart="10dp" + android:paddingEnd="10dp" android:text="@string/ALERT_DISMISS" android:textAllCaps="false" android:textColor="@color/c_button_text_v1_inverted" @@ -61,10 +61,10 @@ android:id="@+id/view6" android:layout_width="1dp" android:layout_height="30dp" - android:layout_marginEnd="18dp" + android:layout_marginEnd="15dp" android:background="@color/c_border_background_divider" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toStartOf="@+id/pOpenPrivacy" + app:layout_constraintEnd_toStartOf="@+id/pDismiss" app:layout_constraintTop_toTopOf="parent" /> diff --git a/app/src/main/res/layouts/alert/layout/popup_new_circuit.xml b/app/src/main/res/layouts/alert/layout/popup_new_circuit.xml index 9fd8443d..586f353b 100644 --- a/app/src/main/res/layouts/alert/layout/popup_new_circuit.xml +++ b/app/src/main/res/layouts/alert/layout/popup_new_circuit.xml @@ -41,10 +41,10 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_marginTop="10dp" - android:layout_marginEnd="10dp" + android:layout_marginEnd="15dp" android:layout_marginBottom="10dp" android:layout_weight="1" - android:background="@xml/ax_ripple_default_round_right" + android:background="@xml/ax_ripple_default_round" android:padding="0dp" android:text="@string/ALERT_DISMISS" android:textAllCaps="false" @@ -59,7 +59,7 @@ android:id="@+id/view6" android:layout_width="1dp" android:layout_height="30dp" - android:layout_marginEnd="20dp" + android:layout_marginEnd="15dp" android:background="@color/c_border_background_divider" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@+id/pDismiss" diff --git a/app/src/main/res/layouts/alert/layout/popup_undo.xml b/app/src/main/res/layouts/alert/layout/popup_undo.xml index 7bd88db7..e76b6d15 100644 --- a/app/src/main/res/layouts/alert/layout/popup_undo.xml +++ b/app/src/main/res/layouts/alert/layout/popup_undo.xml @@ -43,10 +43,10 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_marginTop="10dp" - android:layout_marginEnd="10dp" + android:layout_marginEnd="15dp" android:layout_marginBottom="10dp" android:layout_weight="1" - android:background="@xml/ax_ripple_default_round_right" + android:background="@xml/ax_ripple_default_round" android:onClick="onRestoreTab" android:padding="0dp" android:text="@string/ALERT_UNDO_TAB_REMOVE_BUTTON" @@ -77,7 +77,7 @@ android:id="@+id/view6" android:layout_width="1dp" android:layout_height="30dp" - android:layout_marginEnd="20dp" + android:layout_marginEnd="15dp" android:background="@color/c_border_background_divider" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@+id/pDismiss" diff --git a/app/src/main/res/layouts/home/layout/home_view.xml b/app/src/main/res/layouts/home/layout/home_view.xml index ee85a0c7..8b168843 100644 --- a/app/src/main/res/layouts/home/layout/home_view.xml +++ b/app/src/main/res/layouts/home/layout/home_view.xml @@ -24,8 +24,17 @@ android:layout_height="wrap_content" android:background="@color/c_background" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" + android:fitsSystemWindows="true" android:translationZ="3dp"> + + + app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"> + @@ -434,7 +444,7 @@ android:layout_height="40dp" android:layout_marginTop="20dp" android:adjustViewBounds="true" - android:alpha="1" + android:alpha="0.95" android:background="@xml/hox_rounded_corner_splash_right" android:contentDescription="@string/GENERAL_TODO" android:onClick="panicExit" @@ -815,7 +825,6 @@ layout="@layout/popup_load_new_tab" android:alpha="0" android:translationZ="0dp" - android:visibility="gone" /> diff --git a/app/src/main/res/layouts/proxyStatus/layout/proxy_status_view.xml b/app/src/main/res/layouts/proxyStatus/layout/proxy_status_view.xml index 8826d320..14e24b0a 100644 --- a/app/src/main/res/layouts/proxyStatus/layout/proxy_status_view.xml +++ b/app/src/main/res/layouts/proxyStatus/layout/proxy_status_view.xml @@ -11,7 +11,7 @@ diff --git a/app/src/main/res/layouts/setting/layout/setting_accessibility_view.xml b/app/src/main/res/layouts/setting/layout/setting_accessibility_view.xml index 82a3f566..935385f8 100644 --- a/app/src/main/res/layouts/setting/layout/setting_accessibility_view.xml +++ b/app/src/main/res/layouts/setting/layout/setting_accessibility_view.xml @@ -12,6 +12,7 @@ diff --git a/app/src/main/res/layouts/setting/layout/setting_advance_view.xml b/app/src/main/res/layouts/setting/layout/setting_advance_view.xml index feaac809..973698f9 100644 --- a/app/src/main/res/layouts/setting/layout/setting_advance_view.xml +++ b/app/src/main/res/layouts/setting/layout/setting_advance_view.xml @@ -12,6 +12,7 @@ diff --git a/app/src/main/res/layouts/setting/layout/setting_clear_view.xml b/app/src/main/res/layouts/setting/layout/setting_clear_view.xml index d5a5bb90..f53c8410 100644 --- a/app/src/main/res/layouts/setting/layout/setting_clear_view.xml +++ b/app/src/main/res/layouts/setting/layout/setting_clear_view.xml @@ -11,6 +11,7 @@ android:layout_height="match_parent"> diff --git a/app/src/main/res/layouts/setting/layout/setting_general_view.xml b/app/src/main/res/layouts/setting/layout/setting_general_view.xml index abe0a23e..5201a4d9 100644 --- a/app/src/main/res/layouts/setting/layout/setting_general_view.xml +++ b/app/src/main/res/layouts/setting/layout/setting_general_view.xml @@ -10,6 +10,7 @@ android:layout_height="match_parent"> diff --git a/app/src/main/res/layouts/setting/layout/setting_notification_view.xml b/app/src/main/res/layouts/setting/layout/setting_notification_view.xml index 213fe7a7..0485f763 100644 --- a/app/src/main/res/layouts/setting/layout/setting_notification_view.xml +++ b/app/src/main/res/layouts/setting/layout/setting_notification_view.xml @@ -10,6 +10,7 @@ android:layout_height="match_parent"> diff --git a/app/src/main/res/layouts/setting/layout/setting_privacy_view.xml b/app/src/main/res/layouts/setting/layout/setting_privacy_view.xml index 54bf4a50..c35480bf 100644 --- a/app/src/main/res/layouts/setting/layout/setting_privacy_view.xml +++ b/app/src/main/res/layouts/setting/layout/setting_privacy_view.xml @@ -12,7 +12,7 @@ diff --git a/app/src/main/res/layouts/setting/layout/setting_search_view.xml b/app/src/main/res/layouts/setting/layout/setting_search_view.xml index 1effc0eb..a0edf97e 100644 --- a/app/src/main/res/layouts/setting/layout/setting_search_view.xml +++ b/app/src/main/res/layouts/setting/layout/setting_search_view.xml @@ -10,6 +10,7 @@ android:layout_height="match_parent"> diff --git a/app/src/main/res/layouts/setting/layout/setting_tracking_view.xml b/app/src/main/res/layouts/setting/layout/setting_tracking_view.xml index 6b700532..584b803c 100644 --- a/app/src/main/res/layouts/setting/layout/setting_tracking_view.xml +++ b/app/src/main/res/layouts/setting/layout/setting_tracking_view.xml @@ -10,6 +10,7 @@ android:layout_height="match_parent">