Commit 6a37a700 authored by fallenstardust's avatar fallenstardust

迁移服务器列表到fragment

parent 6faf195c
......@@ -18,7 +18,8 @@ import android.text.TextUtils;
import android.util.Log;
import android.widget.Toast;
import com.ourygo.assistant.base.listener.OnDeRoomListener;
import androidx.fragment.app.Fragment;
import com.ourygo.assistant.util.YGODAUtil;
import java.io.File;
......@@ -29,7 +30,7 @@ import cn.garymb.ygodata.YGOGameOptions;
import cn.garymb.ygomobile.bean.Deck;
import cn.garymb.ygomobile.lite.R;
import cn.garymb.ygomobile.ui.cards.DeckManagerActivity;
import cn.garymb.ygomobile.ui.home.MainActivity;
import cn.garymb.ygomobile.ui.home.HomeFragment;
import cn.garymb.ygomobile.ui.preference.SettingsActivity;
import cn.garymb.ygomobile.utils.FileUtils;
import cn.garymb.ygomobile.utils.IOUtils;
......@@ -39,6 +40,7 @@ import ocgcore.DataManager;
public class GameUriManager {
private Activity activity;
private Fragment fragment;
private String fname;
public GameUriManager(Activity activity) {
......@@ -254,9 +256,9 @@ public class GameUriManager {
} else if (Constants.URI_ROOM.equals(host)) {
YGODAUtil.deRoomListener(uri, (host1, port, password, exception) -> {
if (TextUtils.isEmpty(exception))
if (activity instanceof MainActivity) {
MainActivity mainActivity = (MainActivity) activity;
mainActivity.quickjoinRoom(host1, port, password);
if (fragment instanceof HomeFragment) {
HomeFragment homeFragment = (HomeFragment) fragment;
homeFragment.quickjoinRoom(host1, port, password);
} else {
YGOUtil.show(exception);
}
......
......@@ -82,11 +82,8 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
private static final int ID_MAINACTIVITY = 0;
protected SwipeMenuRecyclerView mServerList;
long exitLasttime = 0;
private ServerListAdapter mServerListAdapter;
private ServerListManager mServerListManager;
private DuelAssistantManagement duelAssistantManagement;
private CardManager mCardManager;
private CardDetailRandom mCardDetailRandom;
......@@ -102,11 +99,6 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
setExitAnimEnable(false);
mImageLoader = new ImageLoader(false);
mCardManager = DataManager.get().getCardManager();
//server list
initServerlist();
//event
EventBus.getDefault().register(this);
QbSdk.PreInitCallback cb = new QbSdk.PreInitCallback() {
@Override
......@@ -137,8 +129,8 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
checkNotch();
//showNewbieGuide("homePage");
initBottomNavigationBar();
onItemSelect();
}
private void initBottomNavigationBar() {
// 获取页面上的底部导航栏控件
BottomNavigationView navView = findViewById(R.id.nav_view);
......@@ -153,33 +145,12 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
NavigationUI.setupWithNavController(navView, navController);
getSupportActionBar().hide();
}
//调用
private void onItemSelect() {
mOnItemSelectedListener = new BottomNavigationView.OnNavigationItemSelectedListener() {
@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.home_fragment:
return true;
case R.id.mycard_fragment:
return true;
case R.id.setting_fragment:
return true;
}
return false;
}
};
}
@Override
protected void onResume() {
super.onResume();
duelAssistantCheck();
//server list
mServerListManager.syncLoadData();
}
@Override
......@@ -212,7 +183,7 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
@Override
public void onJoinRoom(String host, int port, String password, int id) {
if (id == ID_MAINACTIVITY) {
quickjoinRoom(host, port, password);
//quickjoinRoom(host, port, password);
}
}
......@@ -262,29 +233,6 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
EventBus.getDefault().unregister(this);
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onServerInfoEvent(ServerInfoEvent event) {
if (event.delete) {
DialogPlus dialogPlus = new DialogPlus(getContext());
dialogPlus.setTitle(R.string.question);
dialogPlus.setMessage(R.string.delete_server_info);
dialogPlus.setMessageGravity(Gravity.CENTER_HORIZONTAL);
dialogPlus.setLeftButtonListener((dialog, which) -> {
mServerListManager.delete(event.position);
mServerListAdapter.notifyDataSetChanged();
dialog.dismiss();
});
dialogPlus.setCancelable(true);
dialogPlus.setOnCloseLinster(null);
dialogPlus.show();
} else if (event.join) {
joinRoom(event.position);
//showNewbieGuide("joinRoom");
} else {
mServerListManager.showEditDialog(event.position);
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
......@@ -322,7 +270,7 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
if (mCardDetailRandom != null) {
mCardDetailRandom.show();
}
openGame();
//openGame();
break;
case R.id.action_settings: {
Intent intent = new Intent(this, SettingsActivity.class);
......@@ -394,102 +342,7 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
}
}
public void joinRoom(int position) {
ServerInfo serverInfo = mServerListAdapter.getItem(position);
if (serverInfo == null) {
return;
}
//进入房间
DialogPlus builder = new DialogPlus(getContext());
builder.setTitle(R.string.intput_room_name);
builder.setContentView(R.layout.dialog_room_name);
EditText editText = builder.bind(R.id.room_name);
ListView listView = builder.bind(R.id.room_list);
TextView text_abt_roomlist = builder.bind(R.id.abt_room_list);
SimpleListAdapter simpleListAdapter = new SimpleListAdapter(getContext());
simpleListAdapter.set(AppsSettings.get().getLastRoomList());
if (AppsSettings.get().getLastRoomList().size() > 0)
text_abt_roomlist.setVisibility(View.VISIBLE);
else text_abt_roomlist.setVisibility(View.GONE);
listView.setAdapter(simpleListAdapter);
listView.setOnItemClickListener((a, v, pos, index) -> {
String name = simpleListAdapter.getItemById(index);
editText.setText(name);
});
editText.setOnEditorActionListener((v, actionId, event) -> {
if (actionId == EditorInfo.IME_ACTION_DONE) {
builder.dismiss();
String name = editText.getText().toString();
if (!TextUtils.isEmpty(name)) {
List<String> items = simpleListAdapter.getItems();
int index = items.indexOf(name);
if (index >= 0) {
items.remove(index);
items.add(0, name);
} else {
items.add(0, name);
}
AppsSettings.get().setLastRoomList(items);
simpleListAdapter.notifyDataSetChanged();
}
joinGame(serverInfo, name);
return true;
}
return false;
});
listView.setOnItemLongClickListener((a, v, i, index) -> {
String name = simpleListAdapter.getItemById(index);
int pos = simpleListAdapter.findItem(name);
if (pos >= 0) {
simpleListAdapter.remove(pos);
simpleListAdapter.notifyDataSetChanged();
AppsSettings.get().setLastRoomList(simpleListAdapter.getItems());
}
return true;
});
builder.setLeftButtonText(R.string.join_game);
builder.setLeftButtonListener((dlg, i) -> {
dlg.dismiss();
if (Build.VERSION.SDK_INT >= 23 && YGOStarter.isGameRunning(getActivity())) {
Toast toast = Toast.makeText(getApplicationContext(), R.string.tip_return_to_duel, Toast.LENGTH_SHORT);
toast.setGravity(Gravity.CENTER, 0, 0);
toast.show();
openGame();
} else {
//保存名字
String name = editText.getText().toString();
if (!TextUtils.isEmpty(name)) {
List<String> items = simpleListAdapter.getItems();
int index = items.indexOf(name);
if (index >= 0) {
items.remove(index);
items.add(0, name);
} else {
items.add(0, name);
}
AppsSettings.get().setLastRoomList(items);
simpleListAdapter.notifyDataSetChanged();
}
joinGame(serverInfo, name);
}
});
builder.setOnCloseLinster((dlg) -> {
dlg.dismiss();
});
builder.setOnCancelListener((dlg) -> {
});
builder.show();
}
void joinGame(ServerInfo serverInfo, String name) {
showTipsToast();
YGOGameOptions options = new YGOGameOptions();
options.mServerAddr = serverInfo.getServerAddr();
options.mUserName = serverInfo.getPlayerName();
options.mPort = serverInfo.getPort();
options.mRoomName = name;
YGOStarter.startGame(this, options);
}
protected abstract void checkResourceDownload(ResCheckTask.ResCheckListener listener);
......@@ -552,59 +405,6 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
});
}
public void quickjoinRoom(String host, int port, String password) {
String message;
if (!TextUtils.isEmpty(host))
message = getString(R.string.quick_join)
+ "\nIP:" + host
+ "\n端口:" + port
+ "\n密码:" + password;
else
message = getString(R.string.quick_join) + ":\"" + password + "\"";
DialogPlus dialog = new DialogPlus(this);
dialog.setTitle(R.string.question);
dialog.setMessage(message);
dialog.setMessageGravity(Gravity.CENTER_HORIZONTAL);
dialog.setLeftButtonText(R.string.Cancel);
dialog.setRightButtonText(R.string.join);
dialog.show();
dialog.setRightButtonListener((dlg, s) -> {
dialog.dismiss();
ServerListAdapter mServerListAdapter = new ServerListAdapter(this);
ServerListManager mServerListManager = new ServerListManager(this, mServerListAdapter);
mServerListManager.syncLoadData();
File xmlFile = new File(getFilesDir(), Constants.SERVER_FILE);
VUiKit.defer().when(() -> {
ServerList assetList = ServerListManager.readList(this.getAssets().open(ASSET_SERVER_LIST));
ServerList fileList = xmlFile.exists() ? ServerListManager.readList(new FileInputStream(xmlFile)) : null;
if (fileList == null) {
return assetList;
}
if (fileList.getVercode() < assetList.getVercode()) {
xmlFile.delete();
return assetList;
}
return fileList;
}).done((list) -> {
if (list != null) {
String host1 = host;
int port1 = port;
ServerInfo serverInfo = list.getServerInfoList().get(0);
if (!TextUtils.isEmpty(host1)) {
serverInfo.setServerAddr(host1);
serverInfo.setPort(port1);
}
joinGame(serverInfo, password);
}
});
});
dialog.setLeftButtonListener((dlg, s) -> {
dialog.dismiss();
});
}
public void setRandomCardDetail() {
//加载数据库中所有卡片卡片
mCardManager.loadCards();
......@@ -617,39 +417,6 @@ public abstract class HomeActivity extends BaseActivity implements OnDuelAssista
mCardDetailRandom = CardDetailRandom.genRandomCardDetail(this, mImageLoader, cardInfo);
}
public void showTipsToast() {
if (!YGOStarter.isGameRunning(getActivity())) {
String[] tipsList = this.getResources().getStringArray(R.array.tips);
int x = (int) (Math.random() * tipsList.length);
String tips = tipsList[x];
Toast.makeText(this, tips, Toast.LENGTH_LONG).show();
}
}
public void initServerlist() {
mServerList = $(R.id.list_server);
mServerListAdapter = new ServerListAdapter(this);
LayoutInflater infla = LayoutInflater.from(this);
View footView = infla.inflate(R.layout.item_ic_add, null);
TextView add_server = footView.findViewById(R.id.add_server);
add_server.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mServerListManager.addServer();
}
});
mServerListAdapter.addFooterView(footView);
//server list
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
mServerList.setLayoutManager(linearLayoutManager);
DividerItemDecoration dividerItemDecoration =
new DividerItemDecoration(this, DividerItemDecoration.VERTICAL);
mServerList.addItemDecoration(dividerItemDecoration);
mServerList.setAdapter(mServerListAdapter);
mServerListManager = new ServerListManager(this, mServerListAdapter);
mServerListManager.bind(mServerList);
mServerListManager.syncLoadData();
}
/*
//https://www.jianshu.com/p/99649af3b191
public void showNewbieGuide(String scene) {
......
package cn.garymb.ygomobile.ui.home;
import static cn.garymb.ygomobile.Constants.ASSET_SERVER_LIST;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.tubb.smrv.SwipeMenuRecyclerView;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.List;
import cn.garymb.ygodata.YGOGameOptions;
import cn.garymb.ygomobile.App;
import cn.garymb.ygomobile.AppsSettings;
import cn.garymb.ygomobile.Constants;
import cn.garymb.ygomobile.YGOStarter;
import cn.garymb.ygomobile.base.BaseFragemnt;
import cn.garymb.ygomobile.bean.Deck;
import cn.garymb.ygomobile.bean.ServerInfo;
import cn.garymb.ygomobile.bean.ServerList;
import cn.garymb.ygomobile.bean.events.ServerInfoEvent;
import cn.garymb.ygomobile.lite.R;
import cn.garymb.ygomobile.ui.activities.FileLogActivity;
import cn.garymb.ygomobile.ui.adapters.ServerListAdapter;
import cn.garymb.ygomobile.ui.adapters.SimpleListAdapter;
import cn.garymb.ygomobile.ui.cards.CardSearchActivity;
import cn.garymb.ygomobile.ui.cards.DeckManagerActivity;
import cn.garymb.ygomobile.ui.cards.deck.DeckUtils;
import cn.garymb.ygomobile.ui.mycard.MyCardActivity;
import cn.garymb.ygomobile.ui.plus.DialogPlus;
import cn.garymb.ygomobile.ui.plus.VUiKit;
import cn.garymb.ygomobile.ui.widget.Shimmer;
import cn.garymb.ygomobile.ui.widget.ShimmerTextView;
import cn.garymb.ygomobile.utils.YGOUtil;
public class HomeFragment extends BaseFragemnt {
private static final int ID_HOMEFRAGMENT = 0;
ShimmerTextView tv;
Shimmer shimmer;
protected SwipeMenuRecyclerView mServerList;
private ServerListAdapter mServerListAdapter;
private ServerListManager mServerListManager;
@Nullable
@Override
......@@ -39,11 +78,32 @@ public class HomeFragment extends BaseFragemnt {
layoutView = inflater.inflate(R.layout.main_fragment, container, false);
initView(layoutView, savedInstanceState);
return layoutView;
}
private void initView(View view, Bundle saveBundle) {
//服务器列表
mServerList = view.findViewById(R.id.list_server);
mServerListAdapter = new ServerListAdapter(getActivity());
LayoutInflater infla = LayoutInflater.from(getActivity());
View footView = infla.inflate(R.layout.item_ic_add, null);
TextView add_server = footView.findViewById(R.id.add_server);
add_server.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mServerListManager.addServer();
}
});
mServerListAdapter.addFooterView(footView);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
mServerList.setLayoutManager(linearLayoutManager);
DividerItemDecoration dividerItemDecoration =
new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL);
mServerList.addItemDecoration(dividerItemDecoration);
mServerList.setAdapter(mServerListAdapter);
mServerListManager = new ServerListManager(getActivity(), mServerListAdapter);
mServerListManager.bind(mServerList);
mServerListManager.syncLoadData();
//萌卡
ImageView iv_mc = view.findViewById(R.id.btn_mycard);
iv_mc.setOnClickListener((v) -> {
......@@ -63,6 +123,158 @@ public class HomeFragment extends BaseFragemnt {
tv = (ShimmerTextView) view.findViewById(R.id.shimmer_tv);
toggleAnimation(tv);
}
public void joinRoom(int position) {
ServerInfo serverInfo = mServerListAdapter.getItem(position);
if (serverInfo == null) {
return;
}
//进入房间
DialogPlus builder = new DialogPlus(getContext());
builder.setTitle(R.string.intput_room_name);
builder.setContentView(R.layout.dialog_room_name);
EditText editText = builder.bind(R.id.room_name);
ListView listView = builder.bind(R.id.room_list);
TextView text_abt_roomlist = builder.bind(R.id.abt_room_list);
SimpleListAdapter simpleListAdapter = new SimpleListAdapter(getContext());
simpleListAdapter.set(AppsSettings.get().getLastRoomList());
if (AppsSettings.get().getLastRoomList().size() > 0)
text_abt_roomlist.setVisibility(View.VISIBLE);
else text_abt_roomlist.setVisibility(View.GONE);
listView.setAdapter(simpleListAdapter);
listView.setOnItemClickListener((a, v, pos, index) -> {
String name = simpleListAdapter.getItemById(index);
editText.setText(name);
});
editText.setOnEditorActionListener((v, actionId, event) -> {
if (actionId == EditorInfo.IME_ACTION_DONE) {
builder.dismiss();
String name = editText.getText().toString();
if (!TextUtils.isEmpty(name)) {
List<String> items = simpleListAdapter.getItems();
int index = items.indexOf(name);
if (index >= 0) {
items.remove(index);
items.add(0, name);
} else {
items.add(0, name);
}
AppsSettings.get().setLastRoomList(items);
simpleListAdapter.notifyDataSetChanged();
}
joinGame(serverInfo, name);
return true;
}
return false;
});
listView.setOnItemLongClickListener((a, v, i, index) -> {
String name = simpleListAdapter.getItemById(index);
int pos = simpleListAdapter.findItem(name);
if (pos >= 0) {
simpleListAdapter.remove(pos);
simpleListAdapter.notifyDataSetChanged();
AppsSettings.get().setLastRoomList(simpleListAdapter.getItems());
}
return true;
});
builder.setLeftButtonText(R.string.join_game);
builder.setLeftButtonListener((dlg, i) -> {
dlg.dismiss();
if (Build.VERSION.SDK_INT >= 23 && YGOStarter.isGameRunning(getActivity())) {
Toast toast = Toast.makeText(App.get().getApplicationContext(), R.string.tip_return_to_duel, Toast.LENGTH_SHORT);
toast.setGravity(Gravity.CENTER, 0, 0);
toast.show();
openGame();
} else {
//保存名字
String name = editText.getText().toString();
if (!TextUtils.isEmpty(name)) {
List<String> items = simpleListAdapter.getItems();
int index = items.indexOf(name);
if (index >= 0) {
items.remove(index);
items.add(0, name);
} else {
items.add(0, name);
}
AppsSettings.get().setLastRoomList(items);
simpleListAdapter.notifyDataSetChanged();
}
joinGame(serverInfo, name);
}
});
builder.setOnCloseLinster((dlg) -> {
dlg.dismiss();
});
builder.setOnCancelListener((dlg) -> {
});
builder.show();
}
void joinGame(ServerInfo serverInfo, String name) {
showTipsToast();
YGOGameOptions options = new YGOGameOptions();
options.mServerAddr = serverInfo.getServerAddr();
options.mUserName = serverInfo.getPlayerName();
options.mPort = serverInfo.getPort();
options.mRoomName = name;
YGOStarter.startGame(getActivity(), options);
}
public void quickjoinRoom(String host, int port, String password) {
String message;
if (!TextUtils.isEmpty(host))
message = getString(R.string.quick_join)
+ "\nIP:" + host
+ "\n端口:" + port
+ "\n密码:" + password;
else
message = getString(R.string.quick_join) + ":\"" + password + "\"";
DialogPlus dialog = new DialogPlus(getActivity());
dialog.setTitle(R.string.question);
dialog.setMessage(message);
dialog.setMessageGravity(Gravity.CENTER_HORIZONTAL);
dialog.setLeftButtonText(R.string.Cancel);
dialog.setRightButtonText(R.string.join);
dialog.show();
dialog.setRightButtonListener((dlg, s) -> {
dialog.dismiss();
ServerListAdapter mServerListAdapter = new ServerListAdapter(getActivity());
ServerListManager mServerListManager = new ServerListManager(getActivity(), mServerListAdapter);
mServerListManager.syncLoadData();
File xmlFile = new File(App.get().getFilesDir(), Constants.SERVER_FILE);
VUiKit.defer().when(() -> {
ServerList assetList = ServerListManager.readList(getActivity().getAssets().open(ASSET_SERVER_LIST));
ServerList fileList = xmlFile.exists() ? ServerListManager.readList(new FileInputStream(xmlFile)) : null;
if (fileList == null) {
return assetList;
}
if (fileList.getVercode() < assetList.getVercode()) {
xmlFile.delete();
return assetList;
}
return fileList;
}).done((list) -> {
if (list != null) {
String host1 = host;
int port1 = port;
ServerInfo serverInfo = list.getServerInfoList().get(0);
if (!TextUtils.isEmpty(host1)) {
serverInfo.setServerAddr(host1);
serverInfo.setPort(port1);
}
joinGame(serverInfo, password);
}
});
});
dialog.setLeftButtonListener((dlg, s) -> {
dialog.dismiss();
});
}
public void BacktoDuel() {
tv.setOnClickListener((v) -> {
//openGame();
......@@ -83,11 +295,64 @@ public class HomeFragment extends BaseFragemnt {
}
}
public void showTipsToast() {
if (!YGOStarter.isGameRunning(getActivity())) {
String[] tipsList = this.getResources().getStringArray(R.array.tips);
int x = (int) (Math.random() * tipsList.length);
String tips = tipsList[x];
Toast.makeText(getActivity(), tips, Toast.LENGTH_LONG).show();
}
}
public void onJoinRoom(String host, int port, String password, int id) {
if (id == ID_HOMEFRAGMENT) {
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)
public void onServerInfoEvent(ServerInfoEvent event) {
if (event.delete) {
DialogPlus dialogPlus = new DialogPlus(getContext());
dialogPlus.setTitle(R.string.question);
dialogPlus.setMessage(R.string.delete_server_info);
dialogPlus.setMessageGravity(Gravity.CENTER_HORIZONTAL);
dialogPlus.setLeftButtonListener((dialog, which) -> {
mServerListManager.delete(event.position);
mServerListAdapter.notifyDataSetChanged();
dialog.dismiss();
});
dialogPlus.setCancelable(true);
dialogPlus.setOnCloseLinster(null);
dialogPlus.show();
} else if (event.join) {
joinRoom(event.position);
//showNewbieGuide("joinRoom");
} else {
mServerListManager.showEditDialog(event.position);
}
}
protected void openGame() {
YGOStarter.startGame(getActivity(), null);
}
@Override
public void onResume() {
super.onResume();
BacktoDuel();
//server list
mServerListManager.syncLoadData();
}
@Override
......
......@@ -7,18 +7,6 @@
android:fitsSystemWindows="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#80000000"
android:orientation="vertical"></LinearLayout>
<com.tubb.smrv.SwipeMenuRecyclerView
android:id="@+id/list_server"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/container"
android:layout_width="match_parent"
......
......@@ -4,6 +4,18 @@
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#80000000"
android:orientation="vertical"></LinearLayout>
<com.tubb.smrv.SwipeMenuRecyclerView
android:id="@+id/list_server"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none" />
<cn.garymb.ygomobile.ui.widget.ShimmerTextView
android:id="@+id/shimmer_tv"
android:layout_width="150dp"
......
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