aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Bird <sbird@cyngn.com>2015-06-25 15:26:07 -0700
committerSteve Kondik <steve@cyngn.com>2016-11-02 17:49:38 -0700
commit2050a4223b852ce19076f6bf162cb025e6d98ced (patch)
tree6750aa3e22d04001bd05981179a7405214d8d961
parent7eca05f3da4975683d93cd2c07d19021e2e60e93 (diff)
downloadandroid_packages_apps_CMFileManager-2050a4223b852ce19076f6bf162cb025e6d98ced.tar.gz
android_packages_apps_CMFileManager-2050a4223b852ce19076f6bf162cb025e6d98ced.tar.bz2
android_packages_apps_CMFileManager-2050a4223b852ce19076f6bf162cb025e6d98ced.zip
Intro: update pagination, show storage provider intro screen
NavDrawer: add manage storage sources Change-Id: If31846100b30cd8805d904278f3cb105c41d1cea
-rw-r--r--res/drawable/cloud_line.xml36
-rw-r--r--res/drawable/flying_folder.xml42
-rw-r--r--res/drawable/ic_object_move.xml28
-rw-r--r--res/drawable/ic_oobe_back.xml26
-rw-r--r--res/drawable/ic_oobe_finish.xml27
-rw-r--r--res/drawable/ic_oobe_forward.xml27
-rw-r--r--res/drawable/rectangle.xml8
-rw-r--r--res/layout/welcome.xml88
-rw-r--r--res/menu/navigation.xml3
-rw-r--r--res/values/colors.xml3
-rw-r--r--res/values/strings.xml11
-rwxr-xr-xsrc/com/cyanogenmod/filemanager/activities/MainActivity.java7
-rwxr-xr-xsrc/com/cyanogenmod/filemanager/activities/WelcomeActivity.java34
-rw-r--r--src/com/cyanogenmod/filemanager/adapters/WelcomeAdapter.java4
-rwxr-xr-xsrc/com/cyanogenmod/filemanager/controllers/NavigationDrawerController.java4
15 files changed, 317 insertions, 31 deletions
diff --git a/res/drawable/cloud_line.xml b/res/drawable/cloud_line.xml
new file mode 100644
index 00000000..abc7b5a7
--- /dev/null
+++ b/res/drawable/cloud_line.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2015 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="360dp"
+ android:height="120dp"
+ android:viewportWidth="360"
+ android:viewportHeight="120">
+
+ <group>
+ <path
+ android:fillColor="#1E88E5"
+ android:pathData="M396,0c-17.6,0-32.2,12.6-35.4,29.2C346.4,20.8,329.8,16,312,16c-27.1,0-51.6,11.3-69.1,29.4
+c-5.5-3.4-12-5.4-18.9-5.4c-11,0-20.9,4.9-27.5,12.7C188,44.8,176.6,40,164,40c-7.4,0-14.5,1.7-20.7,4.7
+C139.9,28.3,125.4,16,108,16c-7.8,0-15.1,2.5-21,6.8C82.8,2.9,65.1-12,44-12v120h360V0.9C401.4,0.3,398.8,0,396,0z" />
+ <path
+ android:fillColor="#2196F3"
+ android:pathData="M404,100V42.2c-5.1-1.4-10.5-2.2-16-2.2c-20.1,0-37.9,9.9-48.8,25.1
+c-2.3-0.5-4.8-0.7-7.2-0.7c-15.9,0-29.5,10.4-34.2,24.7c-9.4-3.1-19.4-4.7-29.8-4.7c-10.7,0-20.9,1.7-30.5,5
+c-8.6-8-20.1-13-32.8-13c-8.8,0-17,2.4-24,6.5c-8.5-13.5-23.5-22.5-40.6-22.5c-11.4,0-21.9,4-30.1,10.6C98.7,45.7,73.4,28,44,28v80
+h360V100L404,100z" />
+ </group>
+</vector> \ No newline at end of file
diff --git a/res/drawable/flying_folder.xml b/res/drawable/flying_folder.xml
new file mode 100644
index 00000000..5c44e642
--- /dev/null
+++ b/res/drawable/flying_folder.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2015 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="272dp"
+ android:height="96dp"
+ android:viewportWidth="272"
+ android:viewportHeight="96">
+
+ <group>
+ <path
+ android:fillColor="#BBDEFB"
+ android:pathData="M180,10.1h-37.1l-5.8-8.4c-0.7-1.1-2-1.7-3.3-1.7H92c-2.2,0-4,1.8-4,4v16c0-2.2,1.8-4,4-4h88
+c2.2,0,4,1.8,4,4v-5.9C184,11.9,182.2,10.1,180,10.1z" />
+ <path
+ android:fillColor="#90CAF9"
+ android:pathData="M180,16H92c-2.2,0-4,1.8-4,4v72c0,2.2,1.8,4,4,4h88c2.2,0,4-1.8,4-4V20
+C184,17.8,182.2,16,180,16z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M0,36L0,36c0,4.4,3.6,8,8,8h39c0.6,0,1,0.4,1,1l0,0c0,0.6-0.4,1-1,1H16v0c0,4.4,3.6,8,8,8h31
+c0.6,0,1,0.4,1,1l0,0c0,0.6-0.4,1-1,1H32v0c0,4.4,3.6,8,8,8h30c1.1,0,2-0.9,2-2v-2c0-13.3-10.7-24-24-24H0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M272,36L272,36c0,4.4-3.6,8-8,8h-39c-0.6,0-1,0.4-1,1l0,0c0,0.6,0.4,1,1,1h31v0
+c0,4.4-3.6,8-8,8h-31c-0.6,0-1,0.4-1,1l0,0c0,0.6,0.4,1,1,1h23v0c0,4.4-3.6,8-8,8h-30c-1.1,0-2-0.9-2-2v-2c0-13.3,10.7-24,24-24
+H272z" />
+ </group>
+</vector> \ No newline at end of file
diff --git a/res/drawable/ic_object_move.xml b/res/drawable/ic_object_move.xml
new file mode 100644
index 00000000..524ccdf4
--- /dev/null
+++ b/res/drawable/ic_object_move.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2015 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M12,6h8c1.1,0,2,0.9,2,2v10
+c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2L2,6c0-1.1,0.9-2,2-2h6L12,6z
+M20,13l-6-5v3H9v4h5v3L20,13z" />
+</vector> \ No newline at end of file
diff --git a/res/drawable/ic_oobe_back.xml b/res/drawable/ic_oobe_back.xml
new file mode 100644
index 00000000..cbf961f2
--- /dev/null
+++ b/res/drawable/ic_oobe_back.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2015 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M15.41 7.41l-1.41-1.41-6 6 6 6 1.41-1.41-4.58-4.59z" />
+</vector> \ No newline at end of file
diff --git a/res/drawable/ic_oobe_finish.xml b/res/drawable/ic_oobe_finish.xml
new file mode 100644
index 00000000..75534a10
--- /dev/null
+++ b/res/drawable/ic_oobe_finish.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2015 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="40dp"
+ android:height="40dp"
+ android:viewportWidth="40"
+ android:viewportHeight="40">
+
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M40,20c0,11-9,20-20,20S0,31,0,20S9,0,20,0S40,9,40,20z
+M17,24.2L12.8,20l-1.4,1.4L17,27l12-12l-1.4-1.4 L17,24.2z" />
+</vector> \ No newline at end of file
diff --git a/res/drawable/ic_oobe_forward.xml b/res/drawable/ic_oobe_forward.xml
new file mode 100644
index 00000000..2a6dcae7
--- /dev/null
+++ b/res/drawable/ic_oobe_forward.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2015 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="40dp"
+ android:height="40dp"
+ android:viewportWidth="40"
+ android:viewportHeight="40">
+
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M40,20c0,11-9,20-20,20S0,31,0,20S9,0,20,0S40,9,40,20z
+M12,21h12.2l-5.6,5.6L20,28l8-8l-8-8l-1.4,1.4 l5.6,5.6H12V21z" />
+</vector> \ No newline at end of file
diff --git a/res/drawable/rectangle.xml b/res/drawable/rectangle.xml
index e8e862d2..4d552453 100644
--- a/res/drawable/rectangle.xml
+++ b/res/drawable/rectangle.xml
@@ -16,11 +16,5 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/listview_background_shape">
- <stroke android:width="2dp" android:color="#ff207d94" />
- <padding android:left="2dp"
- android:top="2dp"
- android:right="2dp"
- android:bottom="2dp" />
- <corners android:radius="5dp" />
- <solid android:color="#ffffffff" />
+ <solid android:color="#2196f3" />
</shape> \ No newline at end of file
diff --git a/res/layout/welcome.xml b/res/layout/welcome.xml
index 2408739c..029025e4 100644
--- a/res/layout/welcome.xml
+++ b/res/layout/welcome.xml
@@ -115,6 +115,80 @@
</RelativeLayout>
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:id="@+id/itemFour"
+ android:background="@color/cloud_fill">
+
+ <ImageView android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="@drawable/flying_folder"
+ android:layout_above="@+id/clouds_intro"
+ android:id="@+id/flying_folder"
+ android:layout_marginBottom="78dp"
+ android:layout_centerHorizontal="true"
+ android:layout_gravity="center|center_vertical|center_horizontal" />
+
+ <!-- the cloud drawable has some weird spacing around it -->
+ <ImageView android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@drawable/cloud_line"
+ android:layout_marginLeft="-50dp"
+ android:layout_marginBottom="-13dp"
+ android:layout_centerVertical="true"
+ android:id="@+id/clouds_intro"
+ android:layout_gravity="center|center_vertical|center_horizontal"/>
+
+ <View
+ android:id="@+id/generic_square"
+ android:layout_width="fill_parent"
+ android:layout_height="match_parent"
+ android:layout_below="@+id/clouds_intro"
+ android:background="@drawable/rectangle"/>
+
+ <LinearLayout
+ android:id="@+id/cloud_text"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:layout_below="@+id/clouds_intro"
+ android:layout_marginStart="24dp">
+
+ <TextView
+ android:text="@string/add_cloud_storage"
+ android:id="@+id/cardHeaderText"
+ android:textColor="@android:color/white"
+ android:textSize="20sp"
+ android:textStyle="bold"
+ android:layout_width="wrap_content"
+ android:fontFamily="sans-serif-medium"
+ android:layout_height="wrap_content"/>
+
+ <TextView
+ android:text="@string/oobe_add_cloud_storage_desc"
+ android:id="@+id/cardChildText"
+ android:textColor="@android:color/white"
+ android:textSize="16sp"
+ android:layout_marginTop="20dp"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent" />
+
+ </LinearLayout>
+
+ <Button
+ android:text="@string/connect_now"
+ android:id="@+id/dismiss_card"
+ android:layout_width="120dp"
+ android:layout_height="36dp"
+ android:layout_alignParentBottom="true"
+ android:layout_centerHorizontal="true"
+ android:layout_marginBottom="124dp"
+ android:textColor="@android:color/white"
+ android:background="@color/dark_button_blue"/>
+
+ </RelativeLayout>
+
</android.support.v4.view.ViewPager>
<RelativeLayout
@@ -122,19 +196,17 @@
android:layout_height="@dimen/default_row_height"
android:layout_width="fill_parent"
android:layout_alignParentBottom="true"
- android:layout_alignParentStart="true"
- android:background="@drawable/bottom_bar_walkthrough">
+ android:layout_alignParentStart="true">
- <Button
- android:id="@+id/skipButton"
+ <ImageView
+ android:id="@+id/prevButton"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/skip_text"
+ android:src="@drawable/ic_oobe_back"
android:layout_alignParentLeft="true"
android:textColor="@android:color/white"/>
-
<com.cyanogenmod.filemanager.views.CirclePageIndicator
android:id="@+id/pagination"
android:layout_height="@dimen/half_row_height"
@@ -142,12 +214,12 @@
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true" />
- <Button
+ <ImageView
android:id="@+id/nextButton"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/next_text"
+ android:src="@drawable/ic_oobe_forward"
android:layout_alignParentRight="true"
android:textColor="@android:color/white"/>
diff --git a/res/menu/navigation.xml b/res/menu/navigation.xml
index 1c4d6730..cc2f574e 100644
--- a/res/menu/navigation.xml
+++ b/res/menu/navigation.xml
@@ -52,8 +52,7 @@
<item android:id="@+id/navigation_item_manage"
android:icon="@drawable/ic_storage_sources"
android:title="@string/navigation_item_title_manage"
- android:orderInCategory="@integer/navigation_item_order_after_roots"
- android:visible="false" /> <!-- hidden until wired up -->
+ android:orderInCategory="@integer/navigation_item_order_after_roots"/>
<item android:id="@+id/navigation_item_settings"
android:icon="@drawable/ic_settings"
android:title="@string/navigation_item_title_settings"
diff --git a/res/values/colors.xml b/res/values/colors.xml
index cc420317..c3ac889e 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -30,6 +30,9 @@
<!-- The protected storage primary color -->
<color name="protected_primary">#37474f</color>
+ <color name="cloud_fill">#1976d2</color>
+ <color name="text_color">#ffffff</color>
+ <color name="dark_button_blue">#0277bd</color>
<!-- The default background color -->
<color name="default_background">@android:color/white</color>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index c8369ce5..2fcf6ab5 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -51,6 +51,9 @@
<string name="select">Select</string>
<string name="copy">Copy</string>
<string name="move">Move</string>
+ <string name="add">Add</string>
+ <string name="dismiss">Dismiss</string>
+ <string name="connect_now">Connect Now</string>
<!-- The root directory name -->
<string name="root_directory_name"><![CDATA[<Root folder>]]></string>
@@ -885,4 +888,12 @@
<!-- Wrap mode - toast -->
<string name="toggle_word_wrap_msg">Toggling word wrap mode</string>
+
+ <string name="add_cloud_storage">Add cloud storage</string>
+ <string name="add_cloud_storage_desc">Important files are a tap away when you link cloud storage to your device. Tap here to set up.</string>
+ <string name="oobe_add_cloud_storage_desc">Important files are a tap away when you link cloud storage to your device.</string>
+ <string name="welcome_to">Welcome to</string>
+ <string name="file">File</string>
+ <string name="manager">Manager</string>
+ <string name="welcome_desc">Simple, powerful access to all your data from anywhere.</string>
</resources>
diff --git a/src/com/cyanogenmod/filemanager/activities/MainActivity.java b/src/com/cyanogenmod/filemanager/activities/MainActivity.java
index e1870227..8b6627ef 100755
--- a/src/com/cyanogenmod/filemanager/activities/MainActivity.java
+++ b/src/com/cyanogenmod/filemanager/activities/MainActivity.java
@@ -246,7 +246,6 @@ public class MainActivity extends ActionBarActivity
NavigationView navigationDrawer = (NavigationView) findViewById(R.id.navigation_view);
navigationDrawer.setNavigationItemSelectedListener(this);
mNavigationDrawerController = new NavigationDrawerController(this, navigationDrawer);
- mNavigationDrawerController.loadNavigationDrawerItems();
MIME_TYPE_LOCALIZED_NAMES = MimeTypeCategory.getFriendlyLocalizedNames(this);
@@ -322,6 +321,12 @@ public class MainActivity extends ActionBarActivity
//stub
}
+ @Override
+ public void onResume() {
+ super.onResume();
+ mNavigationDrawerController.loadNavigationDrawerItems();
+ }
+
/**
* {@inheritDoc}
*/
diff --git a/src/com/cyanogenmod/filemanager/activities/WelcomeActivity.java b/src/com/cyanogenmod/filemanager/activities/WelcomeActivity.java
index 7220db0d..7a88babd 100755
--- a/src/com/cyanogenmod/filemanager/activities/WelcomeActivity.java
+++ b/src/com/cyanogenmod/filemanager/activities/WelcomeActivity.java
@@ -22,7 +22,7 @@ import android.support.v4.view.ViewPager.OnPageChangeListener;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
-import android.widget.Button;
+import android.widget.ImageView;
import com.cyanogenmod.filemanager.R;
import com.cyanogenmod.filemanager.adapters.WelcomeAdapter;
import com.cyanogenmod.filemanager.views.CirclePageIndicator;
@@ -38,9 +38,10 @@ public class WelcomeActivity extends Activity {
private static boolean DEBUG = false;
- Button nextButton;
+ ImageView mNextButton;
ViewPager vp;
WelcomeAdapter adapter;
+ ImageView mPrevButton;
/**
* {@inheritDoc}
@@ -55,15 +56,15 @@ public class WelcomeActivity extends Activity {
adapter = new WelcomeAdapter();
vp = (ViewPager) findViewById(R.id.intro_pager);
- nextButton = (Button) findViewById(R.id.nextButton);
+ mNextButton = (ImageView) findViewById(R.id.nextButton);
PageIndicator indicator = (CirclePageIndicator)findViewById(R.id.pagination);
- Button skipButton = (Button) findViewById(R.id.skipButton);
+ mPrevButton = (ImageView) findViewById(R.id.prevButton);
- endButton(skipButton);
vp.setAdapter(adapter);
vp.setOffscreenPageLimit(3);
indicator.setViewPager(vp);
+
pagePrepare(vp.getCurrentItem());
indicator.setOnPageChangeListener(new OnPageChangeListener() {
@@ -85,7 +86,7 @@ public class WelcomeActivity extends Activity {
super.onCreate(state);
}
- private void endButton(Button b) {
+ private void endButton(ImageView b) {
b.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
@@ -93,14 +94,15 @@ public class WelcomeActivity extends Activity {
}
});
}
+
private void pagePrepare(int currentPage) {
int maxCount = adapter.getCount();
if (maxCount == currentPage + 1) {
- nextButton.setText("Done");
- endButton(nextButton);
+ mNextButton.setImageDrawable(getResources().getDrawable(R.drawable.ic_oobe_finish));
+ endButton(mNextButton);
} else {
- nextButton.setText("Next");
- nextButton.setOnClickListener(new OnClickListener() {
+ mNextButton.setImageDrawable(getResources().getDrawable(R.drawable.ic_oobe_forward));
+ mNextButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
int current = vp.getCurrentItem();
@@ -108,6 +110,18 @@ public class WelcomeActivity extends Activity {
}
});
}
+ if (currentPage == 0) {
+ mPrevButton.setVisibility(View.INVISIBLE);
+ } else {
+ mPrevButton.setVisibility(View.VISIBLE);
+ mPrevButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ int current = vp.getCurrentItem();
+ vp.setCurrentItem(current - 1);
+ }
+ });
+ }
}
/**
diff --git a/src/com/cyanogenmod/filemanager/adapters/WelcomeAdapter.java b/src/com/cyanogenmod/filemanager/adapters/WelcomeAdapter.java
index e4390efb..e0dce4aa 100644
--- a/src/com/cyanogenmod/filemanager/adapters/WelcomeAdapter.java
+++ b/src/com/cyanogenmod/filemanager/adapters/WelcomeAdapter.java
@@ -23,7 +23,7 @@ import android.view.ViewGroup;
public class WelcomeAdapter extends PagerAdapter {
- private final static int COUNT_OF_INTRO_PAGES = 3;
+ private final static int COUNT_OF_INTRO_PAGES = 4;
public Object instantiateItem(ViewGroup collection, int position) {
@@ -38,6 +38,8 @@ public class WelcomeAdapter extends PagerAdapter {
case 2:
resId = R.id.itemThree;
break;
+ case 3:
+ resId = R.id.itemFour;
}
return collection.findViewById(resId);
}
diff --git a/src/com/cyanogenmod/filemanager/controllers/NavigationDrawerController.java b/src/com/cyanogenmod/filemanager/controllers/NavigationDrawerController.java
index 2a7bf612..94d91564 100755
--- a/src/com/cyanogenmod/filemanager/controllers/NavigationDrawerController.java
+++ b/src/com/cyanogenmod/filemanager/controllers/NavigationDrawerController.java
@@ -38,7 +38,6 @@ import java.util.Locale;
import java.util.Map;
import static com.cyanogenmod.filemanager.model.Bookmark.BOOKMARK_TYPE.SDCARD;
-import static com.cyanogenmod.filemanager.model.Bookmark.BOOKMARK_TYPE.SECURE;
import static com.cyanogenmod.filemanager.model.Bookmark.BOOKMARK_TYPE.USB;
/**
@@ -164,8 +163,9 @@ public class NavigationDrawerController {
public void removeAllDynamicMenuItemsFromDrawer() {
for (int key : mStorageBookmarks.keySet()) {
removeMenuItemFromDrawer(key);
- mStorageBookmarks.remove(key);
}
+ // reset hashmaps
+ mStorageBookmarks.clear();
}
public Bookmark getBookmarkFromMenuItem(int key) {