htc感觉的布局(layout for htc sensation)
我正在尝试创建支持所有屏幕的布局
所以,我添加了layouts文件夹
布局小
布局大
布局XLARGE
布局w600dp
我编辑了所有这些都是合适的
但是当我在HTC Sensation 2.1中运行应用程序时,它们看起来并不是正确的位置
这是布局代码
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/mainlayout" tools:context=".SebhaActivity" android:background="#4b6702" > <ImageView android:id="@+id/imageView1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/sebha_bg" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:scaleType="fitCenter" /> <TextView android:id="@+id/zakr" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:layout_marginBottom="58dp" android:gravity="center" android:text="@string/first_zekr" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="#FFFFFF" android:textSize="25dp" /> <Button android:id="@+id/azkar" android:layout_width="100dp" android:layout_height="40dp" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:text="@string/Azkar" /> <Button android:id="@+id/karaza" android:layout_width="135dp" android:layout_height="135dp" android:layout_above="@+id/zakr" android:layout_centerHorizontal="true" android:layout_marginBottom="74dp" android:background="@drawable/button_green" android:text="0" android:textColor="#FFFFFF" android:textSize="38dp" android:scaleType="fitCenter" /> </RelativeLayout>
模拟器显示它是我想要的..
但我的手机显示如下..
任何帮助?
I'm trying to create layout that supports all screens
So, I added layouts folder like
layout-small
layout-large
layout-xlarge
layout-w600dp
and I edited all of them to be suitable
but when I run the app in HTC Sensation 2.1 they appear not in the right position
this is the code of layout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/mainlayout" tools:context=".SebhaActivity" android:background="#4b6702" > <ImageView android:id="@+id/imageView1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/sebha_bg" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:scaleType="fitCenter" /> <TextView android:id="@+id/zakr" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:layout_marginBottom="58dp" android:gravity="center" android:text="@string/first_zekr" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="#FFFFFF" android:textSize="25dp" /> <Button android:id="@+id/azkar" android:layout_width="100dp" android:layout_height="40dp" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:text="@string/Azkar" /> <Button android:id="@+id/karaza" android:layout_width="135dp" android:layout_height="135dp" android:layout_above="@+id/zakr" android:layout_centerHorizontal="true" android:layout_marginBottom="74dp" android:background="@drawable/button_green" android:text="0" android:textColor="#FFFFFF" android:textSize="38dp" android:scaleType="fitCenter" /> </RelativeLayout>
the emulator shows it as what I want ..
but my mobile shows it as following..
Any Help?
原文:https://stackoverflow.com/questions/14789127
更新时间:2023-03-28 14:03
最满意答案
相关问答
更多-
编辑: 问题与此有关 FilterQuery filter = new FilterQuery(0, userFilter, termFilter); 使用这样的查询会在Twitter API上产生某种轮询,因此超出了连接限制。 而是使用: FilterQuery filter = new FilterQuery(termFilter); Edit: The Problem is related to FilterQuery filter = new FilterQuery(0, userFilter ...
-
如何OAuth并使用Filter Query twitter4j Android(How to OAuth and use the Filter Query twitter4j Android)[2023-08-29]
ConfigurationBuilder cb = new ConfigurationBuilder(); cb.setDebugEnabled(true); cb.setOAuthConsumerKey("*************"); cb.setOAuthConsumerSecret("*************"); cb.setOAuthAccessToken("*************"); cb.setOAuthAccessTokenSecret("*************"); Tw ... -
用于使用Twitter登录的SignPost或Twitter4j(OAuth)?(SignPost or Twitter4j for Sign-in with Twitter (OAuth)?)[2023-04-28]
我正在寻找这个问题的答案,因为: 如果我使用SignPost,我可以使用“通过Twitter登录”工作 如果我使用过Twitter4J,那么我不得不要求用户提供他的uid / pass 虽然我只想使用Twitter4J。 无论如何,我在这两者之间设计了一条路,并使用Twitter4J实现了“通过Twitter登录”。 代码可以在这里看到: http : //www.pastie.org/1283631 清单可以在这里看到: http : //pastie.org/1283632 (因为它是一个Android ... -
您可以通过以下命令停止流: twitterStream.cleanUp(); // shutdown internal stream consuming thread twitterStream.shutdown(); // Shuts down internal dispatcher thread shared by all TwitterStream instances. 你可以从以下链接中检查api来了解api的细节。 http://twitter4j.org/javadoc/twitter4j/T ...
-
一个星期后,很少有白发,事实证明问题出在本地时间关闭的服务器上。 有人在推特上发布了明确的错误消息。 A week and few grey hairs later it turned out that the problem was in local time on a server which was off. Someone did a great job with clear error messages on Twitter.
-
搜索 :您将立即检索包含给定哈希标签的所有现有推文。 跟踪 :包含给定哈希标签的所有推文将从现在开始 流式传输给您。 search : you will retrieve all existing tweets containing the given hashtag right now. track : all tweets containing the given hashtag will be streamed to you from now.
-
如何使用twitter4j处理速率限制以避免被禁止(How to handle rate limit using twitter4j to avoid being banned)[2022-03-18]
StatusListener不会轮询Twitter API以获取推文。 它收听来自Twitter Streaming API的推文流。 因此,它不受速率限制。 StatusListener doesn't poll the Twitter API to obtain the tweets. It listens to the stream of tweets from Twitter Streaming API. It is therefore not subject to rate limitations ... -
程序员,现在有时间检查一下......我不得不在代码中进行一些更改才能运行它。 我认为问题是你从draw()调用getTweets() draw() ,所以每秒调用60次(默认值)。 在getTweets()内部,您可以在每个周期创建一个配置构建器和getTweets()流,这是getTweets() 。 没必要。 “stream”一旦打开就会“监听”所有twitters( 不是真的... ),并为每个匹配它的推文调用onStatus()方法。 所以不需要在平局中调用它。 只是打开流然后......就是这样 ...
-
我想你是以错误的顺序发送坐标。 根据Filter Spec ,Twitter期望以逗号分隔的经度,纬度列表 ,但您要发送(纬度,经度)对。 正确的版本应该是: double lat = 53.186288; double longitude = -8.043709; double lat1 = lat - 4; double longitude1 = longitude - 8; double lat2 = lat + 4; double longitude2 = longitude + 8; doubl ...
-
该功能尚未实施。 有一个开放票TFJ-764作为支持推文元数据的3.0.4的一部分。 That feature has not been implemented yet. There's an open ticket TFJ-764 as part of the 3.0.4 for supporting tweet's metadata.