From 5e357592eb8e2c887706b5698295275d37c07446 Mon Sep 17 00:00:00 2001 From: YuanWenHai Date: Wed, 2 Nov 2016 10:55:33 +0800 Subject: [PATCH 1/5] version 1.1 test --- .../java/com/will/filesearcher/file_searcher/FSAdapter.java | 2 +- .../will/filesearcher/file_searcher/FileSearcherActivity.java | 2 +- .../src/main/res/layout/{item.xml => file_searcher_item.xml} | 0 .../src/main/res/layout/{main.xml => file_searcher_main.xml} | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename filesearcher/src/main/res/layout/{item.xml => file_searcher_item.xml} (100%) rename filesearcher/src/main/res/layout/{main.xml => file_searcher_main.xml} (100%) diff --git a/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FSAdapter.java b/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FSAdapter.java index 4aaa2b4..5415915 100644 --- a/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FSAdapter.java +++ b/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FSAdapter.java @@ -66,7 +66,7 @@ public int getItemCount() { @Override public FSViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { - View view = LayoutInflater.from(context).inflate(R.layout.item,parent,false); + View view = LayoutInflater.from(context).inflate(R.layout.file_searcher_item,parent,false); return new FSViewHolder(view); } diff --git a/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FileSearcherActivity.java b/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FileSearcherActivity.java index bc8fad0..17f4eb5 100644 --- a/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FileSearcherActivity.java +++ b/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FileSearcherActivity.java @@ -30,7 +30,7 @@ public class FileSearcherActivity extends AppCompatActivity { @Override protected void onCreate( Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.main); + setContentView(R.layout.file_searcher_main); RecyclerView recyclerView = (RecyclerView) findViewById(R.id.main_recycler_view); TextView text = (TextView) findViewById(R.id.main_text); mAdapter = new FSAdapter(this,text); diff --git a/filesearcher/src/main/res/layout/item.xml b/filesearcher/src/main/res/layout/file_searcher_item.xml similarity index 100% rename from filesearcher/src/main/res/layout/item.xml rename to filesearcher/src/main/res/layout/file_searcher_item.xml diff --git a/filesearcher/src/main/res/layout/main.xml b/filesearcher/src/main/res/layout/file_searcher_main.xml similarity index 100% rename from filesearcher/src/main/res/layout/main.xml rename to filesearcher/src/main/res/layout/file_searcher_main.xml From 04d59e96154d39229685d8651d3611e0243ea6da Mon Sep 17 00:00:00 2001 From: YuanWenHai Date: Wed, 2 Nov 2016 11:35:42 +0800 Subject: [PATCH 2/5] version 1.02 test --- .idea/misc.xml | 2 +- .../com/will/filesearcher/file_searcher/FSAdapter.java | 4 ++-- .../filesearcher/file_searcher/FileSearcherActivity.java | 4 ++-- filesearcher/src/main/res/layout/file_searcher_item.xml | 4 ++-- filesearcher/src/main/res/layout/file_searcher_main.xml | 9 ++++----- .../src/main/res/values/{colors.xml => color.xml} | 1 + filesearcher/src/main/res/values/styles.xml | 1 + 7 files changed, 13 insertions(+), 12 deletions(-) rename filesearcher/src/main/res/values/{colors.xml => color.xml} (86%) diff --git a/.idea/misc.xml b/.idea/misc.xml index 5d19981..fbb6828 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -37,7 +37,7 @@ - + diff --git a/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FSAdapter.java b/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FSAdapter.java index 5415915..1e1598a 100644 --- a/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FSAdapter.java +++ b/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FSAdapter.java @@ -86,8 +86,8 @@ class FSViewHolder extends RecyclerView.ViewHolder{ CheckBox checkBox; FSViewHolder(View view){ super(view); - text = (TextView) view.findViewById(R.id.item_text); - checkBox = (CheckBox) view.findViewById(R.id.item_check_box); + text = (TextView) view.findViewById(R.id.file_searcher_item_text); + checkBox = (CheckBox) view.findViewById(R.id.file_searcher_item_check_box); text.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { diff --git a/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FileSearcherActivity.java b/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FileSearcherActivity.java index 17f4eb5..604c007 100644 --- a/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FileSearcherActivity.java +++ b/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FileSearcherActivity.java @@ -31,8 +31,8 @@ public class FileSearcherActivity extends AppCompatActivity { protected void onCreate( Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.file_searcher_main); - RecyclerView recyclerView = (RecyclerView) findViewById(R.id.main_recycler_view); - TextView text = (TextView) findViewById(R.id.main_text); + RecyclerView recyclerView = (RecyclerView) findViewById(R.id.file_searcher_main_recycler_view); + TextView text = (TextView) findViewById(R.id.file_searcher_main_text); mAdapter = new FSAdapter(this,text); recyclerView.setAdapter(mAdapter); recyclerView.setLayoutManager(new LinearLayoutManager(this)); diff --git a/filesearcher/src/main/res/layout/file_searcher_item.xml b/filesearcher/src/main/res/layout/file_searcher_item.xml index 0f7e8f5..982a59a 100644 --- a/filesearcher/src/main/res/layout/file_searcher_item.xml +++ b/filesearcher/src/main/res/layout/file_searcher_item.xml @@ -9,7 +9,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> diff --git a/filesearcher/src/main/res/layout/file_searcher_main.xml b/filesearcher/src/main/res/layout/file_searcher_main.xml index 168262a..ab5f201 100644 --- a/filesearcher/src/main/res/layout/file_searcher_main.xml +++ b/filesearcher/src/main/res/layout/file_searcher_main.xml @@ -12,23 +12,22 @@ diff --git a/filesearcher/src/main/res/values/colors.xml b/filesearcher/src/main/res/values/color.xml similarity index 86% rename from filesearcher/src/main/res/values/colors.xml rename to filesearcher/src/main/res/values/color.xml index c246302..46ae082 100644 --- a/filesearcher/src/main/res/values/colors.xml +++ b/filesearcher/src/main/res/values/color.xml @@ -4,4 +4,5 @@ #303F9F #FF4081 #333333 + #ffffff diff --git a/filesearcher/src/main/res/values/styles.xml b/filesearcher/src/main/res/values/styles.xml index cc64b3a..24f0ced 100644 --- a/filesearcher/src/main/res/values/styles.xml +++ b/filesearcher/src/main/res/values/styles.xml @@ -7,6 +7,7 @@ @color/colorPrimaryDark @color/colorAccent true + @color/white From 495962e5821ed90b17a1cf21ce9582492a90b2e0 Mon Sep 17 00:00:00 2001 From: YuanWenHai Date: Wed, 2 Nov 2016 11:44:19 +0800 Subject: [PATCH 3/5] version 1.03 test --- .../will/filesearcher/file_searcher/FileSearcherActivity.java | 2 +- filesearcher/src/main/res/layout/file_searcher_main.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FileSearcherActivity.java b/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FileSearcherActivity.java index 604c007..69b72c5 100644 --- a/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FileSearcherActivity.java +++ b/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FileSearcherActivity.java @@ -42,7 +42,7 @@ protected void onCreate( Bundle savedInstanceState) { } mAdapter.startSearch(Environment.getExternalStorageDirectory(),keyword); - Toolbar toolbar = (Toolbar) findViewById(R.id.main_toolbar); + Toolbar toolbar = (Toolbar) findViewById(R.id.file_searcher_main_toolbar); toolbar.setTitle(""); toolbar.setNavigationIcon(R.drawable.ic_arrow_back_white_24dp); setSupportActionBar(toolbar); diff --git a/filesearcher/src/main/res/layout/file_searcher_main.xml b/filesearcher/src/main/res/layout/file_searcher_main.xml index ab5f201..35e123c 100644 --- a/filesearcher/src/main/res/layout/file_searcher_main.xml +++ b/filesearcher/src/main/res/layout/file_searcher_main.xml @@ -20,6 +20,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" + android:maxLines="1" android:textColor="?attr/actionMenuTextColor" android:textSize="18sp" From 6a2ae6987ee5dd19882fe6e745d8f311ff084ddb Mon Sep 17 00:00:00 2001 From: YuanWenHai Date: Wed, 2 Nov 2016 11:59:41 +0800 Subject: [PATCH 4/5] version 1.1 formal --- .../will/filesearcher/file_searcher/FileSearcherActivity.java | 4 ++-- .../menu/{toolbar_menu.xml => file_searcher_toolbar_menu.xml} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename filesearcher/src/main/res/menu/{toolbar_menu.xml => file_searcher_toolbar_menu.xml} (78%) diff --git a/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FileSearcherActivity.java b/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FileSearcherActivity.java index 69b72c5..fc1d379 100644 --- a/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FileSearcherActivity.java +++ b/filesearcher/src/main/java/com/will/filesearcher/file_searcher/FileSearcherActivity.java @@ -78,7 +78,7 @@ public void onBackPressed() { @Override public boolean onCreateOptionsMenu(Menu menu) { - getMenuInflater().inflate(R.menu.toolbar_menu,menu); + getMenuInflater().inflate(R.menu.file_searcher_toolbar_menu,menu); return true; } @@ -87,7 +87,7 @@ public boolean onOptionsItemSelected(MenuItem item) { if(mAdapter.isSearching()){ return true; } - if(item.getItemId() == R.id.toolbar_menu_done){ + if(item.getItemId() == R.id.file_searcher_toolbar_menu_done){ ArrayList selectedData = (ArrayList) mAdapter.getSelectedItems(); if(selectedData.size() == 0){ setResult(NO_DATA_SELECTED); diff --git a/filesearcher/src/main/res/menu/toolbar_menu.xml b/filesearcher/src/main/res/menu/file_searcher_toolbar_menu.xml similarity index 78% rename from filesearcher/src/main/res/menu/toolbar_menu.xml rename to filesearcher/src/main/res/menu/file_searcher_toolbar_menu.xml index d3e6e1a..90253c7 100644 --- a/filesearcher/src/main/res/menu/toolbar_menu.xml +++ b/filesearcher/src/main/res/menu/file_searcher_toolbar_menu.xml @@ -3,12 +3,12 @@ xmlns:app="http://schemas.android.com/apk/res-auto"> \ No newline at end of file From e79e01b098e0685cd726a21d9a647acddf2f9f1d Mon Sep 17 00:00:00 2001 From: YuanWenHai Date: Wed, 2 Nov 2016 13:00:11 +0800 Subject: [PATCH 5/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c9c522..ff3dd9a 100644 --- a/README.md +++ b/README.md @@ -35,5 +35,5 @@ Add it in your root build.gradle at the end of repositories: Step 2. Add the dependency dependencies { - compile 'com.github.YuanWenHai:FileSearcher:1.0' + compile 'com.github.YuanWenHai:FileSearcher:1.1' }