上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 41 下一页
摘要: gridView的布局文件:grid_view_item.xml grid_view_item_selector_xml.xmlgrid_view_item_press_shape.xml grid_view_item_shape.xml 注意:在gridView组件中要声明listSelector来覆盖原有的点击颜色效果,还有在gridView中声明该item的背景颜色。 阅读全文
posted @ 2014-01-28 12:23 无忧之路 阅读(2511) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2014-01-26 11:58 无忧之路 阅读(875) 评论(0) 推荐(0) 编辑
摘要: 覆盖activity下的两个方法: @Override public boolean onCreateOptionsMenu(Menu menu) { new MenuInflater(this).inflate(R.menu.option_menu_main, menu); return super.onCreateOptionsMenu(men... 阅读全文
posted @ 2014-01-19 00:30 无忧之路 阅读(3513) 评论(0) 推荐(0) 编辑
摘要: package com.example.fragmentNavigation2.fragment;import android.os.Bundle;import android.support.v4.app.Fragment;import android.view.*;import android.widget.Button;import android.widget.Toast;import com.example.fragmentNavigation2.R;public class WeiXinFragment extends Fragment { private Button bu... 阅读全文
posted @ 2014-01-19 00:28 无忧之路 阅读(1872) 评论(0) 推荐(0) 编辑
摘要: @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.wei_xin_fragment, container, false); button = (Button) view.findViewById(R.id.press_button); regist... 阅读全文
posted @ 2014-01-18 22:41 无忧之路 阅读(1452) 评论(0) 推荐(0) 编辑
摘要: package com.example.fragmentNavigation2.fragment;import android.content.Context;import android.os.Bundle;import android.support.v4.app.Fragment;import android.support.v4.app.FragmentManager;import android.support.v4.app.FragmentPagerAdapter;import android.support.v4.view.ViewPager;import android.vie 阅读全文
posted @ 2014-01-18 00:45 无忧之路 阅读(3645) 评论(0) 推荐(0) 编辑
摘要: @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreate(savedInstanceState); final Context contextThemeWrapper = new ContextThemeWrapper(getActivity(), com.viewpagerindicator.R.style.Theme_PageIndicatorDefaults); ... 阅读全文
posted @ 2014-01-17 23:38 无忧之路 阅读(4740) 评论(0) 推荐(0) 编辑
摘要: package com.example.keKuoZhanLieBiao;import android.app.ExpandableListActivity;import android.os.Bundle;import android.view.LayoutInflater;import android.view.View;import android.view.ViewGroup;import android.widget.*;public class MyActivity extends ExpandableListActivity { String[] groups = {" 阅读全文
posted @ 2014-01-12 19:41 无忧之路 阅读(472) 评论(0) 推荐(0) 编辑
摘要: 在ListView的xml文件中添加这个属性:android:cacheColorHint="#00000000" 阅读全文
posted @ 2014-01-12 16:08 无忧之路 阅读(181) 评论(0) 推荐(0) 编辑
摘要: TabActivity的局限性 是否还有存在的必要性 其实谷歌有此举动,我们也应该早就想到了,为什么会这么说呢?那就要从TabActivity的原理开始说起了。 做个假定先: 比如我们最外面的Activity是MainActivity, 第一个tab是FirstActivty, 第二个tab是SecondActivity。相信大家都用过TabActivity, 它是一个特殊的Activity,它特殊的地方在哪里?有以下几点为证: 它看起来违反了Activity的单一窗口的原则。因为它可以同时加载几个activity, 当用户点击它上面的tab时,就会跳到相应的Activity上面去... 阅读全文
posted @ 2014-01-11 23:24 无忧之路 阅读(299) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 41 下一页
无忧之路