Skip to content

Commit

Permalink
hide the buttons before fully started
Browse files Browse the repository at this point in the history
  • Loading branch information
quaap committed Aug 29, 2018
1 parent e110b1a commit 886e2e8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
19 changes: 9 additions & 10 deletions app/src/main/java/com/quaap/launchtime/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,11 @@ protected void onCreate(Bundle savedInstanceState) {

mActionMenu = new ActionMenu(this);

mStyle = GlobState.getStyle(this);

//Load resources and init the form members
initUI();

mIconSheetHolder.setOnDragListener(iconSheetDropRedirector);

mIconsArea.setOnDragListener(iconSheetDropRedirector);

mSearchBox = new SearchBox(this, mIconSheetScroller);

mLaunchApp = new LaunchApp(this);
Expand Down Expand Up @@ -600,7 +597,6 @@ private void init(boolean progress) {
mCategory = mPrefs.getString("category", getTopCategory());
latestCategory = mCategory;

mStyle = GlobState.getStyle(this);
GlobState.getBadger(this).setBadgerCountChangeListener(this);

mAppPreferences.registerOnSharedPreferenceChangeListener(this);
Expand Down Expand Up @@ -3793,6 +3789,10 @@ private void initUI() {
mOpenPrefsButton = findViewById(R.id.btn_prefs);
mOpenPrefs2Button = findViewById(R.id.btn_prefs2);

itemClickedAnim = new ScaleAnimation(.85f,1,.85f,1,Animation.RELATIVE_TO_SELF,.5f,Animation.RELATIVE_TO_SELF,.5f);
itemClickedAnim.setDuration(200);
itemClickedAnim.setInterpolator(new AccelerateDecelerateInterpolator());



mLinkDropzone.setOnDragListener(mMainDragListener);
Expand Down Expand Up @@ -3887,9 +3887,9 @@ public void onPositionChanged(float percentUp, float percentDown, int distFromTo
mIconSheetScroller.setHSwipeListener(mHSwipeListener);
mCategoriesScroller.setHSwipeListener(mHSwipeListener);

itemClickedAnim = new ScaleAnimation(.85f,1,.85f,1,Animation.RELATIVE_TO_SELF,.5f,Animation.RELATIVE_TO_SELF,.5f);
itemClickedAnim.setDuration(200);
itemClickedAnim.setInterpolator(new AccelerateDecelerateInterpolator());
mIconSheetHolder.setOnDragListener(iconSheetDropRedirector);

mIconsArea.setOnDragListener(iconSheetDropRedirector);

}

Expand Down Expand Up @@ -3920,7 +3920,6 @@ public static void openSettings(Activity activity) {
public void showButtonBar(boolean makevisible, boolean hideCats) {
if (mChildLock) return;


// StackTraceElement from = Thread.currentThread().getStackTrace()[3];
//
// Log.d(TAG,"showButtonBar(" + makevisible + ", " + hideCats + ") from " + from.getMethodName() + " line " + from.getLineNumber());
Expand All @@ -3929,7 +3928,7 @@ public void showButtonBar(boolean makevisible, boolean hideCats) {
mActionCategory = mCategory;
showHiddenCategories();
if (!mActionMenu.useExtraActions()) {
if (mCategory.equals(Categories.CAT_SEARCH)) {
if (mCategory!=null && mCategory.equals(Categories.CAT_SEARCH)) {
mSortCategoryButton.setVisibility(View.INVISIBLE);
mEditWidgetsButton.setVisibility(View.INVISIBLE);
} else {
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/quaap/launchtime/ui/Style.java
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ public void onAnimationCancel(Animator animation) {
lp.topMargin=2;
lp.bottomMargin=2;
} else {
lp.topMargin=4;
lp.bottomMargin=5;
lp.topMargin=3;
lp.bottomMargin=3;
}

categoryTab.setLayoutParams(lp);
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
android:gravity="end"
android:padding="1dp"
android:src="@android:drawable/arrow_up_float"
android:visibility="gone"
tools:ignore="RtlHardcoded" />


Expand Down Expand Up @@ -121,7 +122,8 @@
android:contentDescription="@string/config"
android:focusable="true"
android:gravity="end"
android:src="@android:drawable/arrow_up_float" />
android:src="@android:drawable/arrow_up_float"
android:visibility="gone" />

<ImageView
android:id="@+id/hide_buttonbar"
Expand Down

0 comments on commit 886e2e8

Please sign in to comment.