一个view被设置了view.getvisibilityy=gone,在显示的时候它会不会被绘制

View the setVisibility three values can be set: VISIBLE ---& visible INVISIBLE ---& is not visible, but the View in ViewGroupt still retains its position as not to re-layout GONE ----& not visible, but the View is not retained in ViewGroupt posit
The Android system may be custom View all familiar with, View the properties for the custom to add, as well as Android's Layout of the name space, many users is not very clear with you again today Android123 brushed together. CwjView myView = new Cwj
Only 5M to android Source: http://d.download.csdn.net/down/1429398/GoWish After downloading the source code for Android, how in the Eclilpse Android source code inside the view? See on the Internet are many ways, I feel very complicated, if you just
这篇文章主要介绍了android自定义进度条渐变色View的实例代码,有需要的朋友可以参考一下 最近在公司,项目不是很忙了,偶尔看见一个兄台在CSDN求助,帮忙要一个自定义的渐变色进度条,我当时看了一下进度条,感觉挺漂亮的,就尝试的去自定义view实现了一个,废话不说,先上图吧! 这个自定义的view,完全脱离了android自带的ProgressView,并且没使用一张图片,这样就能更好的降低程序代码上的耦合性! 下面我贴出代码 ,大概讲解一下实现思路吧! package com.spring
以下是对Android通过onDraw实现在View中绘图操作的示例代码进行了详细的分析介绍,需要的朋友可以过来参考下 Android绘图操作,通过继承View实现,在onDraw函数中实现绘图. 下面是一个简单的例子: public class AndroidTest extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedIn
前言 尝试搜索了一下android 动画的中文资料,很多都是一些枯燥的翻译api的一些文档,很少有系统讲解如何利用动画开发一个应用的资料,忽然,发现很多应用也不怎么注重动画在app的应用,想了想,自己尝试总结一下吧.因为,本人也不是什么动画制作师,没法把动画做得很绚丽,只好,利用内置的效果,进行简单加工,如何发挥,由各位的创意来定.鉴于,很多有关的android的动画资料里面,都是堆代码的,所以,全部代码均放在了github上面,查看完整代码可以移步到github上面去. 特地说明一下,由于an
Android is finally the courage to look at the source code, OK ~ according to the steps given in the Internet: Steps are: 1, first download the SDK source code. android-1.5 download address the following http://rgruet.free.fr/public/android-1.5-cupcak
In the Android development process, we hope to implement a collapsible list view, is very simple, the routine is to explain the dynamic creation collapsible list view. Since the local system is the Japanese system. Eclispse garbled write comments. No
做笔记用,方便以后糊涂了,过来看看: 贴代码的话就太多了,但是不贴又怕以后看不明白: 子View import android.content.C import android.util.AttributeS import android.util.L import android.view.MotionE import android.widget.B import android.widget.TextV public class My
首先按照程序的目录结构大致分析: res/layout/ 这个目录存放的就是布局用的xml文件,一般默认为main.xml res/values/ 这个目录存放的是一堆常量的xml文件 res/drawable/ 存放的是一些图片什么的,当然图标也在这里 下面主要对layout下的xml文件做个介绍,顺便也把布局的方法总结一下: ·文件的开头 &?xml version=&1.0& encoding=&utf-8&?& 这是在说明xml版本及字符编码 ·
Hi, titan: To the best of my knowledge, there are two ways to implement customized view. The first is using &WindowManager.LayoutParams& Ex as below, WindowManager.LayoutP //allen add view begin LayoutInflater inflate = (LayoutInflater)
ImageView iv = (ImageView) findViewById(R.id.ImageView01); ImageView iv2 = (ImageView) findViewById(R.id.ImageView02); ImageView iv3 = (ImageView) findViewById(R.id.ImageView03); //draw Manner on a screen of interception, however, the information bar is b
公司项目中使用了popWindow,并且需求指明了popWindow必须是和Activity类似的全屏模式,并且从页面底部弹出! 当popWindow所有设计完毕后,从底部弹出popWindow,发现设置在popWindow的上的titlebar一部分被压入状态栏的底部了,也就是说全屏是全屏了,但是超过了应有的部分! 解决方案: 为了达到良好的兼容性,我们可以如下变现代码 /** * 用于获取状态栏的高度. * * @return 返回状态栏高度的像素值. */ private int getS
android's mediaPlayer have built-in MediaControl. We are better than their own rewrite this control: A view containing controls for a MediaPlayer. Typically contains the buttons like &Play / Pause&, &Rewind&, &Fast Forward& a
select to_char (dbms_metadata.get_ddl ('VIEW', '[VIEWNAME]')) select to_char (dbms_metadata.get_ddl ('TABLE', '[TABLENAME]')) Recall may need capital The &dbms_metadata.get_ddl& approach may have to look carefully.
ASP.NET MVC (from V1 onwards) to support a zone controller and view ViewData [] dictionary, so that programmers can use a late-bound manner by value from the controller to the view. This method can be used instead of or in connection with a strongly
在当下,列表组件不带下拉刷新的都不好意思叫列表.第一次完成列表的下拉刷新功能的时候,直接在Activity中实现,虽然功能上是实现了,总体上感觉很乱.所以第二次用到的时候,就想着封装成一个组件,实现和Activity的解耦. 大致上,我们发现,下拉刷新的列表和一般列表的区别是,当滚动条在顶端的时候,再往下拉动就会把整个列表拉下来,显示出松开刷新的提示.由此可以看出,在构建这个下拉刷新的组件的时候,只用继承ListView,然后重写onTouchEvent就能实现.还有就是要能在xml布局文件中引
简单的自定义dialog,该dialog具备以下功能:有一个窗口可以显示文章.根据需求显示,有需要的朋友可以参考下 本人工作有一个月多了.对于android很多东西,都有了新的了解或者说真正的掌握.为了让更多的像我这样的小白少走弯路,所以我会坚持将我在工作中遇到的一些比较令我印象深刻的知识点整合出来给大家(顺序是按照我工作到现在的时间来制作的,其实也是想给自己一个记录吧.记录自己一路走来以及以后的路, 至少我想找到曾经的记录都有了). 第一个需求:简单的自定义dialog 需求:创建一个dial
/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the &License&); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://w
1. Android的HelloWorld 1.src目录存放源代码:gen目录是工具帮我们生成的,不可修改:R.java里面的id为res文件夹下的文件或者xml文件中的键值对相对应的.assets文件夹也可以存放文件,这和res文件夹的不同在于,assets文件夹中的文件是不会在R.java中生成id的. 2.在Manifest.xml文件中,哪个Activity中定义有以下语句,这个Activity就是程序的主入口. &intent-filter& &action android:
相比与书签模块, 历史模块功能比较简单, 代码很好理解,很值得学习其架构实现, 我们就从代码层面来讲解其实现, 希望其中的一些东西对将来的开发有帮助. 首先是onCreate: @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setHasOptionsMenu(true); // 屏蔽Activity的menu菜单 Bundle args = getArguments(); mDisableNewWi
前段时间项目中用到了下拉刷新功能,之前在网上也找到过类似的demo,但这些demo的质量参差不齐,用户体验也不好,接口设计也不行.最张没办法,终于忍不了了,自己就写了一个下拉刷新的框架,这个框架是一个通用的框架,效果和设计感觉都还不错,现在分享给各位看官. 1. 关于下拉刷新 下拉刷新这种用户交互最早由twitter创始人洛伦o布里切特(Loren Brichter)发明,有理论认为,下拉刷新是一种适用于按照从新到旧的时间顺序排列feeds的应用,在这种应用场景中看完旧的内容时,用户会很自然地下
好久没有更新博客了, 为了不让过去看的代码忘掉, 现在开始坚持更新. 看看之前写的博文, 虽然和大神还有有很大却别, 但是一路走来还是很佩服自己. 年轻真好! 废话少说, Browser的Titlebar功能还是比较全面的, 有进度条, 可以显示输入网址, 搜索关键词等, 可以显示搜索联想词等, 还有 停止, 刷新等按钮. 先看一下其布局: 可以看到他包括一个 NavigationBar 一个ProgressView两大部分 &RelativeLayout xmlns:android=&h
通过前面的介绍, 我们知道, 真正填充UrlInputView数据的是一个名为SuggestionsAdapter的东西. Adapter通过两个CursorSource的子类实现了联想数据的获取 获取历史和数据数据是通过ContentProvider来实现的, 而获取联想词数据是通过SearchEngine来实现的 所以联想词列表也就是recommendlist有两部分构成, 一部分是历史用户的历史数据, 一部分是从网络获取的联想词数据 我们都是通过组合一个Cursor 实现的 一个增强版的C
select a.view_NAME, b.COMMENTS from user_views a, user_tab_comments b WHERE a.view_NAME = b.TABLE_NAME order by TABLE_NAME
本篇文章是对仿Iphone中搜索结果的布局进行了详细的分析介绍,需要的朋友参考下 public class Search extends LinearLayout implements OnClickListener, OnKeyListener, OnLongClickListener, OnItemClickListener { // Speed at which the widget slides up/down, in pixels/ms. private static final fl
java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. 是不是你在用 adapter.notifyDat
上图先: 那么下面开始吧~首先,将整个菜单动画分解开来. 1. 一级菜单按钮的旋转动画2个,十字和叉叉状态的转换. 2. 二级菜单按钮的平移动画2个,弹簧效果的in和out 3. 二级菜单按钮的点击效果,放大消失,其他未点击按钮缩小消失. 4. 一级菜单按钮的恢复效果,放大出现 好的 逐一去实现: 首先是一级菜单按钮的旋转动画,这2 个动画可以直接在xml 中定义,然后load 到代码中来,具体代码如下: rotate_story_add_button_in.xml &?xml version=
在实际的工作中,Android原生态的组件已经不能满足于我们的工作需要. 为了更好的完善我们的产品.更好的突出我们产品的体验效果,我们不得不重写一些组件.比如在Android TV上开发一个影视类APP,如果要用一个列表流畅的展现若干影片,用Android自带的GridView是不能满足需要的,因为在TV上,考虑到需要用遥控器操作,而且在用遥控器操作时必须保证GridView列表不会出现闪屏.跳跃的现象(事实证明原生的GridView有类似这样的问题,体验效果很不好),如果在加触屏控制,又需要处
对于需求较为严格一些,应该让ViewPager滑动时,那个指示器也应该滑动才符合逻辑,因此如上代码改造为如下代码 public class AnimActivity extends BaseActivity { private V /** * 指示器偏移宽度 */ private int offsetWidth = 0; private ViewPager mViewP /** * viewPager宽度 */ private int screenWith = 0;
Have to admit that google thing to do is very intimate to the developers ~ ~ ~ very convenient for debugging, you can put the same real machine when the emulator debug, thread view, object view. . . . You just need a real machine to connect your data
In the SDK help documentation there is such a paragraph: Remember that key events are always delivered to the View currently in focus. They are dispatched starting from the top of the View hierarchy, and then down, until they reach the appropriate de
In the SDK help documentation so: Remember that key events are always delivered to the View currently in focus. They are dispatched starting from the top of the View hierarchy, and then down, until they reach the appropriate destination. If your View
View some of the tips on, I first have to say that the activity, but we build a project, typically generate a sub-class activity, the role of this activity corresponds to the interface. Means that each interface corresponds to an activity, but the ac
Read a lot of information, turn turn ah, ah, seem to understand. Android, an update on the View has a variety of ways, used to distinguish between different applications. I feel the most important thing is to distinguish between: multi-threading and
In an Android application, the user interface is built using View and ViewGroup objects. There are many types of views and view groups, each of which is a descendant of the View class. View objects are the basic units of user interface expression on
Our applications run on the Android principle and layout files can be described with a deeper awareness and understanding, and with the &Hello World!& Program to practice proved. Continue to develop in-depth Android trip, it is necessary to solv
当屏幕中包含一个ViewGroup,而这个ViewGroup又包含一个子view,这个时候android系统如何处理Touch事件呢,接下来将对此问题进行深入了解,感兴趣的朋友可以了解参考下,或许对你有所帮助 android中的事件类型分为按键事件和屏幕触摸事件,Touch事件是屏幕触摸事件的基础事件,有必要对它进行深入的了解. 一个最简单的屏幕触摸动作触发了一系列Touch事件:ACTION_DOWN-&ACTION_MOVE-&ACTION_MOVE-&ACTION_MOVE...-
本文讲解的是Android什么时候进行View中Background的加载,十分的详尽,十分全面细致,附上所有代码,这里推荐给大家,希望大家能够喜欢. 对大多数Android的开发者来说,最经常的操作莫过于对界面进行布局,View中背景图片的加载是最经常做的.但是我们很少关注这个过程,这篇文章主要解析view中背景图片加载的流程.了解view中背景图片的加载(资源的加载)可以让我们对资源加载的过程进行一些优化,另外当需要进行整个应用的换肤时,也可以更得心应手. View图片的加载,我们最常见的就
View类是Android的一个超类,这个类几乎包含了所有的屏幕类型.每一个View都有一个用于绘图的画布,这个画布可以进行任意扩展.在游戏开发中往往需要自定义视图(View),这个画布的功能更能满足我们在游戏开发中的需要.在Android中,任何一个View类都只需重写onDraw 方法来实现界面显示,自定义的视图可以是复杂的3D实现,也可以是非常简单的文本形式等. 为了实现自定义View,需要创建一个新的类,然后重写onDraw方法,在此需要注意,新创建的类MyView要继承View基类,同
一.android绘制view的过程简单描述 简单描述可以解释为:计算大小(measure),布局坐标计算(layout),绘制到屏幕(draw): 下面看看每一步的动作到底是什么, 第一步:当activity启动的时候,触发初始化view过程的是由Window对象的DecorView调用View(具体怎样从xml中读取是用LayoutInflater.from(context).inflate)对象的 public final void measure(int widthMeasureSpec
Android 开发之旅:view的几种布局方式及实践 引言 通过前面两篇: Android 开发之旅:又见Hello World! Android 开发之旅:深入分析布局文件&又是&Hello World!& 我们对Android应用程序运行原理及布局文件可谓有了比较深刻的认识和理解,并且用&Hello World!&程序来实践证明了.在继续深入Android开发之旅之前,有必要解决前两篇中没有介绍的遗留问题:View的几种布局显示方法,以后就不会在针对布
View的移动和碰撞检测的核心就在于如何获取到View在屏幕中的位置,获取的方法很多,本文中直接使用View.getX() View.getY()方法获取到左上角的顶点位置,View之间的碰撞检测就是在View的移动过程中不断计算和特定View之间的距离.代码如下: import android.content.C import android.graphics.RectF; import android.util.AttributeS import android.util
试了很多网上的代码总是不行,最好的情况是在自己的布局文件里预览是正确的,运行到真机却显示一条直线 后来搞了很久终于搞定: package com.fhc. import com.fhc.android.R; import android.content.C import android.content.res.TypedA import android.graphics.B import android.graphics.C import
Android开源项目第一篇--个性化控件(View)篇 本文为那些不错的Android开源项目第一篇--个性化控件(View)篇,主要介绍Android上那些不错个性化的 View,包括ListView.ActionBar.Menu.ViewPager.Gallery.GridView.ImageView. ProgressBar及其他如Dialog.Toast.EditText.TableView.Activity Animation等等. 下面有几个我导入好的包... 最新内容请访问And
主要介绍那些不错个性化的View,包括ListView.ActionBar.Menu.ViewPager.Gallery.GridView.ImageView.ProgressBar及其他如Dialog.Toast.EditText.TableView.Activity Animation等等. 一.ListView android-pulltorefresh 一个强大的拉动刷新开源项目,支持各种控件下拉刷新 ListView.ViewPager.WevView.ExpandableListVi
In fact, it is tried to be an input method and the effect of pop-up almost &RelativeLayout android: layout_width = &fill_parent& android: layout_height = &fill_parent& & &ListView android: id = &@ android: id / list&
package com.test.activity. import android.app.ActivityG import android.app.LocalActivityM import android.content.I import android.os.B import android.view.V import android.view.View.OnClickL import android.wi
The getWidth and getHeight methods will return 0 if the view has not yet been inflated. For example, if you are trying to access it in the onCreate of the Activity, you'll get zero. 在UI 组件还未显示在界面之前调用getWidth和getHeight方法通常会得到0.所以不能在onCreate方法里获得组件的wid
Android 中关于View.VISIBLE与View.INVISIBLE用法 /thread--1.html
Copyright (C) , All Rights Reserved.
版权所有 闽ICP备号
processed in 0.041 (s). 9 q(s)关于 view 中 GONE、VISIBLE、INVISIBLE 的区别 - 一日三餐 - ITeye技术网站
博客分类:
这两天开始我不得不说我收获很大,因为之前没有怎么做UI,现在我开始接触这一块的东西,却是让我对UI 的这一块有了很大的收获,也许是我太菜。。。。。
好吧,直接说 组件的中的 显示 与不显示 还有gone 的区别:
其实很简单,如果你把 你的组件setVisibility(View.VISIBLE),着我们都很清楚就是让 组件显示了,
如果我们设置setVisibility(View.INVISIBLE),从字面意思上我们理解是 不显示,确实结果是不显示但是在layout 的xml 中 这个组件还是会把相应的位置 给占 出来,这样和我们的布局就有点不同了,当然 你可以试试 setVisibility(View.GONE),这个东西是 组件不显示 而且也不会占用 xml 中的 位置!
浏览: 88671 次
来自: 广州
@param requestCode Private requ ...
十分感谢,帮忙解决了问题。。。
scan 是个标签,用于便于结束循环嵌套
&TabWidger& 和&FrameLay ...Error 404 (Not Found)!!1
404. That’s an error.
The requested URL /145396/ was not found on this server.
That’s all we know.View: VISIBLE,INVISIBLE,GONE的区别 - 追求幸福 - ITeye技术网站
博客分类:
View 的setVisibility有三个值可以设置:
VISIBLE---&可见
INVISIBLE---&不可见,但这个View在ViewGroupt中仍保留它的位置,不重新layout
GONE----&不可见,但这个View在ViewGroupt中不保留位置,重新layout,那后面的view就会取代他的位置。
注意:若你在Adapter中的getView或bindview将某些特殊的位置的View.INVISIBLE之后,要记得在别的判断条件下将其View.Visible.不然你会看到很多怪现象的。
浏览: 797645 次
来自: 南昌
你是用的smack哪个版本?我用的smack4.1.3和sma ...
mark一下,学习了

我要回帖

更多关于 textview visibility 的文章

 

随机推荐