android studio开发<三> 新建Activity界面,切换界面,滑动条控件

右键-----New-----Activity  <pre code_snippet_id="1873233" snippet_file_name="blog_20160909_1_1860383" name="code" class="html">android.content.Intent;
 

                //切换界面
                startActivity(new Intent(MainActivity.this,TwoActivity.class));
                //切换界面效果
                overridePendingTransition(android.R.anim.slide_in_left,android.R.anim.slide_out_right);


//跳转后讲当前的页面放在Task栈的最上面,如果存在就不创建。

startActivity(new Intent(ClothesActivity.this,FirstActivity.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));
//当删除调用
@Override
protected void onDestroy() {
    super.onDestroy(); //调用父类删除
}


去掉默认的蓝标题框

修改 Res---values---styles.xml

第一种: Theme.AppCompat.Light.DarkActionBar 改为Theme.AppCompat.Light.NoActionBar

第二种:<itemname="windowNoTitle">true</item>


屏蔽状态栏,全屏显示  style文件

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
    <item name="android:windowFullscreen">true</item>
</style>
 
布局文件: 
android:theme="@style/AppTheme"



滑动条:

HorizontalScrollView水平滑动条下面只能添加一个控件,添加LinearLayout,再往这个布局里添加控件。

android:scrollbars="none"    不显示滑动条

 android:fillViewport="true"   填满滑动条


 

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

我是重阳

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值