(1) <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="ma ...
                            
                            
                                分类:
移动开发   时间:
2017-06-11 13:01:29   
                                阅读次数:
140
                             
                    
                        
                            
                            
                                有的场景下,我们须要把手机屏幕方向改变,以下是我写的一个样例。 xml页面文件: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.androi ...
                            
                            
                                分类:
移动开发   时间:
2017-06-10 19:21:47   
                                阅读次数:
204
                             
                    
                        
                            
                            
                                先上效果图,选择不同的模块,滑动会通过动画形式滑过去,这样的适合新闻client多种栏目的展示: 这么写Layout: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_ ...
                            
                            
                                分类:
移动开发   时间:
2017-06-10 15:19:50   
                                阅读次数:
179
                             
                    
                        
                            
                            
                                近期在做获取验证码的功能。考虑到优良的用户体验,决定制作一个拥有倒计时提示的Button按钮,在网上查了一些资料,非常是简单的就能实现。我写了一个小Demo,大家能够应用到自己的项目中。一、代码1.activity_main.xml:<RelativeLayout xmlns:android="ht ...
                            
                            
                                分类:
移动开发   时间:
2017-06-10 12:39:51   
                                阅读次数:
213
                             
                    
                        
                            
                            
                                小白:之前分享了ViewStub标签的使用。Android还有其它优化布局的方式吗? 小黑:<merge />标签用于降低View树的层次来优化Android的布局。先来用个样例演示一下: 首先主须要一个配置文件activity_main.xml <RelativeLayout xmlns:andr ...
                            
                            
                                分类:
移动开发   时间:
2017-06-07 19:50:30   
                                阅读次数:
256
                             
                    
                        
                            
                            
                                效果图省略。。。 activity_main.xml(仅仅有一个自己定义ListView) <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.a ...
                            
                            
                                分类:
其他好文   时间:
2017-06-04 09:48:46   
                                阅读次数:
283
                             
                    
                        
                            
                            
                                    一、LinearLayout(线性布局) 所包含的控件线性排列。 android:orientation属性vertical(垂直方向),horizontal(水平方向)。 二、RelativeLayout(相对布局) RelativeLayout 更加随意一些,可以通过相对定位的方式让控件出现在布 ...
                            
                            
                                分类:
其他好文   时间:
2017-06-03 15:11:25   
                                阅读次数:
288
                             
                    
                        
                            
                            
                                1.main.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_wi ...
                            
                            
                                分类:
移动开发   时间:
2017-06-03 12:41:38   
                                阅读次数:
309
                             
                    
                        
                            
                            
                                最近在看鸿洋大神的博客,在看到自定义部分View部分时,想到之前案子中经常会要用到"图片 + 文字"这类控件,如下图所示: 之前的做法是在布局文件中,将一个Image & TextView组件放在LinearLayout/RelativeLayout中。今天就尝试了通过自定义View的方式来实现"图 ...
                            
                            
                                分类:
移动开发   时间:
2017-06-02 23:53:52   
                                阅读次数:
322
                             
                    
                        
                            
                            
                                我们通过Face++提供的api和服务实现HowOld App的开发。首先我们实现图片的选择功能。1.main.xml:<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="ht ...
                            
                            
                                分类:
移动开发   时间:
2017-06-02 11:46:27   
                                阅读次数:
235