如何在 Eclipse 模拟器中创建代表 Samsung Galaxy S 的 AVD?

2024-03-04

我正在开发一款专门针对三星 Galaxy S 的应用程序(我不是在这里做出决定的人),他们希望其布局达到像素精度。 我可以只使用普通的 2.1 AVD 吗?

所以我尝试创建 WQVGA432 但它看起来像这样。我不知道为什么 LinearLayout 不填满屏幕,而只使用韩语的大图像(我无法缩小,但这是不同的问题)。

这是main.xml:

<RelativeLayout 
    android:id="@+id/ui_navBar"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="#FF333333"

    <!-- This is navigation panel at the top of the page -->
    <!-- Top-Left Button, aka Back button -->
    <FrameLayout android:id="@+id/ui_topLeftBox"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_centerVertical="true">
    </FrameLayout>
    <!-- Screen name -->
    <FrameLayout android:id="@+id/ui_topBox"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true">
    </FrameLayout>

    <!-- Top-Right Button, aka Forward button -->
    <FrameLayout android:id="@+id/ui_topRightBox"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true">
    </FrameLayout>
</RelativeLayout>
<FrameLayout
    android:id="@+id/ui_contentView"
    android:layout_width="fill_parent" 
    android:layout_height="0dip"
    android:paddingTop="0px" 
    android:layout_weight="1">

    <!-- Main View --> 
    <RelativeLayout
        android:id="@+id/mainView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <RelativeLayout 
            android:id="@+id/topBanner"
            android:orientation="horizontal"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:background="#FFFFCC00"
            >
            <TextView android:textSize="20sp" 
                android:textColor="#FF000000"
                android:text="EUR/USD"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_centerVertical="true"
            />
        </RelativeLayout>
        <RelativeLayout
            android:id="@+id/view1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/topBanner"
            android:background="#FF444444">
            <CheckBox android:id="@+id/cbx1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_alignParentLeft="true"
            />
            <com.vg.library.NumericInput 
                android:id="@+id/val1Nip"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_toRightOf="@+id/cbx1"
                 />
        </RelativeLayout>
        <com.vg.library.NumericInput 
            android:id="@+id/val2Nip"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/view1" />
        <TextView android:layout_width="wrap_content"
            android:layout_height="wrap_content" 
            android:text="Screen01"
            android:layout_below="@+id/val2Nip"
            android:layout_alignParentLeft="true" />
    </RelativeLayout>
</FrameLayout>

<!-- ExpandBar -->
<RelativeLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    >
    <ImageView 
        android:id="@+id/ui_expandBar"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:src="@drawable/bar"
        android:background="#0000"
    />
    <FrameLayout
        android:id="@+id/ui_drawerView"
        android:visibility="gone"
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content"
        android:paddingTop="0px" 
        android:layout_weight="1"
        android:layout_below="@+id/ui_expandBar">
        <RelativeLayout
            android:id="@+id/ui_drawerContent"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="#FF550000" >
            <RelativeLayout
            android:id="@+id/m1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="#FF550000" >
            <CheckBox android:id="@+id/cbxB"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_alignParentLeft="true"
            />
            <com.vg.library.NumericInput 
                android:id="@+id/valBNip"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_toRightOf="@+id/cbxB"
                 />
            </RelativeLayout>
        </RelativeLayout>
    </FrameLayout>
</RelativeLayout>
<RelativeLayout 
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="#FF333333"
    android:layout_weight="0"
    android:layout_gravity="bottom"
    >
    <!-- This is menu panel at the bottom of the page -->
    <com.vg.library.MenuBar 
        android:id="@+id/ui_menuBar"
        android:orientation="horizontal"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:background="#FFAAAA00"
        >
        <!-- All menu item should go here -->
    </com.vg.library.MenuBar>
</RelativeLayout>

