+++ b/sprd/packages/apps/Launcher3/res/drawable/folder_background.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source 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.
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="false">
+ <shape android:shape="rectangle">
+ <!-- 填充的颜色 -->
+ <solid android:color="#1A000000"></solid>
+ <!-- android:radius 弧形的半径 -->
+ <corners android:radius="40px" />
+ <!-- 绘制边框-->
+ <!--<stroke android:width="2px" android:color="#2c72ac" android:dashGap="0dp" />-->
+ </shape>
+ </item>
+</selector>
diff --git a/sprd/packages/apps/Launcher3/res/drawable/folder_background_xicon.png b/sprd/packages/apps/Launcher3/res/drawable/folder_background_xicon.png
new file mode 100755
index 0000000..b431f71
Binary files /dev/null and b/sprd/packages/apps/Launcher3/res/drawable/folder_background_xicon.png differ
diff --git a/sprd/packages/apps/Launcher3/res/drawable/grid_folder_page_background.xml b/sprd/packages/apps/Launcher3/res/drawable/grid_folder_page_background.xml
old mode 100644
new mode 100755
index f6563aa..bb3575c
--- a/sprd/packages/apps/Launcher3/res/drawable/grid_folder_page_background.xml
+++ b/sprd/packages/apps/Launcher3/res/drawable/grid_folder_page_background.xml
@@ -18,5 +18,5 @@
android:shape="rectangle">
<stroke android:width="1dp" android:color="?attr/gridFolderPageStrokeColor" />
<solid android:color="?attr/folderFillColor" />
- <corners android:radius="@dimen/grid_folder_page_radius" />
+ <corners android:radius="290px" />
</shape>
diff --git a/sprd/packages/apps/Launcher3/res/layout/grid_folder_icon_normalized.xml b/sprd/packages/apps/Launcher3/res/layout/grid_folder_icon_normalized.xml
old mode 100644
new mode 100755
index 9d0f33f..356a63f
--- a/sprd/packages/apps/Launcher3/res/layout/grid_folder_icon_normalized.xml
+++ b/sprd/packages/apps/Launcher3/res/layout/grid_folder_icon_normalized.xml
@@ -22,33 +22,55 @@
<LinearLayout
android:id="@+id/folder_tab"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="70dp"
+ android:layout_marginTop="10dp"
android:orientation="vertical"
+ android:background="@drawable/folder_background"
android:paddingBottom="@dimen/grid_folder_tab_margin_bottom"
android:layout_gravity="center">
+ <TextView
+ android:id="@+id/folder_name_xicon2"
+ android:layout_width="match_parent"
+ android:layout_marginRight="40dp"
+ android:layout_height="10dp"
+ />
<com.android.launcher3.ExtendedEditText
android:id="@+id/folder_name"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="center_vertical"
+ android:layout_marginRight="20dp"
+ android:layout_marginLeft="40dp"
android:layout_weight="1"
+ android:textSize="30px"
+ android:layout_marginBottom="7dp"
android:gravity="center"
android:hint="@string/folder_hint_text"
android:imeOptions="flagNoExtractUi"
style="@style/GridFolderNameStyle" />
+ <TextView
+ android:id="@+id/folder_name_xicon"
+ android:layout_width="40dp"
+ android:layout_height="40dp"
+ android:layout_gravity="right"
+ android:layout_marginTop="-40dp"
+ android:layout_marginRight="10dp"
+ android:background="@drawable/folder_background_xicon"
+ />
</LinearLayout>
<com.sprd.ext.folder.GridFolderPage
android:id="@+id/grid_folder_page"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginTop="40dp"
android:elevation="@dimen/grid_folder_page_elevation"
android:background="@drawable/grid_folder_page_background">
<com.android.launcher3.folder.FolderPagedView
android:id="@+id/folder_content"
- android:clipToPadding="false"
+ android:clipToPadding="false"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:padding="@dimen/grid_folder_page_view_padding"
+ android:layout_marginBottom="-120dp"
+ android:layout_height="wrap_content"
launcher:pageIndicator="@+id/folder_page_indicator" />
<LinearLayout
android:id="@+id/folder_footer"
@@ -56,13 +78,13 @@
android:layout_height="wrap_content"
android:clipChildren="false"
android:layout_gravity="bottom"
+ android:layout_marginBottom="25dp"
android:orientation="vertical">
<com.android.launcher3.pageindicators.PageIndicatorDots
android:id="@+id/folder_page_indicator"
android:layout_gravity="center_vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1"
/>
</LinearLayout>
</com.sprd.ext.folder.GridFolderPage>
diff --git a/sprd/packages/apps/Launcher3/res/values/colors.xml b/sprd/packages/apps/Launcher3/res/values/colors.xml
old mode 100644
new mode 100755
index 3c8fe1e..31f6847
--- a/sprd/packages/apps/Launcher3/res/values/colors.xml
+++ b/sprd/packages/apps/Launcher3/res/values/colors.xml
@@ -26,6 +26,8 @@
<color name="focused_background">#80c6c5c5</color>
<color name="default_shadow_color_no_alpha">#FF000000</color>
+ <color name="default_shadow_color_no_alpha1">#80FFFFFF</color>
+ <color name="default_shadow_color_no_alpha2">#FFFFFFFF</color>
<color name="spring_loaded_panel_color">#40FFFFFF</color>
<color name="spring_loaded_highlighted_panel_border_color">#FFF</color>
diff --git a/sprd/packages/apps/Launcher3/src/com/android/launcher3/folder/Folder.java b/sprd/packages/apps/Launcher3/src/com/android/launcher3/folder/Folder.java
index ab605ed..634b3c5 100755
--- a/sprd/packages/apps/Launcher3/src/com/android/launcher3/folder/Folder.java
+++ b/sprd/packages/apps/Launcher3/src/com/android/launcher3/folder/Folder.java
@@ -97,7 +97,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
-
+import android.os.SystemProperties;
import static android.view.WindowManager.LayoutParams;
/**
* Represents a set of icons chosen by the user or generated by the system.
@@ -160,6 +160,7 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
@Thunk protected FolderPagedView mContent;
public ExtendedEditText mFolderName;
+ public TextView mFolderNameClean;
public PageIndicatorDots mPageIndicator;
private View mFooter;
@@ -236,6 +237,7 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
mPageIndicator = findViewById(R.id.folder_page_indicator);
mFolderName = findViewById(R.id.folder_name);
+ mFolderNameClean = findViewById(R.id.folder_name_xicon);
mFolderName.setOnBackKeyListener(this);
mFolderName.setOnFocusChangeListener(this);
mFolderName.setOnEditorActionListener(this);
@@ -247,7 +249,16 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
mFolderName.forceDisableSuggestions(true);
mFooter = findViewById(R.id.folder_footer);
-
+ mFolderNameClean.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ mFolderName.setText("");
+ }
+ });
+ if(mInfo != null){
+ mFolderName.setText(mInfo.title);
+ Log.d("fujia", "-mInfo.title1111 -"+mInfo.title);
+ }
// We find out how tall footer wants to be (it is set to wrap_content), so that
// we can allocate the appropriate amount of space for it.
int measureSpec = MeasureSpec.UNSPECIFIED;
@@ -518,6 +529,10 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
}
public void Open() {
+ if(mInfo != null){
+ mFolderName.setText(mInfo.title);
+ Log.d("fujia", "-mInfo.title -"+mInfo.title);
+ }
Log.d("fujia", "=====Open=======");
Folder openFolder = getOpen(mLauncher);
if (openFolder != null && openFolder != this) {
@@ -1683,7 +1698,7 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
mHandler.removeMessages(CMD_HIDE_DIAL);
mHandler.sendEmptyMessage(CMD_HIDE_DIAL);
mHandler.removeMessages(CMD_INPUT_PASSWORD_DIAL);
- mHandler.sendEmptyMessageDelayed(CMD_INPUT_PASSWORD_DIAL, 5*60*1000);
+ mHandler.sendEmptyMessageDelayed(CMD_INPUT_PASSWORD_DIAL, 5*60*1000);
if(builder == null){
Log.d("fujia", "[initRes] builder");
//mWManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
diff --git a/sprd/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderPagedView.java b/sprd/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderPagedView.java
old mode 100644
new mode 100755
index fbcc1bf..38f5eea
--- a/sprd/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderPagedView.java
+++ b/sprd/packages/apps/Launcher3/src/com/android/launcher3/folder/FolderPagedView.java
@@ -400,13 +400,13 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> {
}
public int getDesiredWidth() {
- return getPageCount() > 0 ?
- (getPageAt(0).getDesiredWidth() + getPaddingLeft() + getPaddingRight()) : 0;
+ return 630;//getPageCount() > 0 ?
+ //(getPageAt(0).getDesiredWidth() + getPaddingLeft() + getPaddingRight()) : 0;
}
public int getDesiredHeight() {
- return getPageCount() > 0 ?
- (getPageAt(0).getDesiredHeight() + getPaddingTop() + getPaddingBottom()) : 0;
+ return 660;//getPageCount() > 0 ?
+ //(getPageAt(0).getDesiredHeight() + getPaddingTop() + getPaddingBottom()) : 0;
}
public int getItemCount() {
diff --git a/sprd/packages/apps/Launcher3/src/com/android/launcher3/pageindicators/PageIndicatorDots.java b/sprd/packages/apps/Launcher3/src/com/android/launcher3/pageindicators/Pag
old mode 100644
new mode 100755
index f7c730a..2ae3cbf
--- a/sprd/packages/apps/Launcher3/src/com/android/launcher3/pageindicators/PageIndicatorDots.java
+++ b/sprd/packages/apps/Launcher3/src/com/android/launcher3/pageindicators/PageIndicatorDots.java
@@ -113,8 +113,10 @@ public class PageIndicatorDots extends View implements PageIndicator {
mDotRadius = getResources().getDimension(R.dimen.page_indicator_dot_size) / 2;
setOutlineProvider(new MyOutlineProver());
- mActiveColor = Themes.getColorAccent(context);
- mInActiveColor = Themes.getAttrColor(context, android.R.attr.colorControlHighlight);
+ mActiveColor = getResources().getColor(R.color.default_shadow_color_no_alpha2);
+ //mInActiveColor = Themes.getAttrColor(context, android.R.attr.colorControlHighlight);
+ //mActiveColor = getResources().getColor(R.color.default_shadow_color_no_alpha1);
+ mInActiveColor = getResources().getColor(R.color.default_shadow_color_no_alpha1);
mIsRtl = Utilities.isRtl(getResources());
修改桌面文件夹展开后的样式
最新推荐文章于 2023-12-13 00:15:00 发布