Commit 2fb780ce authored by fallenstardust's avatar fallenstardust

activity_search更名为search_fragment

parent f5d783bd
...@@ -168,22 +168,6 @@ public abstract class BaseCardsActivity extends BaseActivity implements CardLoad ...@@ -168,22 +168,6 @@ public abstract class BaseCardsActivity extends BaseActivity implements CardLoad
return true; return true;
}); });
// mListView.addOnItemTouchListener(new RecyclerViewItemListener(mListView, new RecyclerViewItemListener.OnItemListener() {
// @Override
// public void onItemClick(View view, int pos) {
// onCardClick(view, mCardListAdapter.getItem(pos), pos);
// }
//
// @Override
// public void onItemLongClick(View view, int pos) {
// onCardLongClick(view, mCardListAdapter.getItem(pos), pos);
// }
//
// @Override
// public void onItemDoubleClick(View view, int pos) {
//
// }
// }));
mListView.addOnScrollListener(new RecyclerView.OnScrollListener() { mListView.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override @Override
public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) { public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
......
...@@ -75,7 +75,7 @@ public class CardSearchFragment extends BaseFragemnt implements CardLoader.CallB ...@@ -75,7 +75,7 @@ public class CardSearchFragment extends BaseFragemnt implements CardLoader.CallB
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState); super.onCreateView(inflater, container, savedInstanceState);
View layoutView; View layoutView;
layoutView = inflater.inflate(R.layout.activity_search, container, false); layoutView = inflater.inflate(R.layout.search_fragment, container, false);
mResult_count = layoutView.findViewById(R.id.search_result_count); mResult_count = layoutView.findViewById(R.id.search_result_count);
duelAssistantManagement = DuelAssistantManagement.getInstance(); duelAssistantManagement = DuelAssistantManagement.getInstance();
intentSearchMessage = getActivity().getIntent().getStringExtra(CardSearchFragment.SEARCH_MESSAGE); intentSearchMessage = getActivity().getIntent().getStringExtra(CardSearchFragment.SEARCH_MESSAGE);
...@@ -88,16 +88,6 @@ public class CardSearchFragment extends BaseFragemnt implements CardLoader.CallB ...@@ -88,16 +88,6 @@ public class CardSearchFragment extends BaseFragemnt implements CardLoader.CallB
mListView.setAdapter(mCardListAdapter); mListView.setAdapter(mCardListAdapter);
Button btn_search = layoutView.findViewById(R.id.btn_search); Button btn_search = layoutView.findViewById(R.id.btn_search);
btn_search.setOnClickListener((v) -> showSearch(true)); btn_search.setOnClickListener((v) -> showSearch(true));
/*
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, mDrawerlayout, toolbar, R.string.search_open, R.string.search_close);
toggle.setDrawerIndicatorEnabled(false);
mDrawerlayout.addDrawerListener(toggle);
toggle.setToolbarNavigationClickListener((v) -> {
onBack();
});
toggle.syncState();
*/
mCardLoader = new CardLoader(getContext()); mCardLoader = new CardLoader(getContext());
mCardLoader.setCallBack(this); mCardLoader.setCallBack(this);
mCardSelector = new CardSearcher(layoutView.findViewById(R.id.nav_view_list), mCardLoader); mCardSelector = new CardSearcher(layoutView.findViewById(R.id.nav_view_list), mCardLoader);
......
...@@ -20,7 +20,6 @@ import android.view.ViewGroup; ...@@ -20,7 +20,6 @@ import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo; import android.view.inputmethod.EditorInfo;
import android.widget.Button; import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView; import android.widget.ListView;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
...@@ -53,13 +52,11 @@ import cn.garymb.ygomobile.bean.events.ServerInfoEvent; ...@@ -53,13 +52,11 @@ import cn.garymb.ygomobile.bean.events.ServerInfoEvent;
import cn.garymb.ygomobile.lite.BuildConfig; import cn.garymb.ygomobile.lite.BuildConfig;
import cn.garymb.ygomobile.lite.R; import cn.garymb.ygomobile.lite.R;
import cn.garymb.ygomobile.loader.ImageLoader; import cn.garymb.ygomobile.loader.ImageLoader;
import cn.garymb.ygomobile.ui.activities.FileLogActivity;
import cn.garymb.ygomobile.ui.activities.WebActivity; import cn.garymb.ygomobile.ui.activities.WebActivity;
import cn.garymb.ygomobile.ui.adapters.ServerListAdapter; import cn.garymb.ygomobile.ui.adapters.ServerListAdapter;
import cn.garymb.ygomobile.ui.adapters.SimpleListAdapter; import cn.garymb.ygomobile.ui.adapters.SimpleListAdapter;
import cn.garymb.ygomobile.ui.cards.CardDetailRandom; import cn.garymb.ygomobile.ui.cards.CardDetailRandom;
import cn.garymb.ygomobile.ui.cards.DeckManagerActivity; import cn.garymb.ygomobile.ui.cards.DeckManagerActivity;
import cn.garymb.ygomobile.ui.mycard.MyCardActivity;
import cn.garymb.ygomobile.ui.plus.DialogPlus; import cn.garymb.ygomobile.ui.plus.DialogPlus;
import cn.garymb.ygomobile.ui.plus.VUiKit; import cn.garymb.ygomobile.ui.plus.VUiKit;
import cn.garymb.ygomobile.ui.preference.SettingsActivity; import cn.garymb.ygomobile.ui.preference.SettingsActivity;
...@@ -332,15 +329,6 @@ public class HomeFragment extends BaseFragemnt implements View.OnClickListener { ...@@ -332,15 +329,6 @@ public class HomeFragment extends BaseFragemnt implements View.OnClickListener {
quickjoinRoom(host, port, password); quickjoinRoom(host, port, password);
} }
} }
/*
public void onCardSearch(String key, int id) {
if (id == ID_HOMEFRAGMENT) {
Intent intent = new Intent(getContext(), CardSearchActivity.class);
intent.putExtra(CardSearchActivity.SEARCH_MESSAGE, key);
startActivity(intent);
}
}
*/
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
public void onServerInfoEvent(ServerInfoEvent event) { public void onServerInfoEvent(ServerInfoEvent event) {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
android:padding="10dp" android:padding="10dp"
android:theme="@style/AppTheme.PopupOverlay.Dark" android:theme="@style/AppTheme.PopupOverlay.Dark"
tools:showIn="@layout/activity_search"> tools:showIn="@layout/search_fragment">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<fragment <fragment
android:id="@+id/cardSearcher_fragment" android:id="@+id/cardSearcher_fragment"
android:name="cn.garymb.ygomobile.ui.cards.CardSearchFragment" android:name="cn.garymb.ygomobile.ui.cards.CardSearchFragment"
tools:layout="@layout/activity_search"/> tools:layout="@layout/search_fragment"/>
<fragment <fragment
android:id="@+id/mycard_fragment" android:id="@+id/mycard_fragment"
android:name="cn.garymb.ygomobile.ui.mycard.MycardFragment" android:name="cn.garymb.ygomobile.ui.mycard.MycardFragment"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment