From 3733be16d928969d2fe214c685741649c6fd1065 Mon Sep 17 00:00:00 2001 From: sjg5509 Date: Thu, 26 Oct 2017 12:50:33 -0400 Subject: [PATCH 01/10] Alyssa's Commit --- .../apps/easyvsd_shell/MainActivity.java | 8 +- .../main/res/layout-land/activity_main.xml | 628 ++++++++++-------- app/src/main/res/layout/activity_main.xml | 627 +++++++++-------- 3 files changed, 702 insertions(+), 561 deletions(-) diff --git a/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java b/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java index 0182ac9..9efc601 100644 --- a/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java +++ b/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java @@ -136,7 +136,7 @@ public static String toString(Mode current){ ScrollView vActivities, vPages; LinearLayout activityLayout, pageLayout; NewDrawingView dvDrawing; - LinearLayout adminPanel; + GridLayout adminPanel; GridLayout navLayout; BackgroundHighlightButton btnCreateActivity, btnCreatePage, btnEditHotspot, btnCancelHotspot, btnDrawingMode, @@ -1045,7 +1045,7 @@ private void initAdminPanel(){ int buttonSize = Integer.parseInt(prefs.getString("nav_button_size", "250")); buttonSize = (int)Math.round(buttonSize * Math.max(metrics.widthPixels, metrics.heightPixels) / 2560f); int margin = (int)Math.round(buttonSize / 25f); - adminPanel = (LinearLayout)findViewById(R.id.adminPanel); + adminPanel = (GridLayout)findViewById(R.id.adminPanel); RelativeLayout.LayoutParams pnlLayoutParamsAdmin = (RelativeLayout.LayoutParams) adminPanel.getLayoutParams(); RelativeLayout.LayoutParams pnlLayoutParamsDestination = (RelativeLayout.LayoutParams)destinationView.getLayoutParams(); RelativeLayout.LayoutParams pnlLayoutParamsVideoSurface = (RelativeLayout.LayoutParams)videoSurface.getLayoutParams(); @@ -1162,11 +1162,11 @@ private void setUpAdminButton(Button toSet, int size, int margin){ private boolean videoPaused; private void setUpAdminPanel(boolean hotspotCreated, boolean hotspotSelected, boolean recording){ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(MainActivity.this); - boolean adminInNav = true; //prefs.getBoolean("admin_in_nav", true); + boolean adminInNav = false; //prefs.getBoolean("admin_in_nav", true); DisplayMetrics metrics = MainActivity.this.getResources().getDisplayMetrics(); boolean portrait = (MainActivity.this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) || (metrics.heightPixels > metrics.widthPixels); - int buttonSize = Integer.parseInt(prefs.getString("nav_button_size", "250")); + int buttonSize = Integer.parseInt(prefs.getString("nav_button_size", "200")); buttonSize = (int)Math.round(buttonSize * Math.max(metrics.widthPixels, metrics.heightPixels) / 2560f); if(navLayout == null){return;} ViewGroup.LayoutParams nP = navLayout.getLayoutParams(); diff --git a/app/src/main/res/layout-land/activity_main.xml b/app/src/main/res/layout-land/activity_main.xml index b98af28..2c99b7d 100644 --- a/app/src/main/res/layout-land/activity_main.xml +++ b/app/src/main/res/layout-land/activity_main.xml @@ -10,280 +10,358 @@ android:background="@color/black" android:id="@+id/MainLayout" tools:context=".MainActivity" > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +33 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 6000b86..394883a 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -12,288 +12,351 @@ android:id="@+id/MainLayout" tools:context="org.invotek.apps.easyvsd_shell.MainActivity"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:layout_height="match_parent"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 4d24f7ab23d52412fc28b981e2dec93c9b9fcfda Mon Sep 17 00:00:00 2001 From: sjg5509 Date: Tue, 31 Oct 2017 13:19:47 -0400 Subject: [PATCH 02/10] Tues Oct 31 changes --- .../apps/easyvsd_shell/MainActivity.java | 16 +- .../main/res/layout-land/activity_main.xml | 218 +++++++++--------- 2 files changed, 117 insertions(+), 117 deletions(-) diff --git a/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java b/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java index 9efc601..d680cca 100644 --- a/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java +++ b/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java @@ -182,10 +182,10 @@ protected void onResume() { loadUser(); vPages = (ScrollView)findViewById(R.id.ActivityPages_vertical); - if(vPages != null){ vPages.removeAllViews(); } + //if(vPages != null){ vPages.removeAllViews(); } hPages = (HorizontalScrollView)findViewById(R.id.ActivityPages_horizontal); - if(hPages != null){ hPages.removeAllViews(); } + //if(hPages != null){ hPages.removeAllViews(); } destinationView = (ImageView)findViewById(R.id.ActivityImage); videoSurface = (SurfaceView)findViewById(R.id.ActivityVideo); @@ -439,9 +439,9 @@ public void onConfigurationChanged(Configuration newConfig) { loadUser(); vPages = (ScrollView)findViewById(R.id.ActivityPages_vertical); - if(vPages != null){vPages.removeAllViews();} + //if(vPages != null){vPages.removeAllViews();} hPages = (HorizontalScrollView)findViewById(R.id.ActivityPages_horizontal); - if(hPages != null){ hPages.removeAllViews(); } + //if(hPages != null){ hPages.removeAllViews(); } setUpAdminPanel(false, false, false); } @@ -1863,7 +1863,7 @@ else if(currentState != State.HotspotEdit) //Log.i("PlayTalk", "setDrawingOptions: State=[" + String.valueOf(State.getValue(currentState)) + "]"); invalidateOptionsMenu(); if(drawing || erasing){ - if(hActivities != null) + /*if(hActivities != null) hActivities.setVisibility(View.GONE); if(vActivities != null){ vActivities.setVisibility(View.GONE); @@ -1874,7 +1874,7 @@ else if(currentState != State.HotspotEdit) if(vPages != null){ vPages.setVisibility(View.GONE); Log.d("vPages", "1045 vPages Gone"); - } + }*/ GridLayout drawingOptions = (GridLayout)findViewById(R.id.DrawingOptions); if(drawingOptions != null) drawingOptions.setVisibility(View.VISIBLE); @@ -1888,7 +1888,7 @@ else if(currentState != State.HotspotEdit) GridLayout drawingOptions = (GridLayout)findViewById(R.id.DrawingOptions); if(drawingOptions != null) drawingOptions.setVisibility(View.GONE); - if(hActivities != null) + /*if(hActivities != null) hActivities.setVisibility(View.VISIBLE); if(vActivities != null){ vActivities.setVisibility(View.VISIBLE); @@ -1899,7 +1899,7 @@ else if(currentState != State.HotspotEdit) if(vPages != null){ vPages.setVisibility(View.VISIBLE); Log.d("vPages", "1070 vPages Visible"); - } + }*/ } //Log.i("PlayTalk", "Main.setDrawingOptions: exit, State=[" + String.valueOf(State.getValue(currentState)) + "]" + // ", dvDrawing.Enabled=" + Boolean.toString(dvDrawing.isEnabled() )+ diff --git a/app/src/main/res/layout-land/activity_main.xml b/app/src/main/res/layout-land/activity_main.xml index 2c99b7d..f7a27c2 100644 --- a/app/src/main/res/layout-land/activity_main.xml +++ b/app/src/main/res/layout-land/activity_main.xml @@ -47,7 +47,7 @@ android:layout_row="5" android:background="@color/silver" android:fillViewport="true" - android:visibility="gone" /> + android:visibility="visible" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:visibility="visible" /> @@ -345,6 +239,112 @@ android:layout_column="0" android:layout_margin="10dp" android:visibility="gone" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + Date: Tue, 7 Nov 2017 12:36:40 -0500 Subject: [PATCH 03/10] Erik's fix for out of memory error --- .../invotek/apps/easyvsd_shell/BackgroundHighlightButton.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/org/invotek/apps/easyvsd_shell/BackgroundHighlightButton.java b/app/src/main/java/org/invotek/apps/easyvsd_shell/BackgroundHighlightButton.java index 8c2f4c9..296e853 100644 --- a/app/src/main/java/org/invotek/apps/easyvsd_shell/BackgroundHighlightButton.java +++ b/app/src/main/java/org/invotek/apps/easyvsd_shell/BackgroundHighlightButton.java @@ -529,6 +529,10 @@ public Bitmap decodeBitmapFromResource(Resources res, int resId, int reqWidth, i options.inInputShareable = true; options.inJustDecodeBounds = false; ret = BitmapFactory.decodeResource(res, resId, options); + + if(reqWidth > 0 && reqHeight > 0) + ret = Bitmap.createScaledBitmap(ret, reqWidth, reqHeight, true); + }catch(Exception e){ ret = null; }finally{ From a10eb658cffe58206995c83db2148028f3e8a441 Mon Sep 17 00:00:00 2001 From: sjg5509 Date: Thu, 9 Nov 2017 12:19:42 -0500 Subject: [PATCH 04/10] -forces all lanscape Mode -hides undo / redo buttons -admin panel is visible / invisible, not gone --- app/src/main/AndroidManifest.xml | 1 + .../apps/easyvsd_shell/MainActivity.java | 40 +++++++++++-------- .../main/res/layout-land/activity_main.xml | 6 ++- 3 files changed, 28 insertions(+), 19 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 18977d2..99ad35f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -11,6 +11,7 @@ android:theme="@style/AppTheme"> = 0 && isVideo && @@ -1538,8 +1543,8 @@ private void setUpAdminPanel(boolean hotspotCreated, boolean hotspotSelected, bo adminPanel.removeView(btnEndRecording); adminPanel.removeView(btnDrawingMode); adminPanel.removeView(btnNavMode); - adminPanel.removeView(btnUndo); - adminPanel.removeView(btnRedo); + //adminPanel.removeView(btnUndo); + //adminPanel.removeView(btnRedo); adminPanel.removeView(btnVideoRestart); adminPanel.removeView(btnVideoStepBack); adminPanel.removeView(btnVideoPlay); @@ -1658,7 +1663,8 @@ private void setUpAdminPanel(boolean hotspotCreated, boolean hotspotSelected, bo currentState == State.Navigate); Log.i("setUpAdminPanel", "showVideoButtons=[" + String.valueOf(showVideoButtons) + "] enableVideoControlHotspots=[" + String.valueOf(!prefs.getBoolean("enableVideoControlHotspots", false)) + "]"); - adminPanel.setVisibility((((currentMode == Mode.Create) || (currentMode == Mode.AdvancedCreate)) && !adminInNav) ? View.VISIBLE : View.GONE); + ////////////////////////////////////////////////////////////////////////////////////////////////////////// + adminPanel.setVisibility((((currentMode == Mode.Create) || (currentMode == Mode.AdvancedCreate)) && !adminInNav) ? View.VISIBLE : View.INVISIBLE); if(currentMode == Mode.iSnap){ btnCreateActivity.setVisibility(View.GONE); btnCreatePage.setVisibility(View.VISIBLE); @@ -1669,8 +1675,8 @@ private void setUpAdminPanel(boolean hotspotCreated, boolean hotspotSelected, bo btnStartRecording.setVisibility(View.GONE); btnEndRecording.setVisibility(View.GONE); btnDeleteHotspot.setVisibility(View.GONE); - btnUndo.setVisibility(View.GONE); - btnRedo.setVisibility(View.GONE); + //btnUndo.setVisibility(View.GONE); + //btnRedo.setVisibility(View.GONE); btnVideoRestart.setVisibility(View.GONE); btnVideoStepBack.setVisibility(View.GONE); btnVideoPlay.setVisibility(View.GONE); @@ -1694,10 +1700,10 @@ private void setUpAdminPanel(boolean hotspotCreated, boolean hotspotSelected, bo btnDeleteHotspot.setVisibility(((currentState == State.HotspotEdit) && hotspotSelected && !recording) ? View.VISIBLE : View.GONE); //btnUndo.setVisibility(View.VISIBLE); - btnUndo.setVisibility(((currentState == State.Drawing) || (currentState == State.Erasing)) && - (dvDrawing != null) && dvDrawing.canUndo() ? View.VISIBLE : View.GONE); - btnRedo.setVisibility(((currentState == State.Drawing) || (currentState == State.Erasing)) && - (dvDrawing != null) && dvDrawing.canRedo() ? View.VISIBLE : View.GONE); + //btnUndo.setVisibility(((currentState == State.Drawing) || (currentState == State.Erasing)) && + // (dvDrawing != null) && dvDrawing.canUndo() ? View.VISIBLE : View.GONE); + //btnRedo.setVisibility(((currentState == State.Drawing) || (currentState == State.Erasing)) && + // (dvDrawing != null) && dvDrawing.canRedo() ? View.VISIBLE : View.GONE); btnVideoRestart.setVisibility(showVideoButtons && videoPaused && pauseLocation > 0 ? View.VISIBLE : View.GONE); btnVideoStepBack.setVisibility(showVideoButtons && videoPaused && pauseLocation > 0 ? View.VISIBLE : View.GONE); btnVideoPlay.setVisibility(showVideoButtons && videoPaused && pauseLocation < 2 ? View.VISIBLE : View.GONE); diff --git a/app/src/main/res/layout-land/activity_main.xml b/app/src/main/res/layout-land/activity_main.xml index f7a27c2..f2de0b7 100644 --- a/app/src/main/res/layout-land/activity_main.xml +++ b/app/src/main/res/layout-land/activity_main.xml @@ -32,6 +32,7 @@ android:layout_width="145dp" android:layout_height="match_parent" android:background="@color/dimgray" + android:animateLayoutChanges="true" android:columnCount="4" android:rowCount="6" android:visibility="visible" @@ -45,6 +46,7 @@ android:layout_column="0" android:layout_marginBottom="10dp" android:layout_row="5" + android:animateLayoutChanges="true" android:background="@color/silver" android:fillViewport="true" android:visibility="visible" /> @@ -78,7 +80,7 @@ android:contentDescription="@string/activity_image" android:scaleType="fitStart" android:visibility="invisible" /> -33 + + android:visibility="visible"> Date: Tue, 14 Nov 2017 13:11:36 -0500 Subject: [PATCH 05/10] changing setupadminpanel --- .../main/java/org/invotek/apps/easyvsd_shell/MainActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java b/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java index 03507b9..5de4dd0 100644 --- a/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java +++ b/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java @@ -414,7 +414,7 @@ public void onLayoutChange(View v, int left, int top, left + "," + top + "," + right + "," + bottom + "] old=[" + oldLeft + "," + oldTop + "," + oldRight + "," + oldBottom + "]"); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(MainActivity.this); - if((prefs.getBoolean("allow_hotspot_text", false)) && (bottom > oldBottom)) + if(bottom > oldBottom) setUpAdminPanel(false, false, false); }}); From 899fe6c4b09c0de1ae258546b8737e704a1b0e6e Mon Sep 17 00:00:00 2001 From: sjg5509 Date: Tue, 14 Nov 2017 13:17:48 -0500 Subject: [PATCH 06/10] changing scrollLayout from a RelativeLayout to a LinearLayout --- .../apps/easyvsd_shell/MainActivity.java | 28 ++++++++++++------- .../main/res/layout-land/activity_main.xml | 15 +++++----- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java b/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java index 5de4dd0..76335ef 100644 --- a/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java +++ b/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java @@ -138,6 +138,7 @@ public static String toString(Mode current){ NewDrawingView dvDrawing; GridLayout adminPanel; GridLayout navLayout; + //HorizontalScrollView MainScrollView; BackgroundHighlightButton btnCreateActivity, btnCreatePage, btnEditHotspot, btnCancelHotspot, btnDrawingMode, btnNavMode, btnStartRecording, btnEndRecording, btnDeleteHotspot, /*btnUndo, btnRedo,*/ btnVideoRestart, @@ -414,7 +415,7 @@ public void onLayoutChange(View v, int left, int top, left + "," + top + "," + right + "," + bottom + "] old=[" + oldLeft + "," + oldTop + "," + oldRight + "," + oldBottom + "]"); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(MainActivity.this); - if(bottom > oldBottom) + if((prefs.getBoolean("allow_hotspot_text", false)) && (bottom > oldBottom)) setUpAdminPanel(false, false, false); }}); @@ -822,7 +823,7 @@ private BackgroundHighlightButton getButton(int activityIndex, int pageIndex, bo button.setId((isActivity ? minimumActivityId + activityIndex : minimumPageId + pageIndex)); DisplayMetrics metrics = MainActivity.this.getResources().getDisplayMetrics(); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(MainActivity.this); - int buttonSize = Integer.parseInt(prefs.getString("nav_button_size", "250")); + int buttonSize = Integer.parseInt(prefs.getString("nav_button_size", "250"));//Button on left size buttonSize = (int)Math.round(buttonSize * Math.max(metrics.widthPixels, metrics.heightPixels) / 2560f); Log.d("ActivityPage", "buttonSize=[" + String.valueOf(buttonSize) + "]"); int margin = (int)Math.round(buttonSize / 25f); @@ -1048,12 +1049,14 @@ private void initAdminPanel(){ buttonSize = (int)Math.round(buttonSize * Math.max(metrics.widthPixels, metrics.heightPixels) / 2560f); int margin = (int)Math.round(buttonSize / 25f); adminPanel = (GridLayout)findViewById(R.id.adminPanel); - RelativeLayout.LayoutParams pnlLayoutParamsAdmin = (RelativeLayout.LayoutParams) adminPanel.getLayoutParams(); - RelativeLayout.LayoutParams pnlLayoutParamsDestination = (RelativeLayout.LayoutParams)destinationView.getLayoutParams(); - RelativeLayout.LayoutParams pnlLayoutParamsVideoSurface = (RelativeLayout.LayoutParams)videoSurface.getLayoutParams(); - RelativeLayout.LayoutParams pnlLayoutParamsDrawings = (RelativeLayout.LayoutParams)dvDrawing.getLayoutParams(); - if(getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE){ - if(onTopOfVSD){ + LinearLayout.LayoutParams pnlLayoutParamsAdmin = (LinearLayout.LayoutParams) adminPanel.getLayoutParams(); + LinearLayout.LayoutParams pnlLayoutParamsDestination = (LinearLayout.LayoutParams)destinationView.getLayoutParams(); + LinearLayout.LayoutParams pnlLayoutParamsVideoSurface = (LinearLayout.LayoutParams)videoSurface.getLayoutParams(); + LinearLayout.LayoutParams pnlLayoutParamsDrawings = (LinearLayout.LayoutParams)dvDrawing.getLayoutParams(); + + + if(getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE){ + /*if(onTopOfVSD){ pnlLayoutParamsDestination.addRule(RelativeLayout.LEFT_OF, 0); pnlLayoutParamsVideoSurface.addRule(RelativeLayout.LEFT_OF, 0); pnlLayoutParamsDrawings.addRule(RelativeLayout.LEFT_OF, 0); @@ -1061,9 +1064,10 @@ private void initAdminPanel(){ pnlLayoutParamsDestination.addRule(RelativeLayout.LEFT_OF, R.id.adminPanel); pnlLayoutParamsVideoSurface.addRule(RelativeLayout.LEFT_OF, R.id.adminPanel); pnlLayoutParamsDrawings.addRule(RelativeLayout.LEFT_OF, R.id.adminPanel); - } + }*/ pnlLayoutParamsAdmin.width = (buttonSize + (margin * 4)); }else{ + /* if(onTopOfVSD){ pnlLayoutParamsDestination.addRule(RelativeLayout.ABOVE, 0); pnlLayoutParamsVideoSurface.addRule(RelativeLayout.ABOVE, 0); @@ -1073,13 +1077,16 @@ private void initAdminPanel(){ pnlLayoutParamsVideoSurface.addRule(RelativeLayout.ABOVE, R.id.adminPanel); pnlLayoutParamsDrawings.addRule(RelativeLayout.ABOVE, R.id.adminPanel); } + */ pnlLayoutParamsAdmin.height = (buttonSize + (margin * 4)); } + adminPanel.setLayoutParams(pnlLayoutParamsAdmin); destinationView.setLayoutParams(pnlLayoutParamsDestination); videoSurface.setLayoutParams(pnlLayoutParamsVideoSurface); dvDrawing.setLayoutParams(pnlLayoutParamsDrawings); + btnCreateActivity = (BackgroundHighlightButton)findViewById(R.id.btn_newActivity); btnCreateActivity.setForegroundImageResource(this, R.drawable.new_activity_circle, true); //realImages ? R.drawable.camera_me2 : R.drawable.take_picture, true); btnCreateActivity.setOnClickListener(this); @@ -1170,7 +1177,7 @@ private void setUpAdminPanel(boolean hotspotCreated, boolean hotspotSelected, bo DisplayMetrics metrics = MainActivity.this.getResources().getDisplayMetrics(); boolean portrait = (MainActivity.this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) || (metrics.heightPixels > metrics.widthPixels); - int buttonSize = Integer.parseInt(prefs.getString("nav_button_size", "200")); + int buttonSize = Integer.parseInt(prefs.getString("nav_button_size", "250")); buttonSize = (int)Math.round(buttonSize * Math.max(metrics.widthPixels, metrics.heightPixels) / 2560f); if(navLayout == null){return;} ViewGroup.LayoutParams nP = navLayout.getLayoutParams(); @@ -1218,6 +1225,7 @@ private void setUpAdminPanel(boolean hotspotCreated, boolean hotspotSelected, bo int newDimen = portrait ? navLayout.getWidth() : navLayout.getHeight(); GridLayout.LayoutParams params; if(adminInNav && ((currentMode == Mode.Create) || (currentMode == Mode.AdvancedCreate) || (currentMode == Mode.iSnap))){ + //MainScrollView.onTouchEvent(false); if(adminPanel.getChildCount() > 0){ adminPanel.removeView(btnCreateActivity); adminPanel.removeView(btnCreatePage); diff --git a/app/src/main/res/layout-land/activity_main.xml b/app/src/main/res/layout-land/activity_main.xml index f2de0b7..1bcf037 100644 --- a/app/src/main/res/layout-land/activity_main.xml +++ b/app/src/main/res/layout-land/activity_main.xml @@ -21,8 +21,9 @@ android:layout_alignParentLeft="true" android:layout_alignParentStart="true"> - @@ -31,13 +32,13 @@ android:id="@+id/NavOptions" android:layout_width="145dp" android:layout_height="match_parent" - android:background="@color/dimgray" + android:layout_alignParentLeft="true" + android:layout_alignParentTop="true" android:animateLayoutChanges="true" + android:background="@color/dimgray" android:columnCount="4" android:rowCount="6" - android:visibility="visible" - android:layout_alignParentTop="true" - android:layout_alignParentLeft="true"> + android:visibility="visible"> - + From ca045b3f935d0f614dace5888ece48b63029f5af Mon Sep 17 00:00:00 2001 From: sjg5509 Date: Tue, 14 Nov 2017 15:50:40 -0500 Subject: [PATCH 07/10] Removing layout-large and layout-large-land to fix the AdminPanel casting error because AdminPanel is now a GridLayout and not a LinearLayout. --- .../res/layout-large-land/activity_main.xml | 289 ----------------- .../main/res/layout-large/activity_main.xml | 299 ------------------ 2 files changed, 588 deletions(-) delete mode 100644 app/src/main/res/layout-large-land/activity_main.xml delete mode 100644 app/src/main/res/layout-large/activity_main.xml diff --git a/app/src/main/res/layout-large-land/activity_main.xml b/app/src/main/res/layout-large-land/activity_main.xml deleted file mode 100644 index b98af28..0000000 --- a/app/src/main/res/layout-large-land/activity_main.xml +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout-large/activity_main.xml b/app/src/main/res/layout-large/activity_main.xml deleted file mode 100644 index 6000b86..0000000 --- a/app/src/main/res/layout-large/activity_main.xml +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 88e0a7ba7d47bd002899213df51878564b044671 Mon Sep 17 00:00:00 2001 From: sjg5509 Date: Tue, 14 Nov 2017 15:57:36 -0500 Subject: [PATCH 08/10] re-doing setupAdminPanel line change --- .../main/java/org/invotek/apps/easyvsd_shell/MainActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java b/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java index 76335ef..eaf4810 100644 --- a/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java +++ b/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java @@ -415,7 +415,7 @@ public void onLayoutChange(View v, int left, int top, left + "," + top + "," + right + "," + bottom + "] old=[" + oldLeft + "," + oldTop + "," + oldRight + "," + oldBottom + "]"); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(MainActivity.this); - if((prefs.getBoolean("allow_hotspot_text", false)) && (bottom > oldBottom)) + if(bottom > oldBottom) setUpAdminPanel(false, false, false); }}); From 3c6b6d76c26bea3145a1761fdfb2a3a58ef087de Mon Sep 17 00:00:00 2001 From: Joseph Miscioscia Date: Tue, 28 Nov 2017 14:14:43 -0500 Subject: [PATCH 09/10] fixed animations --- .../apps/easyvsd_shell/MainActivity.java | 19 +++-- .../main/res/layout-land/activity_main.xml | 80 +++++++++---------- 2 files changed, 51 insertions(+), 48 deletions(-) diff --git a/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java b/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java index eaf4810..a3d13c5 100644 --- a/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java +++ b/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java @@ -147,7 +147,7 @@ public static String toString(Mode current){ Drawing currentDrawing; int[][] userData = {{R.drawable.car_exterior, R.drawable.car_interior}, {R.drawable.lake_house}, - {R.drawable.dog_group, R.drawable.standing_aussie, R.drawable.running_aussie}}; + {R.drawable.dog_group, R.drawable.standing_aussie}}; int currentPage = -1; int currentActivity = -1; private int minimumPageId = 200; @@ -910,9 +910,9 @@ private void showImageView(View clickedView){ Rect visibleDestRect = new Rect(); clickedView.getGlobalVisibleRect(visibleSourceRect); destinationView.getGlobalVisibleRect(visibleDestRect); - //Log.i("PlayTalk", "Main.showImageView entry" + - // ", SourceRect=" + visibleSourceRect.toShortString() + - // ", DestRect=" + visibleDestRect.toShortString() ); + Log.i("PlayTalk", "Main.showImageView entry" + + ", SourceRect=" + visibleSourceRect.toShortString() + + ", DestRect=" + visibleDestRect.toShortString() ); float visibleSourceWidth = visibleSourceRect.width() > 0 ? (float)visibleSourceRect.width() : (float)1; float visibleSourceHeight = visibleSourceRect.height() > 0 ? (float)visibleSourceRect.height() : (float)1; heightDividedWidth = visibleSourceHeight/ visibleSourceWidth; @@ -927,9 +927,9 @@ private void showImageView(View clickedView){ visibleDestRect.left += change/2; visibleDestRect.right -= change/2; } - //Log.i("PlayTalk", "Main.showImageView exit" + - // ", SourceRect=" + visibleSourceRect.toShortString() + - // ", DestRect=" + visibleDestRect.toShortString() ); + Log.i("PlayTalk", "Main.showImageView exit" + + ", SourceRect=" + visibleSourceRect.toShortString() + + ", DestRect=" + visibleDestRect.toShortString() ); Bitmap toShow = ((BackgroundHighlightButton)clickedView).getButtonBitmap(); @@ -946,6 +946,11 @@ public void setActiveImage(){ } else{ int[] dimens = getImageSize(); + // int[] dimens; + //dimens = new int[2]; + // dimens[0] = 45; + //[0] = 45; + // Load the still image for this page into destinationView (ImageView) ImageDecoder decoder = new ImageDecoder(); destinationView.setImageBitmap(decoder.getImage(this, diff --git a/app/src/main/res/layout-land/activity_main.xml b/app/src/main/res/layout-land/activity_main.xml index 1bcf037..7a278da 100644 --- a/app/src/main/res/layout-land/activity_main.xml +++ b/app/src/main/res/layout-land/activity_main.xml @@ -15,17 +15,18 @@ android:id="@+id/MainScrollView" android:layout_width="match_parent" android:layout_height="match_parent" - android:fillViewport="true" - android:visibility="visible" - android:layout_alignParentTop="true" android:layout_alignParentLeft="true" - android:layout_alignParentStart="true"> + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + android:fillViewport="true" + android:visibility="visible"> + + android:visibility="visible" /> @@ -94,161 +95,161 @@ android:layout_height="match_parent" android:layout_alignParentRight="true" android:background="@color/dimgray" - android:rowCount="17" android:columnCount="1" android:orientation="vertical" + android:rowCount="17" android:visibility="visible"> - - - - + + + + + From ae6b856cf49d35388f9b91ac0b7120445b3f6446 Mon Sep 17 00:00:00 2001 From: Joseph Miscioscia Date: Tue, 5 Dec 2017 12:29:20 -0500 Subject: [PATCH 10/10] Fixed animations --- .idea/misc.xml | 15 +-------------- .idea/vcs.xml | 6 ++++++ app/build.gradle | 2 +- .../apps/easyvsd_shell/MainActivity.java | 2 ++ app/src/main/res/layout-land/activity_main.xml | 4 ++-- app/src/main/res/layout/activity_main.xml | 18 ++++++++++-------- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 8 files changed, 25 insertions(+), 28 deletions(-) create mode 100644 .idea/vcs.xml diff --git a/.idea/misc.xml b/.idea/misc.xml index 7158618..cc72de3 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,8 +1,5 @@ - - - - - - - - - - - - - - + diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 37f35ff..bf0896b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 25 - buildToolsVersion "25.0.3" + buildToolsVersion '26.0.2' defaultConfig { applicationId "org.invotek.apps.easyvsd_shell" minSdkVersion 15 diff --git a/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java b/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java index a3d13c5..66d5e41 100644 --- a/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java +++ b/app/src/main/java/org/invotek/apps/easyvsd_shell/MainActivity.java @@ -641,9 +641,11 @@ public void onClick(DialogInterface dialog, int which) { break; case R.id.btn_drawingMode: setDrawingOptions(true, false); + ((LockableHorizontalScrollView)findViewById(R.id.MainScrollView)).setScrollingEnabled(false); break; case R.id.btn_navMode: setDrawingOptions(false, false); + ((LockableHorizontalScrollView)findViewById(R.id.MainScrollView)).setScrollingEnabled(true); loadUser(); loadGroup(); break; diff --git a/app/src/main/res/layout-land/activity_main.xml b/app/src/main/res/layout-land/activity_main.xml index 7a278da..8589102 100644 --- a/app/src/main/res/layout-land/activity_main.xml +++ b/app/src/main/res/layout-land/activity_main.xml @@ -11,7 +11,7 @@ android:id="@+id/MainLayout" tools:context=".MainActivity" > - - + - - + + + + diff --git a/build.gradle b/build.gradle index c2eea8e..c33a638 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.3' + classpath 'com.android.tools.build:gradle:3.0.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index cbbecb0..acc8e23 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Sep 20 08:18:13 CDT 2017 +#Thu Nov 16 11:25:06 EST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip