using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS; namespace AndroidDemo
{
[Activity(Label = "Android", MainLauncher = true, Icon = "@drawable/AppIcon")]//Theme = "@android:style/Theme.NoTitleBar.Fullscreen"
public class MainActivity : Activity
{
protected override void OnCreate(Bundle bundle)
{
this.SetTheme(Android.Resource.Style.ThemeNoTitleBarFullScreen);//全屏并且无标题栏,必须在OnCreate前面设置。
//this.Window.SetFlags(WindowManagerFlags.Fullscreen, WindowManagerFlags.Fullscreen);//只设置本页全屏
//this.RequestWindowFeature(WindowFeatures.NoTitle);//只设置无标题栏
base.OnCreate(bundle);
SetContentView(Resource.Layout.Main);
FindViewById<Button>(Resource.Id.button1).Click += (ss, ee) => { this.StartActivity(typeof(Views.GalleryDemo.GallleryActivity)); };
FindViewById<Button>(Resource.Id.button2).Click += (ss, ee) =>
{
this.StartActivity(typeof(Views.ImageButtonActivity));
//this.OverridePendingTransition(Resource.Animation.enterfrombottom_anim, Resource.Animation.outtobottom_anim);
this.OverridePendingTransition(Android.Resource.Animation.FadeIn, Android.Resource.Animation.FadeOut);
};
} }
}

Xamarin 中开发Android实现全屏或者不显示标题栏的方法-宋兴柱的更多相关文章

  1. 使用Xamarin在Visual Studio中开发Android应用

    原文:使用Xamarin在Visual Studio中开发Android应用 本文使用的环境是Windows 8 Visual Studio 2012.2 1.下载Xamarin http://xam ...

  2. Android中使用WebView实现全屏切换播放网页视频

    首先写布局文件activity_main.xml: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/an ...

  3. Android 实现全屏、无标题栏

    实现全屏无标题栏: 1.在xml文件中进行配置 AndroidManifest.xml中,找到需要全屏或设置成无标题栏的Activity,在该Activity进行如下配置即可. 实现全屏效果: and ...

  4. C# WinForm中 让控件全屏显示的实现代码

    夏荣全 ( lyout(at)163.com )原文 C#中让控件全屏显示的实现代码(WinForm) 有时候需要让窗口中某一块的内容全屏显示,比如视频播放.地图等等.经过摸索,暂时发现两种可行方法, ...

  5. layer弹出层中H5播放器全屏出错解决 & 属性poster底图占满<video>的方法

    1. 在layer弹窗组件中 如果使用了flash播放器,全屏是正常的 但若使用了HTML5的播放器,全屏失效 举个栗子 <!DOCTYPE html> <html> < ...

  6. 在Eclipse+ADT中开发Android系统的内置应用

    转自:  http://www.iteye.com/topic/1050439 在Eclipse+ADT中开发Android系统的内置应用 Android系统内置有:Browser(浏览器).Mms( ...

  7. JS+CSS实现弹出全屏灰黑色透明遮罩效果的方法

    本文实例讲述了js+CSS实现弹出一个全屏灰黑色透明遮罩效果的方法.分享给大家供大家参考.具体分析如下: 在众多的网站都有这样的效果,当进行一定的操作之后,会弹出一个灰黑色的半透明的遮罩,在上面可以操 ...

  8. Xamarin Android Activity全屏的两种方式

    方式一 直接在Activity的Attribute中定义 如下 在 MainActivity 中 [Activity(Label = "app", MainLauncher = t ...

  9. Android中两种设置全屏或者无标题的方法

    在开发中我们经常需要把我们的应用设置为全屏或者不想要title, 这里是有两种方法的,一种是在代码中设置,另一种方法是在配置文件里改: 一.在代码中设置: package jason.tutor; i ...

随机推荐

  1. 用VBA计算WPS 表格ET EXCEL中的行数和列数的多重方法

    用VBA计算WPS 表格ET EXCEL中的行数和列数 每种方法中上面的是Excel的行数,下面的是Excel的列数. 方法1: ActiveSheet.UsedRange.Rows.Count Ac ...

  2. 【原创】可以换行的RadioGroup

    0.效果截图: 以上两个RadioGroup均使用FNRadioGroup实现. 1.控件代码: public class FNRadioGroup extends ViewGroup { /** 没 ...

  3. ociuldr 支持分多个数据文件

    在审计工作,将几亿条的oracle数据通过sqlserver自带工具导入到sqlserver中,速度不是特别的理想,虽然通过视图方式能提高一些速度,但是既不简洁,也不方便. 用ociuldr工具,可以 ...

  4. golang面向对象初识

    struct是变量的集合 interface是方法的集合 struct与interface都支持匿名字段, 换言之, 支持组合实现继承. golang的struct与C++的class一样, 只能声明 ...

  5. [译]rabbitmq 2.2 Building from the bottom: queues

    我对rabbitmq学习还不深入,这些翻译仅仅做资料保存,希望不要误导大家. You have consumers and producers under your belt, and now you ...

  6. exception -----> Typedefs & Classes

    #include <exception> Typedefs exception_ptr 一种类型,描述了一个指向异常的指针 terminate_handler 一种类型,描述了一个适合作为 ...

  7. C#判断字符串为空

    string str = null; if (string.IsNullOrWhiteSpace(str)) { MessageBox.Show("字符串为null"); } if ...

  8. Android编程: 调试方法

    学习知识:Android的调试方法 ====调试方法==== 前提: IDE环境为Android Studio,熟悉LogCat,知道如何查看日志信息 工具: Android DDMS调试工具,一般点 ...

  9. Labview实现字符串加密

    Labview实现字符串加密 对字符串进行加密,规则是每个字母后移5 位 例如A 变为F,b 变为g,x 变为c,y 变为d- 实现效果 后端实现

  10. Altera USB Blaster 仿真器(EPM240仿制版

    转载:http://tigerwang202.blogbus.com/logs/35981280.html 其他很好的资料:http://bbs.ednchina.com/BLOG_ARTICLE_1 ...