是的,将屏幕分辨率设置为 wqvga (800 * 432)。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何在 Eclipse 模拟器中创建代表 Samsung Galaxy S 的 AVD? 的相关文章

  • PhoneGap/Cordova 应用程序通知

    我是 PhoneGap Cordova 的新手 我希望向我的应用程序添加一些通知 推送通知 因此当应用程序上发布新文章时 它会提醒用户 本地通知 在设定的时间间隔 日期和时间 我可以提示用户我的应用程序上的最新文章 我进行了大量搜索 但找不
  • Android主线程的IO操作

    我的问题有两个 是否建议在 Android 的主线程上进行 IO 操作 或者它是否有可能导致我的应用程序崩溃 如果在主线程上执行 IO 操作不理想 我可以使用哪些其他框架 以便当我的应用程序加载时它可以执行一些基本的 IO 文件读取并将值存
  • 使用 JSONArray 还是普通数组来存储/读取数据更有效?

    我正在使用一个连接到PHP MySQL返回所有内容的服务器JSON格式 例如 用户列表作为JSONArray of JSONObject 每个对象都包含单个用户的信息 姓名 位置 电话号码等 处理这种格式的信息时 将所有内容保留在其中会更有
  • 如何在应用程序关闭时在 Android 通知中显示操作按钮?

    我有一个安卓应用程序 对于通知 我们必须显示一些操作按钮 当应用程序打开时 我们可以自由地构建通知并显示操作按钮 但是当应用程序关闭时 通知会在 Android 的通知托盘中收到 应用程序开发人员无法控制构建用户界面和操作按钮 我们现在如何
  • Android 中的 Fragment-Fragment 通信

    我在Android编程方面处于初级水平 所以我需要你真诚的帮助 请任何人帮助我 我正在尝试使用片段构建滑动用户界面 所以我真正的疑问是 我有一个Fragment say FragmentA 它有一个TextView and Button在其
  • 使用 Fragment 在工具栏中实现 SearchView

    当前情况 我的应用程序主页由导航抽屉组成 因此我将视图作为片段加载 我的工具栏中也有搜索图标 我在中实现了它menu xml 下一步我实施了SearchView通过以下问题的答案来获取搜索图标在工具栏中实现搜索 https stackove
  • 当路径的点超出视野时,Android Canvas 不会绘制路径

    我在绘制路径时遇到了 Android Canvas 的一些问题 我的情况是 我有一个相对布局工作 如地图视图 不使用 google api 或类似的东西 我必须在该视图上绘制一条路径 canvas drawPath polyPath bor
  • 退出设备上的 system.img

    我正在为我们部署给客户的设备 LG p509 Optimus 1 开发自动应用程序更新解决方案 我们可以控制这些设备 并且目前在它们上安装自定义内核 但不是完整的自定义 ROM 由于我们试图在设备上自动更新我们的应用程序 因此我们需要由我们
  • ADB TCPIP 连接问题

    我有两台 Galaxy S3 其中一个已扎根 另一个则未扎根 因此 当我尝试通过本地网络连接它们时 计算机可以看到已root的计算机 但是正常的就卡在tcpip这一步了 所以 我写 adb tcpip 5555 It says restar
  • 在新的 intel x86 android 模拟器中访问 google api

    我只是尝试在新的 x86 android 模拟器中运行我公司的应用程序 但是我们的应用程序依赖于 google 地图 API 而这在 google 随 android sdk 版本 17 提供的 x86 系统映像中不可用 我的直觉告诉我答案
  • 如何使用 SharedPreferences 保存多个值?

    我正在开发一个字典应用程序 在我的应用程序中 我假设用户想要保存最喜欢的单词 我决定使用共享首选项保存这些值 我知道 SQLite 和文件更好 但我坚持使用 SharedPreferences 所以继续使用它 下面是我的代码 Overrid
  • 当 minifyEnabled 为 true 时 Android 应用程序崩溃

    我正在使用多模块应用程序 并且该应用程序崩溃时minifyEnabled true in the installed模块的build gradle 以下是从游戏控制台检索到的反混淆堆栈跟踪 FATAL EXCEPTION Controlle
  • 如何为我的 Android Market APK 创建证书?

    我想将我的第一个 APK 应用程序上传到 Android Market 但我收到了此错误 顺便说一下 在 stackoverflow 中搜索时并没有引导我找到正确的链接 市场不接受使用调试证书签名的 APK 创建有效期至少 50 年的新证书
  • Android SearchView 在启动时隐藏键盘

    我有一个小问题正在尝试解决 当我打开应用程序时 键盘会显示输入搜索视图的查询 不过 我只想在单击搜索视图时显示键盘 我该如何解决 Thanks 这对我有用 用于隐藏焦点的代码 searchView SearchView view findV
  • jetpack compose 是否使用drawable-night 文件夹?

    我们有一个基于视图的 Android 应用程序 其中有一些可绘制对象res drawable文件夹 以及夜间模式的对应文件夹res drawable night folder 使用旧视图时 引用可绘制对象R drawable foo从 XM
  • 如何将样式应用于我拥有的所有 TextView? [复制]

    这个问题在这里已经有答案了 可能的重复 设计所有 TextView 或自定义视图 的样式 而不向每个 TextView 添加样式属性 https stackoverflow com questions 6801890 styling all
  • 如何在android中通过蓝牙向配对设备发送短信?

    在我的应用程序中 我想通过蓝牙发送和接收短信 我可以在列表视图中看到配对设备名称和地址的列表 但是当我尝试向配对设备发送文本时 什么也没有发生 在其他设备中没有收到文本 这是我向配对设备发送消息的代码 private void sendDa
  • Android 标记如何实现拖放?

    你好 我正在 Android 中开发 MapView 应用程序 我有三个标记 我希望稍后能够使用 Google Map API getlocation function 为了尝试一下 我想使用拖放功能移动标记 然后检查位置 任何人都可以通过
  • LifeCycleAware Fragment 中的片段生命周期事件

    我有一个生命周期感知片段和一个LifecycleObserver class public class MyFragment extends Fragment Override public void onCreate Nullable B
  • Android GetPTLAFormat 上的 Phonegap 错误

    我们正在开发一个使用 jQuery 移动和电话间隙的应用程序 一切似乎都工作正常 但是当在连接的 Android 手机上运行应用程序时 我们在 Eclipse logcat 中看到大量类似这样的错误 0 GetPTLAFormat inva

