Android
依然是菜菜鸟
这个作者很懒,什么都没留下…
展开
-
android Spinner的简单实现
binFileSpinner = findViewById(R.id.binFileSpinner); try { String[] tempFileArray = mContext.getAssets().list(""); Log.e(TAG, "tempFileArray: "+ Arrays.toString(tempFileArray)); ArrayList<String> file = new原创 2021-08-19 10:37:41 · 228 阅读 · 2 评论 -
Android RecyclerView的最简单实现
适配器实现`public class RecyclerViewAdapter extends RecyclerView.Adapter<RecyclerViewAdapter.MyViewHolder>{private static final String TAG = “RecyclerViewAdapter”;public Context mContext;public ArrayList mList;public RecyclerViewAdapter(Context c..原创 2021-08-19 10:35:09 · 358 阅读 · 0 评论 -
Android 数据类型转换
StringBuffer 转换成 StringString c = stringBuffer.toString();String 换成 StringBufferString str=“Hello World.”;StringBuffer buffer = new StringBuffer(str);String str=“Hello World.”;StringBuffer buffer2 = new StringBuffer();buffer2.append(str);Strin.原创 2021-08-19 10:26:34 · 1119 阅读 · 0 评论 -
Android ToastUtil
用于方便显示、调试、打印public class MenuDialog extends Dialog { // private TextView mLanguage; //点击事件监听器,用于调用实现接口函数 public OnUpgradeClickListener onUpgradeClickListener; public OnHistoryClickListener onHistoryClickListener; public OnSettingCl原创 2021-08-19 10:22:03 · 418 阅读 · 0 评论 -
Android 菜单按钮弹出选项框
1.布局展示1.1在标题栏设置控件 <ImageView android:id="@+id/title_menu" android:layout_width="0dp" android:layout_weight="2" android:layout_height="35dp" android:layout_gravity="center" android:src="@mipmap/title_原创 2021-08-19 10:19:22 · 1494 阅读 · 0 评论 -
Android Fragment之间的跳转、切换
R.id.initial_fragment布局:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical" android:l原创 2021-08-19 10:00:20 · 1449 阅读 · 0 评论 -
Android 设置布局字体不随手机系统设置而改变
前言:这是原文参考链接添加链接描述public class BaseActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); } /****************************************** *原创 2021-08-19 09:50:32 · 378 阅读 · 0 评论