diff --git a/app/src/main/assets/Help/help.html b/app/src/main/assets/Help/help.html index 4d67ce6f..a049bec4 100644 --- a/app/src/main/assets/Help/help.html +++ b/app/src/main/assets/Help/help.html @@ -29,46 +29,123 @@
-

Note | The following help manual is loaded from local cache. Connect to proxy for viewing latest help repository

+

The following help manual is loaded from local cache. Connect to proxy for viewing latest help repository

-
-
- - Issue 1: Connection Problem +
+ -
-
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +
+
+
  • Checking the network cables and router
  • +
  • Reconnect to Wi-Fi
  • +
  • Restart phone or application
  • -
    -
    -
    - + +
    + +
    +
    + To see connection status with Tor network GOTO +

    Menu Icon (Top-Right) Settings Onion Proxy Status +
    +
    +
    + + +
    +
    - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. + You can view Tor logs to debug an issue. To do this GOTO +

    Menu Icon (Top-Right) Orbot Logs
    -
    -
    -
    -
    - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. + This happens when we are unable to fetch help manual due to internet connection issue. It can also happen when ISP blocks some of our servers.
    + +
    + +
    +
    + Some times ISP blocks Tor network routing. This issue can be solved by enabling Tor Bridges. To do this GOTO +

    Connection Screen Gear Icon Enable Bridges +
    +
    +
    + +
    + +
    +
    + Tor routing can be blocked in China even when you are using default bridges. This issue can be solved by connecting with Meek bridges. To do this GOTO +

    Connection Screen Gear Icon Enable Bridges Customize bridges Meek-azure (China) +
    +
    +
    + +
    + +
    +
    + You can also provide custom bridges in Genesis. To do this GOTO +

    Connection Screen Gear Icon Enable Bridges Customize bridges Paste custom bridge paste your bridge string +
    +
    +
    + + +
    + +
    +
    + Genesis also provides a vpn from which you can secure data of other applications. To do this GOTO +

    Connection Screen Gear Icon Enable VPN Service +
    +
    +
    + +
    diff --git a/app/src/main/assets/Help/style/cs-help.css b/app/src/main/assets/Help/style/cs-help.css index 5e5ee9c2..c39f6300 100644 --- a/app/src/main/assets/Help/style/cs-help.css +++ b/app/src/main/assets/Help/style/cs-help.css @@ -11,7 +11,46 @@ .hi_info{ margin-top: 30px; - padding-left:3%; + padding-left:15px; + padding-bottom: 12px; + padding-top: 10px; margin-bottom: 30px; + height: auto; border-left: 5px solid #ff9933; } + +.hi_bullets{ + margin-left: 20px; + line-height: 30px; +} + +.hi_card{ +cursor: pointer; +} + +.hi_card_link{ + color: #6699cc; + font-size: 15px; +} + +.hi_issue--color{ + color: #336699; +} + +.hi_arrow--color{ + color: #4080bf; +} + +.hi_card--margin-top{ + margin-top: 2%; +} + +.hi_no_select { + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Safari */ + -khtml-user-select: none; /* Konqueror HTML */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; /* Non-prefixed version, currently + supported by Chrome and Opera */ +} \ No newline at end of file diff --git a/app/src/main/ic_launcher-playstore.png b/app/src/main/ic_launcher-playstore.png index 3faa0f78..6876fb49 100644 Binary files a/app/src/main/ic_launcher-playstore.png and b/app/src/main/ic_launcher-playstore.png differ 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 08bf41e7..c9cb58d7 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 @@ -27,6 +27,8 @@ import java.util.Collections; import java.util.List; import java.util.Objects; +import static com.darkweb.genesissearchengine.appManager.helpManager.helpEnums.eHelpModel.M_IS_LOADED; + public class helpController extends AppCompatActivity { /*Initializations*/ @@ -49,8 +51,8 @@ public class helpController extends AppCompatActivity { super.onCreate(savedInstanceState); setContentView(R.layout.help_view); - initializeAppModel(); initializeViews(); + initializeAppModel(); initializeLocalEventHandlers(); } @@ -58,6 +60,9 @@ public class helpController extends AppCompatActivity { { mHelpModel = new helpModel(this, new helpAdapterCallback()); mHelpModel.onTrigger(helpEnums.eHelpModel.M_LOAD_HELP_DATA,null); + if((boolean)mHelpModel.onTrigger(M_IS_LOADED,null)){ + mProgressBar.setVisibility(View.GONE); + } } private void initializeViews(){ diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/helpManager/helpEnums.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/helpManager/helpEnums.java index 94f7f83c..b520d2e8 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/helpManager/helpEnums.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/helpManager/helpEnums.java @@ -4,7 +4,7 @@ class helpEnums { /*History Manager*/ public enum eHelpModel { - M_LOAD_HELP_DATA + M_LOAD_HELP_DATA, M_IS_LOADED } public enum eHelpModelCallback { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/helpManager/helpModel.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/helpManager/helpModel.java index 441dc3c3..28f7f8d8 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/helpManager/helpModel.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/helpManager/helpModel.java @@ -5,6 +5,8 @@ import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.toolbox.StringRequest; import com.android.volley.toolbox.Volley; +import com.darkweb.genesissearchengine.dataManager.dataController; +import com.darkweb.genesissearchengine.dataManager.dataEnums; import com.darkweb.genesissearchengine.helperManager.eventObserver; import org.json.JSONArray; import org.json.JSONException; @@ -20,6 +22,7 @@ class helpModel private String mJsonPath = CONST_SERVER; private AppCompatActivity mContext; private ArrayList mHelpListModel; + private boolean mIsLoaded = false; public helpModel(AppCompatActivity pContext, eventObserver.eventListener pEvent){ this.mContext = pContext; @@ -28,39 +31,56 @@ class helpModel } private void getHelpJSON(){ + + ArrayList mTempModel = (ArrayList)dataController.getInstance().invokeHelp(dataEnums.eHelpCommands.M_GET_HELP, null); + mHelpListModel.clear(); - StringRequest stringRequest = new StringRequest(Request.Method.GET, mJsonPath, - response -> { - try { - JSONArray jsonArray = new JSONArray(response); + if(mTempModel.size()>0){ + mIsLoaded = true; + mHelpListModel.addAll(mTempModel); + mEvent.invokeObserver(Collections.singletonList(mHelpListModel),helpEnums.eHelpModelCallback.M_LOAD_JSON_RESPONSE_SUCCESS); + }else { + StringRequest stringRequest = new StringRequest(Request.Method.GET, mJsonPath, + response -> { + try { + JSONArray jsonArray = new JSONArray(response); - for (int i = 0; i < jsonArray.length(); i++) { - JSONObject obj = jsonArray.getJSONObject(i); + for (int i = 0; i < jsonArray.length(); i++) { + JSONObject obj = jsonArray.getJSONObject(i); - helpDataModel hero = new helpDataModel( - obj.getString(CONST_HELP_MODEL_HEADER), - obj.getString(CONST_HELP_MODEL_DESCRIPTION), - obj.getString(CONST_HELP_MODEL_ICON)); - mHelpListModel.add(hero); + helpDataModel hero = new helpDataModel( + obj.getString(CONST_HELP_MODEL_HEADER), + obj.getString(CONST_HELP_MODEL_DESCRIPTION), + obj.getString(CONST_HELP_MODEL_ICON)); + mHelpListModel.add(hero); + dataController.getInstance().invokeHelp(dataEnums.eHelpCommands.M_SET_HELP, Collections.singletonList(mHelpListModel)); + } + mEvent.invokeObserver(Collections.singletonList(mHelpListModel),helpEnums.eHelpModelCallback.M_LOAD_JSON_RESPONSE_SUCCESS); + } catch (JSONException e) { + mEvent.invokeObserver(Collections.singletonList(mHelpListModel),helpEnums.eHelpModelCallback.M_LOAD_JSON_RESPONSE_FAILURE); + e.printStackTrace(); } - mEvent.invokeObserver(Collections.singletonList(mHelpListModel),helpEnums.eHelpModelCallback.M_LOAD_JSON_RESPONSE_SUCCESS); - } catch (JSONException e) { + }, + error -> { mEvent.invokeObserver(Collections.singletonList(mHelpListModel),helpEnums.eHelpModelCallback.M_LOAD_JSON_RESPONSE_FAILURE); - e.printStackTrace(); - } - }, - error -> { - mEvent.invokeObserver(Collections.singletonList(mHelpListModel),helpEnums.eHelpModelCallback.M_LOAD_JSON_RESPONSE_FAILURE); - }); + }); - RequestQueue requestQueue = Volley.newRequestQueue(mContext/*, new ProxiedHurlStack()*/); - requestQueue.add(stringRequest); + RequestQueue requestQueue = Volley.newRequestQueue(mContext/*, new ProxiedHurlStack()*/); + requestQueue.add(stringRequest); + } + } + + private boolean IsLoaded(){ + return mIsLoaded; } public Object onTrigger(helpEnums.eHelpModel pCommands, List pData){ if(pCommands.equals(helpEnums.eHelpModel.M_LOAD_HELP_DATA)){ getHelpJSON(); } + else if(pCommands.equals(helpEnums.eHelpModel.M_IS_LOADED)){ + return IsLoaded(); + } return null; } } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoSession.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoSession.java index 309cd0ed..af6957d4 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoSession.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoSession.java @@ -242,7 +242,6 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, mTheme), enums.etype.ON_UPDATE_THEME); event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, m_current_url_id, mTheme), enums.etype.on_update_favicon); event.invokeObserver(Arrays.asList(null,mSessionID), enums.etype.on_page_loaded); - onRedrawPixel(); } } } @@ -324,6 +323,7 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele return GeckoResult.fromValue(AllowOrDeny.DENY); } else if(var1.uri.equals("about:blank") && mIsLoaded){ + event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, mTheme), enums.etype.ON_EXPAND_TOP_BAR); return GeckoResult.fromValue(AllowOrDeny.ALLOW); } else if(var1.target==2){ @@ -341,6 +341,7 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele event.invokeObserver(Arrays.asList(var1.uri,mSessionID), enums.etype.start_proxy); event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID), enums.etype.search_update); checkApplicationRate(); + event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, mTheme), enums.etype.ON_EXPAND_TOP_BAR); return GeckoResult.fromValue(AllowOrDeny.ALLOW); }else { return GeckoResult.fromValue(AllowOrDeny.DENY); diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/hintManager/hintAdapter.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/hintManager/hintAdapter.java index 82cf6251..4f0abedf 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/hintManager/hintAdapter.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/hintManager/hintAdapter.java @@ -152,7 +152,7 @@ public class hintAdapter extends RecyclerView.Adapter= Build.VERSION_CODES.M) { @@ -186,8 +194,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); window.setStatusBarColor(ContextCompat.getColor(this, R.color.c_text_v3)); } - mSplashScreen.setAlpha(0f); - mSplashScreen.setVisibility(View.GONE); + mHomeViewController.splashScreenDisableInstant(); onLoadTabOnResume(); mSearchLock.setColorFilter(ContextCompat.getColor(this, R.color.c_lock_tint)); } @@ -328,7 +335,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba mTopBar = findViewById(R.id.pTopbar); mBackSplash = findViewById(R.id.pTopImage); mConnectButton = findViewById(R.id.Connect); - mNewTab = findViewById(R.id.pTabCounter); + mNewTab = findViewById(R.id.pNewTab); mSearchEngineBar = findViewById(R.id.pSearchEngineBar); mFindText = findViewById(R.id.pFindText); mFindCount = findViewById(R.id.pFindCount); @@ -374,10 +381,19 @@ public class homeController extends AppCompatActivity implements ComponentCallba @Override public boolean dispatchTouchEvent(MotionEvent event) { - mSwipeDirectionDetector.onTouchEvent(event); + if(inSignatureArea(event)){ + try{ + mSwipeDirectionDetector.onTouchEvent(event); + }catch (Exception ignored){ } + } return super.dispatchTouchEvent(event); } + public boolean inSignatureArea(MotionEvent ev) { + float mEventY = ev.getY(); + return mEventY>mTopBar.getY()+mTopBar.getHeight() && mEventY { + if(event.getAction() == MotionEvent.ACTION_DOWN){ + onOpenTabViewBoundary(null); + } + return false; + }); + + mFindText.addTextChangedListener(new TextWatcher() { @Override @@ -596,6 +618,11 @@ public class homeController extends AppCompatActivity implements ComponentCallba if(status.sSearchSuggestionStatus && isSuggestionChanged){ mSuggestions = (ArrayList)dataController.getInstance().invokeSuggestions(dataEnums.eSuggestionCommands.M_GET_SUGGESTIONS, Collections.singletonList(mSearchbar.getText().toString())); if(mSuggestions.size()>0){ + if(!isSuggestionSearchOpened && mSearchbar.isFocused()){ + if(Objects.requireNonNull(mHintListView.getAdapter()).getItemCount()>0){ + mHomeViewController.onUpdateSearchEngineBar(true, 0); + } + } if(mHintListView.getAdapter()==null){ initSuggestionView(mSuggestions); mSearchEngineBar.setVisibility(View.VISIBLE); @@ -604,12 +631,11 @@ public class homeController extends AppCompatActivity implements ComponentCallba mSearchEngineBar.setVisibility(View.VISIBLE); mSearchEngineBar.setAlpha(1); mEdittextChanged.removeCallbacks(postToServerRunnable); - mEdittextChanged.postDelayed(postToServerRunnable, 50); - } - - if(!isSuggestionSearchOpened && mSearchbar.isFocused()){ - if(Objects.requireNonNull(mHintListView.getAdapter()).getItemCount()>0){ - mHomeViewController.onUpdateSearchEngineBar(true, 0); + if(!mSearchBarLoading){ + mSearchBarLoading = true; + mEdittextChanged.postDelayed(postToServerRunnable, 0); + }else{ + mEdittextChanged.postDelayed(postToServerRunnable, 100); } } } @@ -677,6 +703,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba private Handler mEdittextChanged = new Handler(); private Runnable postToServerRunnable = () -> { onUpdateSuggestionList(mSuggestions); + final Handler handler = new Handler(); + handler.postDelayed(() -> mSearchBarLoading = false, 110); }; public void onSearchBarInvoked(View view){ @@ -720,7 +748,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba } public void postNewTabAnimation(boolean isKeyboardOpenedTemp, boolean isKeyboardOpened){ - mGeckoClient.onRedrawPixel(); initializeGeckoView(true, true); if(status.sOpenURLInNewTab){ onLoadURL(helperMethod.getDomainName(status.sSettingSearchStatus)); @@ -736,7 +763,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba } public void postNewLinkTabAnimation(String url){ - mGeckoClient.onRedrawPixel(); initializeGeckoView(true, true); mHomeViewController.progressBarReset(); mHomeViewController.onUpdateSearchBar(url,false,true); @@ -752,10 +778,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba } public void onOpenTabViewBoundary(View view){ + mGeckoClient.onRedrawPixel(); mNewTab.setPressed(true); helperMethod.openActivity(tabController.class, constants.CONST_LIST_HISTORY, homeController.this,true); overridePendingTransition(R.anim.popup_anim_in, R.anim.popup_anim_out); - mGeckoClient.onRedrawPixel(); } public void onLockSecure(View view){ @@ -835,9 +861,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba final Handler handler = new Handler(); handler.postDelayed(() -> mGeckoClient.onRedrawPixel(), 300); - if(mSplashScreen.getAlpha()>0){ - mHomeViewController.initSplashOrientation(); - } if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) { mHomeViewController.setOrientation(true); if(mGeckoClient.getFullScreenStatus()) @@ -851,6 +874,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba mHomeViewController.onSetBannerAdMargin(true,(boolean)pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED)); } } + if(mSplashScreen.getAlpha()>0){ + mHomeViewController.initSplashOrientation(); + } } @Override @@ -1224,14 +1250,14 @@ public class homeController extends AppCompatActivity implements ComponentCallba else if(e_type.equals(enums.etype.on_url_load)){ if(status.sSettingIsAppRedirected){ mHomeViewController.onPageFinished(); + status.sSettingIsAppRedirected = false; onLoadURL(status.sSettingRedirectStatus); status.sSettingRedirectStatus = strings.GENERIC_EMPTY_STR; }else { if(status.mThemeApplying){ mHomeViewController.onUpdateSearchBar(data.get(0).toString(),false, false); - mSplashScreen.setAlpha(0f); - mSplashScreen.setVisibility(View.GONE); + mHomeViewController.splashScreenDisableInstant(); onLoadTabOnResume(); } onLoadURL(data.get(0).toString()); @@ -1245,8 +1271,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba status.sSettingRedirectStatus = strings.GENERIC_EMPTY_STR; }else { if(status.mThemeApplying){ - mSplashScreen.setAlpha(0f); - mSplashScreen.setVisibility(View.GONE); + mHomeViewController.splashScreenDisableInstant(); onLoadTabOnResume(); } else if(status.sSettingIsAppStarted){ @@ -1328,7 +1353,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba @Override public Object invokeObserver(List data, Object e_type) { - if(e_type.equals(enums.etype.ON_LOAD_REQUEST)){ + if(e_type.equals(enums.etype.ON_EXPAND_TOP_BAR)){ mAppBar.setExpanded(true,true); } else if(e_type.equals(enums.etype.progress_update)){ @@ -1429,6 +1454,11 @@ public class homeController extends AppCompatActivity implements ComponentCallba else if(e_type.equals(dataEnums.eTabCommands.M_UPDATE_PIXEL)){ try{ dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(data.get(1), mGeckoView.capturePixels())); + final Handler handler = new Handler(); + handler.postDelayed(() -> + { + dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(data.get(1), mGeckoView.capturePixels())); + }, 500); }catch (Exception EX){ EX.printStackTrace(); } 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 f6c987a1..344ae339 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 @@ -13,6 +13,7 @@ import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; +import android.graphics.drawable.InsetDrawable; import android.graphics.drawable.StateListDrawable; import android.os.Build; import android.os.Handler; @@ -42,7 +43,6 @@ import com.darkweb.genesissearchengine.helperManager.eventObserver; import com.darkweb.genesissearchengine.helperManager.helperMethod; import com.darkweb.genesissearchengine.widget.progressBar.AnimatedProgressBar; import com.example.myapplication.R; -import com.google.android.gms.ads.AdSize; import com.google.android.gms.ads.AdView; import org.mozilla.geckoview.GeckoView; import org.torproject.android.service.wrapper.orbotLocalConstants; @@ -62,7 +62,7 @@ class homeViewController /*ViewControllers*/ private com.google.android.material.appbar.AppBarLayout mAppBar; - private FrameLayout mWebviewContainer; + private ConstraintLayout mWebviewContainer; private AnimatedProgressBar mProgressBar; private editTextManager mSearchbar; private ConstraintLayout mSplashScreen; @@ -94,7 +94,7 @@ class homeViewController private Callable mLogs = null; private boolean isLandscape = false; - void initialization(eventObserver.eventListener event, AppCompatActivity context, Button mNewTab, FrameLayout 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, FrameLayout pTopLayout, ImageButton pVoiceInput, ImageButton pMenu, FrameLayout pNestedScroll, ImageView pBlocker, ImageView pBlockerFullSceen, View mSearchEngineBar, TextView pCopyright, RecyclerView pHistListView, com.google.android.material.appbar.AppBarLayout pAppBar, ImageButton pOrbotLogManager, ConstraintLayout pInfoLandscape, ConstraintLayout pInfoPortrait){ + 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, FrameLayout pTopLayout, ImageButton pVoiceInput, ImageButton pMenu, FrameLayout pNestedScroll, ImageView pBlocker, ImageView pBlockerFullSceen, View mSearchEngineBar, TextView pCopyright, RecyclerView pHistListView, com.google.android.material.appbar.AppBarLayout pAppBar, ImageButton pOrbotLogManager, ConstraintLayout pInfoLandscape, ConstraintLayout pInfoPortrait){ this.mContext = context; this.mProgressBar = progressBar; this.mSearchbar = searchbar; @@ -156,7 +156,7 @@ class homeViewController } public void initSplashOrientation(){ - if(!isLandscape){ + if(isLandscape){ this.mInfoPortrait.setVisibility(View.GONE); this.mInfoLandscape.setVisibility(View.VISIBLE); mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue_splash)); @@ -171,7 +171,7 @@ class homeViewController if(!pStatus){ this.mVoiceInput.animate().setDuration(0).alpha(0).withEndAction(() -> { mVoiceInput.setVisibility(View.GONE); - ((FrameLayout)mNewTab.getParent()).setVisibility(View.VISIBLE); + mNewTab.setVisibility(View.VISIBLE); mMenu.setVisibility(View.VISIBLE); mSearchbar.setPadding(mSearchbar.getPaddingLeft(),0,helperMethod.pxFromDp(15),0); @@ -195,7 +195,7 @@ class homeViewController mVoiceInput.setVisibility(View.VISIBLE); }, 0); - ((FrameLayout)this.mNewTab.getParent()).setVisibility(View.GONE); + mNewTab.setVisibility(View.GONE); this.mMenu.setVisibility(View.GONE); //mSearchbar.setPadding(mSearchbar.getPaddingLeft(),0,helperMethod.pxFromDp(40),0); @@ -288,8 +288,6 @@ class homeViewController public void initSplashLoading(){ - mLoading.setAnimation(helperMethod.getRotationAnimation()); - mLoading.setAnimation(helperMethod.getRotationAnimation()); mLoadingText.setAlpha(0); mLoadingText.setVisibility(View.VISIBLE); mLoadingText.animate().setStartDelay(0).alpha(1); @@ -311,11 +309,11 @@ class homeViewController mOrbotLogManager.setEnabled(true); }, 700); - mConnectButton.animate().setDuration(350).alpha(0.2f).withEndAction(() -> { + mConnectButton.animate().setDuration(350).alpha(0.4f).withEndAction(() -> { mCopyright.setVisibility(View.GONE); initSplashLoading(); }); - mGatewaySplash.animate().setDuration(350).alpha(0.2f); + mGatewaySplash.animate().setDuration(350).alpha(0.4f); } private void initSplashScreen(){ @@ -372,6 +370,14 @@ class homeViewController mSplashScreen.bringToFront(); splashScreenDisable(); } + + public void splashScreenDisableInstant() { + mSplashScreen.setAlpha(0f); + mSplashScreen.setVisibility(View.GONE); + mSplashScreen.setVisibility(View.GONE); + mBlocker.setEnabled(false); + } + private boolean mIsAnimating = false; public void splashScreenDisable(){ mTopBar.setAlpha(1); @@ -386,6 +392,7 @@ class homeViewController mSplashScreen.setClickable(false); mSplashScreen.setFocusable(false); mSearchbar.setEnabled(true); + mBlocker.setEnabled(false); }); mEvent.invokeObserver(null, enums.etype.M_WELCOME_MESSAGE); mOrbotLogManager.setClickable(false); @@ -519,11 +526,9 @@ class homeViewController handler.postDelayed(() -> { mWebviewContainer.clearAnimation(); - mWebviewContainer.setPadding(0,AdSize.SMART_BANNER.getHeightInPixels(mContext)+1,0,0); mProgressBar.bringToFront(); }, 250); }else{ - mWebviewContainer.setPadding(0,0,0,0); mBannerAds.setVisibility(View.GONE); } } @@ -583,21 +588,25 @@ class homeViewController GradientDrawable gradientDrawable1 = new GradientDrawable(); gradientDrawable1.setColor(helperMethod.invertedShadeColor(mColor,0.85f)); gradientDrawable1.setCornerRadius(helperMethod.pxFromDp(4)); - gradientDrawable1.setStroke(helperMethod.pxFromDp(2), helperMethod.invertedGrayColor(mColor)); + gradientDrawable1.setStroke(helperMethod.pxFromDp(2), mColor); GradientDrawable gradientDrawable2 = new GradientDrawable(); gradientDrawable2.setColor(helperMethod.invertedShadeColor(mColor,0.85f)); gradientDrawable2.setCornerRadius(helperMethod.pxFromDp(4)); - gradientDrawable2.setStroke(helperMethod.pxFromDp(2), mColor); + gradientDrawable2.setStroke(helperMethod.pxFromDp(2), helperMethod.invertedGrayColor(mColor)); StateListDrawable states = new StateListDrawable(); - states.addState(new int[] {android.R.attr.state_pressed}, gradientDrawable2); - states.addState(new int[] { }, gradientDrawable1); + InsetDrawable mInsetDrawable1 = new InsetDrawable(gradientDrawable1, helperMethod.pxFromDp(8), helperMethod.pxFromDp(8), helperMethod.pxFromDp(8), helperMethod.pxFromDp(8)); + InsetDrawable mInsetDrawable2 = new InsetDrawable(gradientDrawable2, helperMethod.pxFromDp(8), helperMethod.pxFromDp(8), helperMethod.pxFromDp(8), helperMethod.pxFromDp(8)); + + states.addState(new int[] {android.R.attr.state_pressed}, mInsetDrawable1); + states.addState(new int[] { }, mInsetDrawable2); mNewTab.setBackground(states); mMenu.setColorFilter(helperMethod.invertedGrayColor(mColor)); mVoiceInput.setColorFilter(helperMethod.invertedGrayColor(mColor)); + mVoiceInput.setBackground(mGradientDrawable); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { mContext.getWindow().setStatusBarColor(Color.parseColor(pTheme)); @@ -629,6 +638,7 @@ class homeViewController drawable = Drawable.createFromXml(res, res.getXml(R.xml.gx_generic_input)); mSearchbar.setBackground(drawable); + mVoiceInput.setBackground(drawable); } catch (Exception ignored) { } @@ -831,11 +841,11 @@ class homeViewController mTopBar.setVisibility(View.GONE); mBannerAds.setVisibility(View.GONE); - ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mWebviewContainer.getLayoutParams(); + ConstraintLayout.MarginLayoutParams params = (ConstraintLayout.MarginLayoutParams) mWebviewContainer.getLayoutParams(); params.setMargins(0, helperMethod.pxFromDp(0), 0, 0); mWebviewContainer.setLayoutParams(params); - ViewGroup.MarginLayoutParams params1 = (ViewGroup.MarginLayoutParams) mWebviewContainer.getLayoutParams(); + ConstraintLayout.MarginLayoutParams params1 = (ConstraintLayout.MarginLayoutParams) mWebviewContainer.getLayoutParams(); params1.setMargins(0, 0, 0,0); mGeckoView.setLayoutParams(params1); @@ -858,11 +868,11 @@ class homeViewController mBannerAds.setVisibility(View.GONE); mEvent.invokeObserver(Collections.singletonList(!isLandscape), enums.etype.on_init_ads); - ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mWebviewContainer.getLayoutParams(); + ConstraintLayout.MarginLayoutParams params = (ConstraintLayout.MarginLayoutParams) mWebviewContainer.getLayoutParams(); params.setMargins(0, 0, 0,0); mWebviewContainer.setLayoutParams(params); - ViewGroup.MarginLayoutParams params1 = (ViewGroup.MarginLayoutParams) mWebviewContainer.getLayoutParams(); + ConstraintLayout.MarginLayoutParams params1 = (ConstraintLayout.MarginLayoutParams) mWebviewContainer.getLayoutParams(); params1.setMargins(0, 0, 0,helperMethod.pxFromDp(0)); mGeckoView.setLayoutParams(params1); diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/languageManager/languageModel.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/languageManager/languageModel.java index 1fe904c8..52e9a7e3 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/languageManager/languageModel.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/languageManager/languageModel.java @@ -31,6 +31,7 @@ class languageModel mSupportedLanaguage.add(new languageDataModel("韓国語","Korean", "ko","Kr")); mSupportedLanaguage.add(new languageDataModel("Português","Portuguese (Portugal)", "pt","Pt")); mSupportedLanaguage.add(new languageDataModel("Română","Romanian", "ro","Ro")); + mSupportedLanaguage.add(new languageDataModel("Urdu (اردو)","Urdu", "ur","Ur")); mSupportedLanaguage.add(new languageDataModel("русский","Russian", "ru","Ru")); mSupportedLanaguage.add(new languageDataModel("ไทย","Thai", "th","Th")); mSupportedLanaguage.add(new languageDataModel("Türk","Turkish", "tr","Tr")); 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 24225f18..fa96d8ec 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 @@ -131,7 +131,7 @@ public class orbotLogController extends AppCompatActivity { @Override public boolean onSwipe(Direction direction) { - if (direction==Direction.left || direction==Direction.right){ + if (direction==Direction.right){ finish(); overridePendingTransition(R.anim.push_anim_in, R.anim.push_anim_out); } @@ -255,8 +255,18 @@ public class orbotLogController extends AppCompatActivity { @Override public boolean dispatchTouchEvent(MotionEvent event) { - mSwipeDirectionDetector.onTouchEvent(event); + if(inSignatureArea(event)){ + try{ + mSwipeDirectionDetector.onTouchEvent(event); + }catch (Exception ignored){ } + } return super.dispatchTouchEvent(event); } + public boolean inSignatureArea(MotionEvent ev) { + float mEventY = ev.getY(); + return mEventY>helperMethod.pxFromDp(300) || ev.getX()helperMethod.pxFromDp(500) || mEventX>helperMethod.getScreenWidth(this)-helperMethod.pxFromDp(80); + } + } \ No newline at end of file diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabAdapter.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabAdapter.java index 16a615c1..e87a743d 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabAdapter.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabAdapter.java @@ -3,6 +3,7 @@ package com.darkweb.genesissearchengine.appManager.tabManager; import android.content.res.Resources; import android.graphics.Color; import android.graphics.drawable.Drawable; +import android.os.Handler; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -114,6 +115,17 @@ public class tabAdapter extends RecyclerView.Adapter notifyItemChanged(mModelList.size()-1); } + private void onRemoveAll(){ + int mSize = mModelList.size()-1; + for(int mCounter=0;mCounter mEvent.invokeObserver(null, tabEnums.eTabAdapterCallback.ON_INIT_TAB_COUNT); } + private int getSelectionSize(){ + return mSelectedList.size(); + } + /*View Holder Extensions*/ class listViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnLongClickListener { @@ -215,7 +231,12 @@ public class tabAdapter extends RecyclerView.Adapter } mDescription.setText(model.getSession().getCurrentURL()); mDate.setText(model.getDate()); - mWebThumbnail.setImageBitmap(model.getBitmap()); + + final Handler handler = new Handler(); + handler.postDelayed(() -> + { + mWebThumbnail.setImageBitmap(model.getBitmap()); + }, 500); if(mSelectedList.contains(model.getSession().getSessionID())){ onSelectionCreate(mSelectedView); @@ -307,6 +328,7 @@ public class tabAdapter extends RecyclerView.Adapter } mEvent.invokeObserver(Collections.singletonList(this.getLayoutPosition()), tabEnums.eTabAdapterCallback.ON_REMOVE_TAB_VIEW); + mEvent.invokeObserver(null, tabEnums.eTabAdapterCallback.ON_SHOW_UNDO_DIALOG); } else if(v.getId() == R.id.pItemSelectionMenuButton){ onEnableLongClickMenu(); @@ -333,6 +355,7 @@ public class tabAdapter extends RecyclerView.Adapter } } + public Object onTrigger(tabEnums.eTabAdapterCommands pCommands, List pData){ if(pCommands.equals(tabEnums.eTabAdapterCommands.M_SELECTION_MENU_SHOWING)){ return isSelectionMenuShowing(); @@ -346,8 +369,12 @@ public class tabAdapter extends RecyclerView.Adapter initFirstRow(); }else if(pCommands.equals(tabEnums.eTabAdapterCommands.REINIT_DATA)){ reInitData((ArrayList)pData.get(0)); - }else if(pCommands.equals(tabEnums.eTabAdapterCommands.NOTIFY_sWIPE)){ + }else if(pCommands.equals(tabEnums.eTabAdapterCommands.NOTIFY_SWIPE)){ onNotifyItemSwiped((int)pData.get(0)); + }else if(pCommands.equals(tabEnums.eTabAdapterCommands.GET_SELECTION_SIZE)){ + return getSelectionSize(); + }else if(pCommands.equals(tabEnums.eTabAdapterCommands.REMOVE_ALL)){ + onRemoveAll(); } return null; } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabController.java index f66282ac..90935b76 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabController.java @@ -1,13 +1,14 @@ package com.darkweb.genesissearchengine.appManager.tabManager; +import android.annotation.SuppressLint; import android.graphics.Canvas; import android.os.Bundle; +import android.util.Log; +import android.view.MotionEvent; import android.view.View; import android.widget.Button; -import android.widget.FrameLayout; import android.widget.ImageButton; import android.widget.ImageView; -import android.widget.LinearLayout; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; @@ -29,7 +30,6 @@ import com.darkweb.genesissearchengine.helperManager.helperMethod; import com.darkweb.genesissearchengine.pluginManager.pluginController; import com.darkweb.genesissearchengine.pluginManager.pluginEnums; import com.example.myapplication.R; - import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -41,7 +41,6 @@ public class tabController extends AppCompatActivity /*Private Views*/ private Button mTabs; private ImageView mRemoveSelection; - private FrameLayout mTabsContainer; private ImageButton mMenuButton; private ImageButton mClearSelection; private View mPopupUndo; @@ -73,6 +72,7 @@ public class tabController extends AppCompatActivity initializeViews(); initializeList(); initSwipe(); + initializeLocalEventHandlers(); } public void initializeActivity(){ @@ -87,16 +87,24 @@ public class tabController extends AppCompatActivity mRecycleView = findViewById(R.id.pRecycleView); mTabs = findViewById(R.id.pTabs); mRemoveSelection = findViewById(R.id.pRemoveSelection); - mTabsContainer = findViewById(R.id.pTabsContainer); mMenuButton = findViewById(R.id.pMenuButton); mClearSelection = findViewById(R.id.pClearSelection); mPopupUndo = findViewById(R.id.pPopupUndo); mSelectionCount = findViewById(R.id.pSelectionCount); mBlocker = findViewById(R.id.pBlocker); - mtabViewController = new tabViewController(this, mTabs, mRemoveSelection, mTabsContainer, mMenuButton, mClearSelection, mPopupUndo, mSelectionCount, mBlocker); + mtabViewController = new tabViewController(this, mTabs, mRemoveSelection, mMenuButton, mClearSelection, mPopupUndo, mSelectionCount, mBlocker); } + @SuppressLint("ClickableViewAccessibility") + public void initializeLocalEventHandlers(){ + mTabs.setOnTouchListener((v, event) -> { + if(event.getAction() == MotionEvent.ACTION_DOWN){ + onBackPressedInvoked(null); + } + return false; + }); + } public void initializeList(){ LinearLayoutManager layoutManager = new LinearLayoutManager(tabController.this); tabAdapter adapter = new tabAdapter(mListModel.getList(),new adapterCallback()); @@ -113,6 +121,7 @@ public class tabController extends AppCompatActivity mRecycleView.setDrawingCacheEnabled(true); mRecycleView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH); mRecycleView.setLayoutManager(new LinearLayoutManager(tabController.this)); + initTabCount(); } /*Listeners*/ @@ -127,9 +136,12 @@ public class tabController extends AppCompatActivity public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) { int position = viewHolder.getAdapterPosition(); - onClearTabBackup(); - onInitRemoveView(position, true); - mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.NOTIFY_sWIPE, Collections.singletonList(position)); + mListModel.onClearBackupWithoutClose(); + boolean mStatus = onInitRemoveView(position, true); + if(mStatus){ + mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.NOTIFY_SWIPE, Collections.singletonList(position)); + } + onShowUndoDialog(); } @Override @@ -146,25 +158,28 @@ public class tabController extends AppCompatActivity public void onRemoveTab(int pIndex){ mListModel.onRemoveTab(pIndex); if(mListModel.getList().size()<1){ - mRecycleView.animate().setStartDelay(150).alpha(0); + mRecycleView.animate().setStartDelay(250).alpha(0); } initTabCount(); mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.INIT_FIRST_ROW, null); } - public void onInitRemoveView(int pIndex, boolean pCreateBackup){ + public boolean onInitRemoveView(int pIndex, boolean pCreateBackup){ mListModel.onRemoveTab(pIndex); mListModel.getList().remove(pIndex); - if(mListModel.getList().size()<1){ - mRecycleView.animate().setStartDelay(150).alpha(0); - } initTabCount(); - mTabAdapter.notifyItemRangeChanged(pIndex, mTabAdapter.getItemCount() - pIndex); + if(mListModel.getList().size()<1){ + mRecycleView.animate().setStartDelay(250).alpha(0).withEndAction(() -> mTabAdapter.notifyDataSetChanged()); + return false; + }else{ + mTabAdapter.notifyItemRangeChanged(pIndex, mTabAdapter.getItemCount() - pIndex); + return true; + } } public void initTabCount() { - mtabViewController.onTrigger(tabEnums.eTabViewCommands.INIT_TAB_COUNT, null); + mtabViewController.onTrigger(tabEnums.eTabViewCommands.INIT_TAB_COUNT, Collections.singletonList(mListModel.getList().size())); mHomeController.initTabCount(); } @@ -183,17 +198,25 @@ public class tabController extends AppCompatActivity } public void onRestoreTab(View view){ + Log.i("FUCKSSS","FUCKSSS1 : " + (mPopupUndo.findViewById(R.id.pBlockerUndo).getVisibility()==View.VISIBLE)); + mPopupUndo.findViewById(R.id.pBlockerUndo).setVisibility(View.VISIBLE); + mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_HIDE_UNDO_DIALOG, null); + + if(mRecycleView.getAlpha()==0){ + initializeList(); + mRecycleView.animate().cancel(); + mRecycleView.setVisibility(View.VISIBLE); + mRecycleView.animate().setDuration(250).alpha(1); + } + ArrayList mBackup = mListModel.onLoadBackup(); mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.REINIT_DATA, Collections.singletonList(mBackup)); - mListModel.onClearBackupWithoutClose(); initTabCount(); - mRecycleView.animate().cancel(); - mRecycleView.animate().alpha(1); } public void onShowUndoDialog(){ - mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_SHOW_UNDO_DIALOG, null); + mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_SHOW_UNDO_DIALOG, Collections.singletonList(mListModel.getList().size())); } public void onClearTabBackup(){ @@ -219,7 +242,18 @@ public class tabController extends AppCompatActivity } public void onRemoveSelection(View view) { - mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.M_REMOVE_ALL_SELECTION, null); + int mSelectionSize = (int)mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.GET_SELECTION_SIZE,null); + if(mSelectionSize >= mListModel.getList().size()){ + mRecycleView.animate().setStartDelay(250).alpha(0).withEndAction(() -> { + mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.M_REMOVE_ALL_SELECTION, null); + onShowUndoDialog(); + }); + }else { + mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.M_REMOVE_ALL_SELECTION, null); + } + + mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_SHOW_SELECTION_MENU, Arrays.asList(false,0)); + mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_HIDE_SELECTION, null); } public void onClearSelection(View view) { @@ -243,17 +277,16 @@ public class tabController extends AppCompatActivity onNewTabInvoked(); } else if(pView.getId() == R.id.pCloseTab){ - mtabViewController.onTrigger(tabEnums.eTabViewCommands.M_DISMISS_MENU, null); - int mCounterActual = mListModel.getList().size(); - for(int mCounter=0;mCounterActual>0;mCounter++){ - onInitRemoveView(mCounter, true); - mCounterActual -= 1; - } + mRecycleView.animate().setDuration(250).alpha(0).withEndAction(() -> { + onClearTabBackup(); + mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.REMOVE_ALL, null); + initTabCount(); + }); } else if(pView.getId() == R.id.pOpenSetting){ - mtabViewController.onTrigger(tabEnums.eTabViewCommands.M_DISMISS_MENU, null); helperMethod.openActivity(settingHomeController.class, constants.CONST_LIST_HISTORY, this,true); } + mtabViewController.onTrigger(tabEnums.eTabViewCommands.M_DISMISS_MENU, null); } @Override @@ -331,14 +364,14 @@ public class tabController extends AppCompatActivity mHomeController.onLoadTab((geckoSession)data.get(0),(boolean)data.get(1)); } else if(e_type.equals(tabEnums.eTabAdapterCallback.ON_REMOVE_TAB_VIEW)){ - onClearTabBackup(); + mListModel.onClearBackupWithoutClose(); onInitRemoveView((Integer) data.get(0), true); } else if(e_type.equals(tabEnums.eTabAdapterCallback.ON_REMOVE_TAB_VIEW_RETAIN_BACKUP)){ onInitRemoveView((Integer) data.get(0), false); } else if(e_type.equals(tabEnums.eTabAdapterCallback.ON_SHOW_UNDO_DIALOG)){ - onShowUndoDialog(); + mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_SHOW_UNDO_DIALOG, Collections.singletonList(mListModel.getList().size())); } else if(e_type.equals(tabEnums.eTabAdapterCallback.ON_SHOW_SELECTION_MENU)){ mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_SHOW_SELECTION_MENU, data); diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabEnums.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabEnums.java index fa3cb405..8268752a 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabEnums.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabEnums.java @@ -8,7 +8,7 @@ public class tabEnums } public enum eTabAdapterCommands { - M_SELECTION_MENU_SHOWING, M_REMOVE_ALL_SELECTION, M_CLEAR_ALL_SELECTION, ENABLE_LONG_CLICK_MENU, INIT_FIRST_ROW, REINIT_DATA, NOTIFY_sWIPE + M_SELECTION_MENU_SHOWING, M_REMOVE_ALL_SELECTION, M_CLEAR_ALL_SELECTION, ENABLE_LONG_CLICK_MENU, INIT_FIRST_ROW, REINIT_DATA, NOTIFY_SWIPE, GET_SELECTION_SIZE, REMOVE_ALL } public enum eTabAdapterCallback { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabViewController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabViewController.java index 29b6badc..cf800d44 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabViewController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabViewController.java @@ -11,7 +11,6 @@ import android.graphics.drawable.ColorDrawable; import android.os.Build; import android.os.Handler; import android.view.LayoutInflater; -import android.view.MotionEvent; import android.view.View; import android.view.Window; import android.view.WindowManager; @@ -20,16 +19,13 @@ import android.widget.Button; import android.widget.FrameLayout; import android.widget.ImageButton; import android.widget.ImageView; -import android.widget.LinearLayout; import android.widget.PopupWindow; import android.widget.TextView; - import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatDelegate; import androidx.core.content.ContextCompat; import androidx.recyclerview.widget.ItemTouchHelper; import androidx.recyclerview.widget.RecyclerView; - import com.darkweb.genesissearchengine.constants.strings; import com.darkweb.genesissearchengine.dataManager.dataController; import com.darkweb.genesissearchengine.dataManager.dataEnums; @@ -45,7 +41,6 @@ class tabViewController private PopupWindow mTabOptionMenu = null; private Button mTabs; private ImageView mRemoveSelection; - private FrameLayout mTabsContainer; private ImageButton mMenuButton; private ImageButton mClearSelection; private View mToastLayoutRoot; @@ -58,12 +53,11 @@ class tabViewController /*Initializations*/ - tabViewController(AppCompatActivity mContext, Button pTabs, ImageView pRemoveSelection, FrameLayout pTabsContainer, ImageButton pMenuButton, ImageButton pClearSelection, View pToastLayoutRoot, TextView pSelectionCount, ImageView pBlocker) + tabViewController(AppCompatActivity mContext, Button pTabs, ImageView pRemoveSelection, ImageButton pMenuButton, ImageButton pClearSelection, View pToastLayoutRoot, TextView pSelectionCount, ImageView pBlocker) { this.mContext = mContext; this.mTabs = pTabs; this.mRemoveSelection = pRemoveSelection; - this.mTabsContainer = pTabsContainer; this.mMenuButton = pMenuButton; this.mClearSelection = pClearSelection; this.mToastLayoutRoot = pToastLayoutRoot; @@ -71,14 +65,9 @@ class tabViewController this.mBlocker = pBlocker; initPostUI(); - initUI(); onHoldInteraction(); } - private void initUI(){ - initTabCount(); - } - @SuppressLint("ClickableViewAccessibility") public void onHoldInteraction(){ final Handler handler = new Handler(); @@ -88,8 +77,8 @@ class tabViewController }, 350); } - private void initTabCount(){ - mTabs.setText((((int)dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_TOTAL_TAB, null))+ strings.GENERIC_EMPTY_STR)); + private void initTabCount(int pCount){ + mTabs.setText(String.valueOf(pCount)); } private void initPostUI(){ @@ -134,7 +123,6 @@ class tabViewController mSelectionCount.setText(0 + " Selected"); } - mTabsContainer.setVisibility(View.GONE); mMenuButton.setVisibility(View.GONE); mSelectionCount.setVisibility(View.VISIBLE); mClearSelection.setVisibility(View.VISIBLE); @@ -147,25 +135,29 @@ class tabViewController mRemoveSelection.setVisibility(View.GONE); } mSelectionCount.setText(pCount + " Selected"); + mTabs.setAlpha(0); } private void onHideSelectionMenu() { mSelectionCount.setVisibility(View.GONE); mRemoveSelection.setVisibility(View.GONE); mClearSelection.setVisibility(View.GONE); - mTabsContainer.setVisibility(View.VISIBLE); mMenuButton.setVisibility(View.VISIBLE); + mTabs.animate().setStartDelay(250).setDuration(200).alpha(1); } - private void onShowUndoDialog() { + private void onShowUndoDialog(int pTabCount) { + mToastLayoutRoot.findViewById(R.id.pBlockerUndo).setVisibility(View.GONE); mToastLayoutRoot.animate().cancel(); mToastLayoutRoot.setVisibility(View.VISIBLE); mToastLayoutRoot.setAlpha(0); mToastLayoutRoot.animate().alpha(1); - initTabCount(); + initTabCount(pTabCount); mDelayHandler.removeCallbacksAndMessages(null); - mDelayHandler.postDelayed(() -> mToastLayoutRoot.animate().alpha(0).withEndAction(() -> mToastLayoutRoot.setVisibility(View.GONE)), 2000); + mDelayHandler.postDelayed(() -> mToastLayoutRoot.animate().alpha(0).withEndAction(() -> { + mToastLayoutRoot.setVisibility(View.GONE); + }), 3000); } private void onHideUndoDialog() { @@ -209,7 +201,7 @@ class tabViewController }else if(pCommands.equals(tabEnums.eTabViewCommands.M_DISMISS_MENU)){ onCloseTabMenu(); }else if(pCommands.equals(tabEnums.eTabViewCommands.INIT_TAB_COUNT)){ - initTabCount(); + initTabCount((int)pData.get(0)); }else if(pCommands.equals(tabEnums.eTabViewCommands.ON_HIDE_SELECTION)){ onHideSelectionMenu(); } @@ -219,7 +211,7 @@ class tabViewController else if(pCommands.equals(tabEnums.eTabViewCommands.ON_SHOW_SELECTION)){ onShowSelection(); }else if(pCommands.equals(tabEnums.eTabViewCommands.ON_SHOW_UNDO_DIALOG)){ - onShowUndoDialog(); + onShowUndoDialog((int)pData.get(0)); }else if(pCommands.equals(tabEnums.eTabViewCommands.ON_HIDE_UNDO_DIALOG)){ onHideUndoDialog(); }else if(pCommands.equals(tabEnums.eTabViewCommands.ON_GENERATE_SWIPABLE_BACKGROUND)){ diff --git a/app/src/main/java/com/darkweb/genesissearchengine/constants/enums.java b/app/src/main/java/com/darkweb/genesissearchengine/constants/enums.java index 7e7eab67..c20e1087 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/constants/enums.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/constants/enums.java @@ -8,7 +8,7 @@ public class enums on_verify_selected_url_menu,FINDER_RESULT_CALLBACK, welcome, reload,download_folder, url_triggered, url_triggered_new_tab,url_clear,fetch_favicon,url_clear_at,remove_from_database,is_empty,M_HOME_PAGE,M_PRELOAD_URL,ON_KEYBOARD_CLOSE, - on_close_sesson,on_long_press, on_full_screen,on_handle_external_intent,on_update_suggestion_url,progress_update,recheck_orbot,on_url_load,on_playstore_load,back_list_empty,start_proxy, ON_UPDATE_THEME, M_INITIALIZE_TAB_SINGLE, M_INITIALIZE_TAB_LINK,on_request_completed, on_update_history,on_update_suggestion,M_WELCOME_MESSAGE,ON_UPDATE_TITLE_BAR,ON_FIRST_PAINT, ON_LOAD_TAB_ON_RESUME, ON_SESSION_REINIT,on_page_loaded,on_load_error,download_file_popup,on_init_ads,search_update, open_new_tab + on_close_sesson,on_long_press, on_full_screen,on_handle_external_intent,on_update_suggestion_url,progress_update, ON_EXPAND_TOP_BAR,recheck_orbot,on_url_load,on_playstore_load,back_list_empty,start_proxy, ON_UPDATE_THEME, M_INITIALIZE_TAB_SINGLE, M_INITIALIZE_TAB_LINK,on_request_completed, on_update_history,on_update_suggestion,M_WELCOME_MESSAGE,ON_UPDATE_TITLE_BAR,ON_FIRST_PAINT, ON_LOAD_TAB_ON_RESUME, ON_SESSION_REINIT,on_page_loaded,on_load_error,download_file_popup,on_init_ads,search_update, open_new_tab } /*General Enums*/ 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 156da277..01824fcf 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/constants/status.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/constants/status.java @@ -13,7 +13,7 @@ public class status { /*App Status*/ - public static boolean sPaidStatus = true; + public static boolean sPaidStatus = false; public static String mCurrentReloadURL = ""; public static int mNotificationID = 1001; diff --git a/app/src/main/java/com/darkweb/genesissearchengine/dataManager/dataController.java b/app/src/main/java/com/darkweb/genesissearchengine/dataManager/dataController.java index 0e26406f..01bdeef4 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/dataManager/dataController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/dataManager/dataController.java @@ -20,6 +20,7 @@ public class dataController private imageDataModel mImageDataModel; private bookmarkDataModel mBookmarkDataModel; private suggestionDataModel mSuggestionDataModel; + private helpDataModel mHelpDataModel; /*Private Declarations*/ @@ -38,6 +39,7 @@ public class dataController mImageDataModel = new imageDataModel(); mBookmarkDataModel = new bookmarkDataModel(); mSuggestionDataModel = new suggestionDataModel(pAppContext); + mHelpDataModel = new helpDataModel(); } public void initializeListData(){ mBookmarkDataModel.initializebookmark(databaseController.getInstance().selectBookmark()); @@ -80,6 +82,11 @@ public class dataController return mPreferenceModel.onTrigger(pCommands, pData); } + /*Recieving Help*/ + public Object invokeHelp(dataEnums.eHelpCommands pCommands, List pData){ + return mHelpDataModel.onTrigger(pCommands, pData); + } + /*Recieving History*/ public Object invokeBookmark(dataEnums.eBookmarkCommands pCommands, List pData){ return mBookmarkDataModel.onTrigger(pCommands, pData); diff --git a/app/src/main/java/com/darkweb/genesissearchengine/dataManager/dataEnums.java b/app/src/main/java/com/darkweb/genesissearchengine/dataManager/dataEnums.java index a4ae3c1b..9b74bda4 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/dataManager/dataEnums.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/dataManager/dataEnums.java @@ -26,4 +26,9 @@ public class dataEnums public enum eImageCommands{ M_REQUEST_IMAGE_URL, M_GET_IMAGE } + + public enum eHelpCommands { + M_GET_HELP, M_SET_HELP + } + } \ No newline at end of file diff --git a/app/src/main/java/com/darkweb/genesissearchengine/dataManager/helpDataModel.java b/app/src/main/java/com/darkweb/genesissearchengine/dataManager/helpDataModel.java new file mode 100644 index 00000000..d11adacd --- /dev/null +++ b/app/src/main/java/com/darkweb/genesissearchengine/dataManager/helpDataModel.java @@ -0,0 +1,40 @@ +package com.darkweb.genesissearchengine.dataManager; + +import android.annotation.SuppressLint; +import java.util.ArrayList; +import java.util.List; + +@SuppressLint("CommitPrefEdits") +class helpDataModel +{ + private ArrayList mHelpListModel; + + helpDataModel(){ + mHelpListModel = new ArrayList<>(); + } + + ArrayList getHelpModel(){ + return mHelpListModel; + } + + private void setModel(ArrayList pHelpListModel){ + mHelpListModel.clear(); + mHelpListModel.addAll(pHelpListModel); + } + + /*List Tabs*/ + + + /*List Suggestion*/ + public Object onTrigger(dataEnums.eHelpCommands pCommands, List pData){ + if(pCommands.equals(dataEnums.eHelpCommands.M_GET_HELP)){ + return getHelpModel(); + } + else if(pCommands.equals(dataEnums.eHelpCommands.M_SET_HELP)){ + setModel((ArrayList)pData.get(0)); + } + + return null; + } + +} diff --git a/app/src/main/java/com/darkweb/genesissearchengine/dataManager/imageDataModel.java b/app/src/main/java/com/darkweb/genesissearchengine/dataManager/imageDataModel.java index 4c638f21..fb6ae06c 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/dataManager/imageDataModel.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/dataManager/imageDataModel.java @@ -56,7 +56,7 @@ class imageDataModel public void run(){ while (true) { try { - sleep(1000); + sleep(50); if(mRequestQueue.size()>0){ mParsedQueues.put(mRequestQueue.get(0), enums.ImageQueueStatus.M_IMAGE_LOADING); Bitmap mBitmap = getBitmapFromURL(mRequestQueue.get(0)); diff --git a/app/src/main/java/com/darkweb/genesissearchengine/dataManager/test.java b/app/src/main/java/com/darkweb/genesissearchengine/dataManager/test.java deleted file mode 100644 index 75d4c86a..00000000 --- a/app/src/main/java/com/darkweb/genesissearchengine/dataManager/test.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.darkweb.genesissearchengine.dataManager; - -public class test { -} 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 a038cb92..b68d1079 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/helperManager/helperMethod.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/helperManager/helperMethod.java @@ -128,6 +128,13 @@ public class helperMethod return size.y; } + public static int getScreenWidth(AppCompatActivity context) { + Display display = context.getWindowManager().getDefaultDisplay(); + Point size = new Point(); + display.getRealSize(size); + return size.x; + } + public static SpannableString urlDesigner(String url, Context pContext, int pDefColor){ int mColor = 0; diff --git a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/adManager.java b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/adManager.java index 85019a42..e4ce6c6d 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/adManager.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/adManager.java @@ -44,7 +44,7 @@ class adManager { bannerAdsLoading = true; MobileAds.initialize(mAppContext, initializationStatus -> { }); - mBannerAds.setAlpha(0f); + initializeBannerAds(); } } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/langManager.java b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/langManager.java index 2462c021..6b17c8a2 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/langManager.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/langManager.java @@ -33,7 +33,7 @@ class langManager { { Locale mSystemLocale = Resources.getSystem().getConfiguration().locale; String mSystemLangugage = mSystemLocale.toString(); - if(mSystemLangugage.equals("en_US") || mSystemLangugage.equals("de_DE") || mSystemLangugage.equals("ca_ES") || mSystemLangugage.equals("zh_CN") || mSystemLangugage.equals("ch_CZ") || mSystemLangugage.equals("nl_NL") || mSystemLangugage.equals("fr_FR") || mSystemLangugage.equals("el_GR") || mSystemLangugage.equals("hu_HU") || mSystemLangugage.equals("in_ID") || mSystemLangugage.equals("it_IT") || mSystemLangugage.equals("ja_JP") || mSystemLangugage.equals("ko_KR") || mSystemLangugage.equals("pt_PT") || mSystemLangugage.equals("ro_RO") || mSystemLangugage.equals("ru_RU") || mSystemLangugage.equals("th_TH") || mSystemLangugage.equals("tr_TR") || mSystemLangugage.equals("uk_UA") || mSystemLangugage.equals("vi_VN")){ + if(mSystemLangugage.equals("en_US") || mSystemLangugage.equals("de_DE") || mSystemLangugage.equals("ur_UR") || mSystemLangugage.equals("ca_ES") || mSystemLangugage.equals("zh_CN") || mSystemLangugage.equals("ch_CZ") || mSystemLangugage.equals("nl_NL") || mSystemLangugage.equals("fr_FR") || mSystemLangugage.equals("el_GR") || mSystemLangugage.equals("hu_HU") || mSystemLangugage.equals("in_ID") || mSystemLangugage.equals("it_IT") || mSystemLangugage.equals("ja_JP") || mSystemLangugage.equals("ko_KR") || mSystemLangugage.equals("pt_PT") || mSystemLangugage.equals("ro_RO") || mSystemLangugage.equals("ru_RU") || mSystemLangugage.equals("th_TH") || mSystemLangugage.equals("tr_TR") || mSystemLangugage.equals("uk_UA") || mSystemLangugage.equals("vi_VN")){ mLanguage = new Locale(mSystemLocale.getLanguage(), mSystemLocale.getCountry()); }else { mLanguage = new Locale("en", "Us"); diff --git a/app/src/main/res/anim/fade_in_lang.xml b/app/src/main/res/anim/fade_in_lang.xml index d38048c0..04a4f737 100644 --- a/app/src/main/res/anim/fade_in_lang.xml +++ b/app/src/main/res/anim/fade_in_lang.xml @@ -1,7 +1,7 @@ diff --git a/app/src/main/res/anim/fade_out_lang.xml b/app/src/main/res/anim/fade_out_lang.xml index a66adda4..2cf3f175 100644 --- a/app/src/main/res/anim/fade_out_lang.xml +++ b/app/src/main/res/anim/fade_out_lang.xml @@ -1,7 +1,7 @@ + android:toAlpha="0.5" /> \ No newline at end of file diff --git a/app/src/main/res/custom-xml/generic/xml/gx_generic_tab_button.xml b/app/src/main/res/custom-xml/generic/xml/gx_generic_tab_button.xml index 4a5a4b44..c30d7c4c 100644 --- a/app/src/main/res/custom-xml/generic/xml/gx_generic_tab_button.xml +++ b/app/src/main/res/custom-xml/generic/xml/gx_generic_tab_button.xml @@ -1,34 +1,45 @@ - - - - - - - - + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + \ No newline at end of file diff --git a/app/src/main/res/custom-xml/history/xml/hx_menu_popup.xml b/app/src/main/res/custom-xml/history/xml/hx_menu_popup.xml index 0cf0ba79..aea4f3c1 100644 --- a/app/src/main/res/custom-xml/history/xml/hx_menu_popup.xml +++ b/app/src/main/res/custom-xml/history/xml/hx_menu_popup.xml @@ -12,10 +12,10 @@ android:color="@color/c_alert_background" /> + android:bottomLeftRadius="7dp" + android:bottomRightRadius="7dp" + android:topLeftRadius="7dp" + android:topRightRadius="7dp"/> #000000 5 @@ -33,10 +33,10 @@ android:color="@color/c_alert_background" /> + android:bottomLeftRadius="7dp" + android:bottomRightRadius="7dp" + android:topLeftRadius="7dp" + android:topRightRadius="7dp"/> - - - + + + - - - - + - + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - - - - + - + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - \ No newline at end of file + diff --git a/app/src/main/res/custom-xml/images/xml/ic_baseline_remove_red_eye.xml b/app/src/main/res/custom-xml/images/xml/ic_baseline_remove_red_eye.xml new file mode 100644 index 00000000..a3e222a2 --- /dev/null +++ b/app/src/main/res/custom-xml/images/xml/ic_baseline_remove_red_eye.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/layouts/alert/layout/popup_bridge_mail.xml b/app/src/main/res/layouts/alert/layout/popup_bridge_mail.xml index 49689f6d..eb60be30 100644 --- a/app/src/main/res/layouts/alert/layout/popup_bridge_mail.xml +++ b/app/src/main/res/layouts/alert/layout/popup_bridge_mail.xml @@ -22,6 +22,7 @@ android:layout_height="match_parent"> android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" + android:paddingEnd="15dp" android:paddingStart="15dp" android:text="@string/ALERT_BRIDGE_MAIL" android:textAlignment="textStart" diff --git a/app/src/main/res/layouts/alert/layout/popup_clear_bookmark.xml b/app/src/main/res/layouts/alert/layout/popup_clear_bookmark.xml index 4e7cf66b..1a07d6af 100644 --- a/app/src/main/res/layouts/alert/layout/popup_clear_bookmark.xml +++ b/app/src/main/res/layouts/alert/layout/popup_clear_bookmark.xml @@ -22,6 +22,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" + android:paddingEnd="15dp" android:paddingStart="15dp" android:text="@string/ALERT_CLEAR_BOOKMARK" android:textAlignment="textStart" @@ -37,11 +38,11 @@ android:layout_height="wrap_content" android:layout_marginTop="5dp" android:alpha="0.6" - android:paddingEnd="10dp" + android:paddingEnd="15dp" + android:paddingStart="15dp" android:textColor="@color/c_alert_text" android:text="@string/ALERT_CLEAR_BOOKMARK_INFO" android:textAlignment="textStart" - android:paddingStart="15dp" android:textSize="13sp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/app/src/main/res/layouts/alert/layout/popup_clear_history.xml b/app/src/main/res/layouts/alert/layout/popup_clear_history.xml index b8addcb1..612a3171 100644 --- a/app/src/main/res/layouts/alert/layout/popup_clear_history.xml +++ b/app/src/main/res/layouts/alert/layout/popup_clear_history.xml @@ -22,6 +22,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" + android:paddingEnd="15dp" android:paddingStart="15dp" android:text="@string/ALERT_CLEAR_HISTORY" android:textAlignment="textStart" @@ -36,10 +37,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="5dp" - android:paddingEnd="10dp" android:text="@string/ALERT_CLEAR_HISTORY_INFO" android:textColor="@color/c_alert_text" android:textAlignment="textStart" + android:paddingEnd="15dp" android:paddingStart="15dp" android:alpha="0.6" android:textSize="13sp" diff --git a/app/src/main/res/layouts/alert/layout/popup_data_cleared.xml b/app/src/main/res/layouts/alert/layout/popup_data_cleared.xml index d4e7b94f..a7ad1fad 100644 --- a/app/src/main/res/layouts/alert/layout/popup_data_cleared.xml +++ b/app/src/main/res/layouts/alert/layout/popup_data_cleared.xml @@ -22,6 +22,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" + android:paddingEnd="15dp" android:paddingStart="15dp" android:text="@string/ALERT_DATA_CLEARED" android:textAlignment="textStart" @@ -37,8 +38,8 @@ android:layout_height="wrap_content" android:layout_marginTop="5dp" android:alpha="0.6" + android:paddingEnd="15dp" android:paddingStart="15dp" - android:paddingEnd="10dp" android:text="@string/ALERT_DATA_CLEARED_INFO" android:textAlignment="textStart" android:textColor="@color/c_alert_text" diff --git a/app/src/main/res/layouts/alert/layout/popup_file_longpress.xml b/app/src/main/res/layouts/alert/layout/popup_file_longpress.xml index dceea927..f66be77d 100644 --- a/app/src/main/res/layouts/alert/layout/popup_file_longpress.xml +++ b/app/src/main/res/layouts/alert/layout/popup_file_longpress.xml @@ -22,6 +22,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" + android:paddingEnd="15dp" android:paddingStart="15dp" android:text="@string/ALERT_LONG_FILE" android:textAlignment="textStart" diff --git a/app/src/main/res/layouts/alert/layout/popup_find.xml b/app/src/main/res/layouts/alert/layout/popup_find.xml index a850f725..ccce2ccb 100644 --- a/app/src/main/res/layouts/alert/layout/popup_find.xml +++ b/app/src/main/res/layouts/alert/layout/popup_find.xml @@ -20,7 +20,7 @@ app:layout_constraintStart_toStartOf="parent"> + + + + + \ No newline at end of file diff --git a/app/src/main/res/layouts/alert/layout/popup_update_bridges.xml b/app/src/main/res/layouts/alert/layout/popup_update_bridges.xml index 8bbd58fe..cefd0e78 100644 --- a/app/src/main/res/layouts/alert/layout/popup_update_bridges.xml +++ b/app/src/main/res/layouts/alert/layout/popup_update_bridges.xml @@ -22,6 +22,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" + android:paddingEnd="15dp" android:paddingStart="15dp" android:text="@string/ALERT_UPDATE_BRIDGES" android:textAlignment="textStart" @@ -37,10 +38,10 @@ android:layout_height="wrap_content" android:layout_marginTop="5dp" android:alpha="0.6" - android:paddingEnd="10dp" + android:paddingEnd="15dp" + android:paddingStart="15dp" android:text="@string/ALERT_UPDATE_BRIDGES_INFO" android:textAlignment="textStart" - android:paddingStart="15dp" android:textColor="@color/c_alert_text" android:textSize="13sp" app:layout_constraintEnd_toEndOf="parent" diff --git a/app/src/main/res/layouts/alert/layout/popup_url_longpress.xml b/app/src/main/res/layouts/alert/layout/popup_url_longpress.xml index 20c1ea7d..05e28e72 100644 --- a/app/src/main/res/layouts/alert/layout/popup_url_longpress.xml +++ b/app/src/main/res/layouts/alert/layout/popup_url_longpress.xml @@ -22,9 +22,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" + android:paddingEnd="15dp" android:paddingStart="15dp" android:text="@string/ALERT_LONG_URL" - android:textAlignment="textStart" + android:gravity="start" android:textColor="@color/c_text_setting_heading_v2" android:textStyle="bold" app:layout_constraintStart_toStartOf="parent" diff --git a/app/src/main/res/layouts/alert/layout/popup_welcome.xml b/app/src/main/res/layouts/alert/layout/popup_welcome.xml index 3f4488f8..45f16b26 100644 --- a/app/src/main/res/layouts/alert/layout/popup_welcome.xml +++ b/app/src/main/res/layouts/alert/layout/popup_welcome.xml @@ -21,6 +21,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" + android:paddingEnd="15dp" android:paddingStart="15dp" android:text="@string/ALERT_WELCOME_MESSAGE" android:textAlignment="textStart" @@ -51,6 +52,7 @@ android:id="@+id/pDivider" android:layout_width="match_parent" android:layout_height="1dp" + android:layout_marginTop="10dp" android:background="@color/c_view_divier_background" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/app/src/main/res/layouts/bookmark/layout/bookmark_view.xml b/app/src/main/res/layouts/bookmark/layout/bookmark_view.xml index a59edd2e..5adfa16a 100644 --- a/app/src/main/res/layouts/bookmark/layout/bookmark_view.xml +++ b/app/src/main/res/layouts/bookmark/layout/bookmark_view.xml @@ -147,6 +147,7 @@ android:layout_width="0dp" android:layout_height="match_parent" android:layout_marginStart="0dp" + android:paddingEnd="15dp" android:layout_marginTop="0dp" android:layout_marginEnd="0dp" android:layout_weight="17" diff --git a/app/src/main/res/layouts/bridge/layout/bridge_settings_view.xml b/app/src/main/res/layouts/bridge/layout/bridge_settings_view.xml index cfa24afc..cca607ad 100644 --- a/app/src/main/res/layouts/bridge/layout/bridge_settings_view.xml +++ b/app/src/main/res/layouts/bridge/layout/bridge_settings_view.xml @@ -76,7 +76,7 @@ diff --git a/app/src/main/res/layouts/history/layout/history_view.xml b/app/src/main/res/layouts/history/layout/history_view.xml index 549ac155..943c3e4b 100644 --- a/app/src/main/res/layouts/history/layout/history_view.xml +++ b/app/src/main/res/layouts/history/layout/history_view.xml @@ -149,11 +149,13 @@ android:layout_marginTop="0dp" android:layout_marginEnd="0dp" android:layout_weight="17" + android:paddingEnd="15dp" android:background="@xml/gx_ripple_blue" android:textAllCaps="false" android:paddingStart="20dp" android:stateListAnimator="@null" android:text="@string/HISTORY_CLEAR" + android:textAlignment="textStart" android:textColor="@color/c_text_setting_heading" 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 e6159f4d..1518d91e 100644 --- a/app/src/main/res/layouts/home/layout/home_view.xml +++ b/app/src/main/res/layouts/home/layout/home_view.xml @@ -136,41 +136,26 @@ android:tint="@color/c_navigation_tint" android:visibility="gone" /> - - -