Commit 87159a2b authored by fallenstardust's avatar fallenstardust

恢复搜索引导布局

parent 98f2faa0
package cn.garymb.ygomobile.ui.cards; package cn.garymb.ygomobile.ui.cards;
import android.graphics.Color;
import android.graphics.DashPathEffect;
import android.graphics.Paint;
import android.os.Bundle; import android.os.Bundle;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
...@@ -21,6 +24,10 @@ import androidx.recyclerview.widget.FastScrollLinearLayoutManager; ...@@ -21,6 +24,10 @@ import androidx.recyclerview.widget.FastScrollLinearLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.app.hubert.guide.NewbieGuide;
import com.app.hubert.guide.model.GuidePage;
import com.app.hubert.guide.model.HighLight;
import com.app.hubert.guide.model.HighlightOptions;
import com.ourygo.assistant.util.DuelAssistantManagement; import com.ourygo.assistant.util.DuelAssistantManagement;
import java.util.List; import java.util.List;
...@@ -65,13 +72,14 @@ public class CardSearchFragment extends BaseFragemnt implements CardLoader.CallB ...@@ -65,13 +72,14 @@ public class CardSearchFragment extends BaseFragemnt implements CardLoader.CallB
private DialogPlus mDialog; private DialogPlus mDialog;
private TextView mResult_count; private TextView mResult_count;
private View layoutView;
@Override @Override
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;
layoutView = inflater.inflate(R.layout.fragment_search, container, false); layoutView = inflater.inflate(R.layout.fragment_search, container, false);
initView(layoutView); initView(layoutView);
//showNewbieGuide(); showNewbieGuide();
return layoutView; return layoutView;
} }
...@@ -340,7 +348,7 @@ public class CardSearchFragment extends BaseFragemnt implements CardLoader.CallB ...@@ -340,7 +348,7 @@ public class CardSearchFragment extends BaseFragemnt implements CardLoader.CallB
super.onStop(); super.onStop();
CardFavorites.get().save(); CardFavorites.get().save();
} }
/*
//https://www.jianshu.com/p/99649af3b191 //https://www.jianshu.com/p/99649af3b191
public void showNewbieGuide() { public void showNewbieGuide() {
HighlightOptions options = new HighlightOptions.Builder()//绘制一个高亮虚线圈 HighlightOptions options = new HighlightOptions.Builder()//绘制一个高亮虚线圈
...@@ -357,7 +365,7 @@ public class CardSearchFragment extends BaseFragemnt implements CardLoader.CallB ...@@ -357,7 +365,7 @@ public class CardSearchFragment extends BaseFragemnt implements CardLoader.CallB
.addGuidePage( .addGuidePage(
GuidePage.newInstance().setEverywhereCancelable(true) GuidePage.newInstance().setEverywhereCancelable(true)
.setBackgroundColor(0xbc000000) .setBackgroundColor(0xbc000000)
.addHighLightWithOptions(findViewById(R.id.btn_search), HighLight.Shape.CIRCLE, options) .addHighLightWithOptions(layoutView.findViewById(R.id.btn_search), HighLight.Shape.CIRCLE, options)
.setLayoutRes(R.layout.view_guide_home) .setLayoutRes(R.layout.view_guide_home)
.setOnLayoutInflatedListener((view, controller) -> { .setOnLayoutInflatedListener((view, controller) -> {
TextView tv = view.findViewById(R.id.text_about); TextView tv = view.findViewById(R.id.text_about);
...@@ -369,7 +377,7 @@ public class CardSearchFragment extends BaseFragemnt implements CardLoader.CallB ...@@ -369,7 +377,7 @@ public class CardSearchFragment extends BaseFragemnt implements CardLoader.CallB
.addGuidePage( .addGuidePage(
GuidePage.newInstance().setEverywhereCancelable(true) GuidePage.newInstance().setEverywhereCancelable(true)
.setBackgroundColor(0xbc000000) .setBackgroundColor(0xbc000000)
.addHighLightWithOptions(findViewById(R.id.search_result_count), HighLight.Shape.CIRCLE, options) .addHighLightWithOptions(layoutView.findViewById(R.id.search_result_count), HighLight.Shape.CIRCLE, options)
.setLayoutRes(R.layout.view_guide_home) .setLayoutRes(R.layout.view_guide_home)
.setOnLayoutInflatedListener((view, controller) -> { .setOnLayoutInflatedListener((view, controller) -> {
TextView tv = view.findViewById(R.id.text_about); TextView tv = view.findViewById(R.id.text_about);
...@@ -380,5 +388,5 @@ public class CardSearchFragment extends BaseFragemnt implements CardLoader.CallB ...@@ -380,5 +388,5 @@ public class CardSearchFragment extends BaseFragemnt implements CardLoader.CallB
) )
//.alwaysShow(true)//总是显示,调试时可以打开 //.alwaysShow(true)//总是显示,调试时可以打开
.show(); .show();
}*/ }
} }
...@@ -1326,7 +1326,7 @@ public class DeckManagerFragment extends BaseFragemnt implements RecyclerViewIte ...@@ -1326,7 +1326,7 @@ public class DeckManagerFragment extends BaseFragemnt implements RecyclerViewIte
tv.setText(R.string.guide_view_move_card); tv.setText(R.string.guide_view_move_card);
}) })
) )
.alwaysShow(true)//总是显示,调试时可以打开 //.alwaysShow(true)//总是显示,调试时可以打开
.show(); .show();
} }
......
...@@ -179,8 +179,8 @@ ...@@ -179,8 +179,8 @@
android:id="@+id/text_about" android:id="@+id/text_about"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="bottom"
android:layout_margin="20dp" android:layout_margin="50dp"
android:paddingBottom="70dp" android:paddingBottom="70dp"
android:shadowColor="#000000" android:shadowColor="#000000"
android:shadowDy="2" android:shadowDy="2"
......
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