自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 收藏
  • 关注

原创 android 加载Gif图

在build.gradle(Module:app)中通过添加以下代码添加为依赖项:allprojects{repositories{mavenCentral()}}dependencies{implementation'pl.droidsonroids.gif:android-gif-drawable:1.2.17'}然后同步您的项目。同步结束时,转到布局文件并添加以下代码:<pl.droidsonroids.gif.GifImageView...

2020-11-26 18:25:18 447

原创 Fragment跳转Activity

FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();//要跳转的FragmentSubmitSubscribePagerFragment firstFragment = new SubmitSubscribePagerFragment();//此处ID是布局Fragment的布...

2019-01-09 16:56:21 884

原创 Android多渠道打包

首先在清单文件里面&lt;meta-data android:name="BaiduMobAd_CHANNEL" android:value="CHANNEL_ID" /&gt;然后在自己的app Gradle里面加上 // 配置所有的渠道名,如需增加其他渠道,则以类似的形式在productFlavors里面添加对应的即可 ...

2018-11-02 16:53:47 280

原创 Android按钮点击效果

1、&lt;!-- 按钮设置按下去的不同效果的方式,设置android:background属性,      下面的 button_select实际上是button_select.xml --&gt;&lt;!-- 按钮设置按下去的不同效果的方式,设置android:background属性,           下面的 button_select实际上是button_select.xm...

2018-08-24 11:47:33 2380

原创 Android圆角按钮

1、布局中的Button按钮&lt;Button          android:id="@+id/repeat"         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:text="圆角按钮"         android:...

2018-08-24 11:31:47 253

原创 Android屏幕适配

1、当前moudle的gradle:到依赖     compile 'com.zhy:autolayout:1.4.3'          2、 mainifes中:       //位置1 &lt;/activity&gt;               &lt;meta-data android:name="design_width" android:value="1080"&gt...

2018-08-24 09:59:58 191

转载 Android转义字符

HTML中&lt;, &gt;,&amp;等有特别含义,(前两个字符用于链接签,&amp;用于转义),不能直接使用。使用这三个字符时,应使用他们的转义序列,如下所示: &amp;amp; 或 &amp; &amp; 和 &amp;lt; 或 &lt; &lt; 小于号 ...

2018-08-24 09:50:22 2833

原创 RecyclerView超级适配器

一:先添加依赖(可以在“BRVAH”网页上查找最新依赖)先在 build.gradle(Project:XXXX) 的 repositories 添加:allprojects { repositories { ... maven { url "https://jitpack.io" } }}然后在 build.grad...

2018-08-10 16:17:24 197

原创 FragmentAdapter

import android.support.annotation.Nullable;import android.support.v4.app.Fragment;import android.support.v4.app.FragmentManager;import android.support.v4.app.FragmentPagerAdapter;import java.uti...

2018-08-10 16:09:33 1351

原创 TMVP

一:创建NewsMainContract:public class NewsMainContract { public interface View extends BaseView { void onSuccess1(BeautyBean beautyBean); void onSuccess2(VideoBean videoBean); ...

2018-08-10 16:06:42 683

原创 Retrofit和RxJava

Retrofit retrofit = new Retrofit.Builder() .addConverterFactory(GsonConverterFactory.create()) .addCallAdapterFactory(RxJavaCallAdapterFactory.create()) .baseUrl("http://gank....

2018-07-18 08:46:00 172

原创 动画

一、在drawable中创建animal&lt;&lt;span style="color:#000080;font-weight:bold;"&gt;setxmlns:android="http://schemas.android.com/apk/res/android"android:duration="5000"&gt;&lt;&lt;span style="color:#00008

2018-07-05 14:49:28 165

原创 QQ分享

Intent intent = new Intent(Intent.ACTION_SEND);intent.setType("text/plain");intent.putExtra(Intent.EXTRA_SUBJECT, "分享");intent.putExtra(Intent.EXTRA_TEXT, "喜欢你傻傻的可爱");intent.setFlags(Intent.FLAG_ACTIV...

2018-07-05 14:45:38 348

原创 正则表达式

一、Xml布局中&lt;&lt;span style="color:#000080;font-weight:bold;"&gt;EditTextandroid:id="@+id/mEditText1"android:hint="请输入手机号或邮箱"android:layout_width="match_parent"android:layout_height="wrap_content&

2018-07-05 14:44:11 189

原创 圆形图片一行代码实现

1.导依赖    compile 'com.github.bumptech.glide:glide:4.3.1'   2.添加网络权限     //一行代码直接实现 //注意的地方:ming改成自己的ImageView变量名   Glide.with(this).load(photo).apply(RequestOptions.bitmapTransform(new CircleCrop()))....

2018-07-05 14:42:03 242

原创 节操播放器

一、添加类库compile 'cn.jzvd:jiaozivideoplayer:6.0.0'二、添加布局&lt;&lt;span class="pl-ent" style="box-sizing: border-box; outline: 0px; word-break: break-all; color: rgb(34, 134, 58);"&gt;cn.jzvd.JZVideoPlayerS...

2018-07-05 14:41:41 370

原创 二级列表

一、Mactivity的Xml中&lt;&lt;span style="color:#000080;font-weight:bold;"&gt;ExpandableListViewandroid:id="@+id/mExpandableView"android:layout_width="match_parent"android:layout_height="wrap_content"a...

2018-07-05 14:40:39 192

原创 音乐播放器

XML:&lt;&lt;span style="color:#000080;font-weight:bold;"&gt;Buttonandroid:id="@+id/mBtn1"android:text="播放"android:layout_width="match_parent"android:layout_height="wrap_content" /&gt;&a

2018-07-05 14:38:36 321

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除