随机推荐

  • Mongodb聚合5分钟

    我有 IoT 传感器 它们每秒发送事件 并将事件存储在 MongoDB 中 格式如下 id stp 23 HP 1261 0 1357 0 1337 0 1250 0 1269 0 1134 0 1219 0 1269 0 1166 0 1
  • 架构独立的实体框架代码优先迁移

    我在使用针对 Oracle 数据库的实体框架迁移时遇到了麻烦 因为架构名称包含在迁移代码中 并且对于 Oracle 架构名称也是用户名 我的目标是拥有独立于模式的 Code First 迁移 能够拥有一组用于测试和生产环境的迁移 我已经尝试
  • Chartjs 条形图悬停时显示旧数据

    我有一个使用 Chart js 创建的条形图 页面加载时一切正常 但是当我使用日期范围选择器更改时间范围时 会出现故障 新数据已引入 但当我将鼠标悬停在其上时 会显示旧数据 我是 javascript 新手 所以我希望得到一些帮助 看起来我
  • 如何在不将可执行文件重命名为 iexplore.exe 的情况下获得 WebBrowser 控件的最大性能?

    我正在编写一个本机应用程序 它在嵌入式中执行大量 CSS3 动画网页浏览器控件 http msdn microsoft com en us library aa752040 28v vs 85 29 aspx 但动画在独立版 IE10 中更
  • 如何在使用变量之前测试变量是否已经初始化?

    因此 假设您有一个带有变量的应用程序 当您独立加载它时 即当您使用if name main 此外 当客户端导入应用程序以在另一个应用程序中使用时 将调用一个方法 该方法还将实例化该变量 我想做的是在定义变量之前测试变量是否已经被实例化 这样
  • Git 因致命错误而失败,拒绝使用 Git 推送合并不相关的历史记录

    我在本地做了一些更改 我正在尝试将其推送到 GitHub 我读过我可以使用 allow unrelated histories 但我只看到了演示如何执行此操作的示例pull 这不是我需要的 我需要使我的本地目录成为master 我尝试了以下
  • Android 上的 HttpURLConnection 失败

    已解决 请参阅下面的评论 我有一个实现分段文件上传的类 该代码适用于我尝试过的每个 Java 客户端 Android 除外 并且它是我的 Android 应用程序中唯一不能与我的后端服务很好地配合的 HTTP 请求代码 连接响应代码是 1
  • 调试无法与 Android Studio 一起使用的 C++/本机库模块(使用 Cmake)

    我在调试库模块的 C 文件时遇到问题 这在一般情况下可能吗 如果应用程序项目包含 C 代码 则调试工作正常 但我想将 C 代码移至库模块 启动会话时出现错误消息 现在启动本机调试会话 注意力 未找到符号目录 请检查您的本机调试配置 我的 l
  • 不同功能的样本数量不同

    plot x 3 x 2 5 x 12 是否可以设置x 3只有 2 个样本并且x 2 5 x 12比如说同一个图中有 1000 个样本 这是可以做到的 但不是开箱即用的 第一个变体使用临时文件来保存一个低采样率的函数 并稍后将其与高分辨率函
  • Android Studio - 未找到 SDK - 设置向导失败 - 防火墙代理

    言归正传 我处于公司防火墙后面 我必须手动下载 Android Studio 的 zip 文件 并将其提取到我的计算机上的程序文件 Windows 10 中 当我启动工作室时 我的对话工作室需要检索 SDK 我尝试这样做 但在这 3 个 z
  • 如何在 iOS 上制作爆炸动画?

    我有一款 iOS 游戏 当球击中目标时就会爆炸 动画爆炸的最佳方式是什么 如果您正在寻找简单的东西 制作一系列动画爆炸的图像 将它们添加到 UIImageView 并启动动画 像这样的事情 UIImage image0 UIImage im
  • SoapUI:如何将指纹作为 SecurityTokenReference 添加到 wss SIGNATURE 条目

    我有一个关于soapUI的问题 我正在尝试将 ws security 标头添加到包含签名的肥皂请求中 为此 我在项目首选项中使用了soapUI 对话框 WS Security Configurations 它按预期工作 但我的服务器应用程序
  • 如何验证 AWS SigV4 签名

    我有一个服务器将接收带有 SigV4 授权标头的请求 并且基于 SigV4 的验证 我将授予数据访问权限 我们如何验证SigV4 我一直在尝试获取用于验证 SigV4 的文档 但无法获取它 有什么办法可以反编译签名并检查身份验证然后授权吗
  • 使用 PHP 正则表达式从字符串中删除换行符

    如何使用 PHP 从字符串中删除换行符 string str replace PHP EOL string or string str replace array n r string
  • 通过 PostMessage 发送/接收字符串

    尽管网上已经有一些资源可以解决这个粗略的主题 但我仍然没有找到适合我的答案 我希望我的同事之间能有充分的沟通VB net过程和我的C 过程 我希望能够发送一个字符串到and来自C 过程 但目前我需要实现 Sending一个字符串到C 处理并
  • MongoDB 交易

    我在 C 中有如下方法 private void Save object mongoCollection Save object someotherRelationaldb Save object 我有两个数据库 我必须在其中保存一个对象
  • 使用 VBA 访问 iframe 内的元素

    我正在尝试使用 PowerPoint VBA 访问使用 Wix Site Builder 制作的网页上的 iframe 元素 我尝试了在谷歌和其他网页上找到的所有内容 但我无法弄清楚 当我尝试使用时 最常见的错误是 自动化错误 conten
  • 如何使用TextureView代替SurfaceView与ExoPlayer的PlayerView一起使用?

    我知道可以在 ExoPlayer 中使用TextureView 但我找不到任何有关如何以正确的方式实现此功能的示例 你能帮我解决这个问题吗 The PlayerView有一个 xml 属性surface type让您选择是否要使用Surfa
  • 在 XML 中意味着什么?

    什么是
  • 如何在 Eclipse 模拟器中创建代表 Samsung Galaxy S 的 AVD?

    我正在开发一款专门针对三星 Galaxy S 的应用程序 我不是在这里做出决定的人 他们希望其布局达到像素精度 我可以只使用普通的 2 1 AVD 吗 所以我尝试创建 WQVGA432 但它看起来像这样 我不知道为什么 LinearLayo