android studio
勇敢的小提莫
这个作者很懒,什么都没留下…
展开
-
android studio上传图片到java服务器
注:如果上传图片提示没有权限,则长按apk图标,打开读取本地文件的权限即可。4.spring boot后台接受图片并写入本地路径。2.AndroidManifest.xml配置权限。3.2安卓后台代码MainActivity。1.build.gradle配置(增加)3.1xml样式界面。原创 2022-03-15 16:13:36 · 3542 阅读 · 0 评论 -
android studio获取设备唯一标识
1.MainActivityimport android.provider.Settings.Secure;String android_id = Secure.getString(getBaseContext().getContentResolver(), Secure.ANDROID_ID);Log.i("MainActivity","唯一标示=="+android_id);原创 2021-12-23 10:25:30 · 1897 阅读 · 0 评论 -
android studio SeekBar滑动轴显示数字
1.样式xml<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="50dp" android:orientation="horizontal"> <SeekBar android:id="@+原创 2021-11-09 15:00:27 · 3852 阅读 · 0 评论 -
android studio定位gps
1.AndroidManifest.xml文件中添加权限<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission><uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>2.布局文件activity_ma转载 2021-07-13 15:08:47 · 3550 阅读 · 3 评论 -
SimpleAdapter自定义listview的格式
listview可以通过外部listview.xml文件来定义listview中的内容格式,因为listview.xml中可以添加textview,所以每行数据都可以完全自定义样式1.样式文件listview_item.xml<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:原创 2021-06-15 15:15:19 · 178 阅读 · 0 评论 -
android studio界面中包含另一个界面(两个界面都带listview)
1.主界面second.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">原创 2021-06-07 16:14:06 · 840 阅读 · 0 评论 -
科大讯飞语音中文播报
http://www.linowl.com/android-studio/189.html转载 2021-04-09 15:11:12 · 407 阅读 · 0 评论 -
android studio动态添加textview,listview点击删除数据
1.class类package com.example.listview;import android.annotation.SuppressLint;import android.os.Bundle;import androidx.appcompat.app.AppCompatActivity;import android.speech.tts.TextToSpeech;import android.view.View;import android.view.ViewGroup;im原创 2021-04-08 14:53:15 · 1409 阅读 · 0 评论 -
android studio并列层,显示和隐藏按钮,修改背景的自定义颜色
1.activity_sideby.xml<?xml version="1.0" encoding="utf-8"?><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" an原创 2020-08-20 13:43:04 · 1222 阅读 · 0 评论 -
android studio启动的主页面
打开AndroidManifest.xml配置文件 <activity android:name=".MainActivity"> <!-- 修改成想要启动的界面对应的class文件名称 --> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category andro原创 2020-08-05 14:56:06 · 1767 阅读 · 0 评论 -
android studio 自定义class对应xml布局文件
1.xml文件 myclass.xml文件<?xml version="1.0" encoding="utf-8"?><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" an原创 2020-08-05 14:53:45 · 1265 阅读 · 0 评论 -
android studio textview添加滚动条
1.xml布局代码 <TextView android:id="@+id/tv123" android:layout_width="match_parent" android:layout_height="wrap_content" android:scrollbars="vertical" android:maxLines="20" />2.java代码 TextView tv = fin原创 2020-07-28 15:40:58 · 1658 阅读 · 0 评论 -
android studio 返回上个界面
1.点击按钮返回上一个界面 abc.class Button btn2 = findViewById(R.id.re); btn2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { abc.this.finish(); } });备注:这个返回不会重置上一个界面里的内容...原创 2020-07-20 15:35:10 · 6405 阅读 · 0 评论 -
自己整理的android studio 自定义弹框获取和修改listview的数据
1.自定义编辑弹框update.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" &原创 2020-07-17 16:13:19 · 1053 阅读 · 0 评论 -
自己整理的androidstudio操作sqlite
1.操作界面activity_sqlite.xml文件<?xml version="1.0" encoding="utf-8"?><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"原创 2020-07-16 10:31:19 · 488 阅读 · 0 评论 -
android studio 圆角背景的使用
1.一般在drawable文件夹下新建文件translucent.xml<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android"> <!-- 背景颜色 --> <solid android:color="#33CCFF" /> <!-- 边框的宽度和颜色颜色 -->原创 2020-07-08 14:56:42 · 1048 阅读 · 0 评论 -
android studio布局
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/RelativeLayout1" android:layout_width="match_parent" an原创 2020-06-05 14:57:33 · 133 阅读 · 0 评论