标签: right-to-left

为什么这个代码向后写,打印"Hello World!"

以下是我在互联网上找到的一些代码:

class M?{public static void main(String[]a?){System.out.print(new char[]
{'H','e','l','l','o',' ','W','o','r','l','d','!'});}}    
Run Code Online (Sandbox Code Playgroud)

此代码打印Hello World!到屏幕上; 你可以看到它在这里运行.我可以清楚地看到public static void main写作,但它是倒退的.这段代码是如何工作的?这甚至如何编译?

编辑:我在IntellIJ中尝试了这个代码,它运行正常.但是,由于某种原因,它在记事本++和cmd中都不起作用.我仍然没有找到解决方案,所以如果有人这样做,请在下面评论.

java unicode right-to-left

252
推荐指数
4
解决办法
1万
查看次数

如何设置导航抽屉从右到左打开

首先我知道这个问题出现在此之前,但在尝试了很多之后我仍然没有成功.我从Android Developers网站开始研究这个例子 .

我正在尝试将菜单设置为从右到左打开,而不是在示例中如何实现(从左到右).此外,我想将打开菜单按钮移动到操作栏的右侧.我也在这里提出了一些答案,例如在这个答案中.

我尝试改变视图和布局的重力,但我得到错误:

没有抽屉视图发现绝对重力LEFT

你可以帮我弄清楚我的代码中有什么问题,为了设置菜单从右边打开,我应该改变什么,并将操作栏按钮移动到右侧?

xml代码在这里:

<android.support.v4.widget.DrawerLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/drawer_layout"
    android:layout_gravity="right"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <FrameLayout
        android:id="@+id/content_frame"
        android:layoutDirection="rtl"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        />

    <ListView android:id="@+id/left_drawer"
        android:layout_width="200dp"
        android:layout_height="match_parent"
        android:layout_gravity="right"
        android:choiceMode="singleChoice"
        android:divider="@android:color/transparent"
        android:dividerHeight="10dp"
        android:background="#111"/>

</android.support.v4.widget.DrawerLayout>
Run Code Online (Sandbox Code Playgroud)

android right-to-left navigation-drawer

73
推荐指数
4
解决办法
11万
查看次数

不推荐使用Android context.getResources.updateConfiguration()

就在最近的context.getResources().updateConfiguration()已在Android API 25中弃用,建议使用上下文.而是createConfigurationContext().

有谁知道createConfigurationContext如何用于覆盖android系统区域设置?

在此之前将通过以下方式完成:

Configuration config = getBaseContext().getResources().getConfiguration();
config.setLocale(locale);
context.getResources().updateConfiguration(config,
                                 context.getResources().getDisplayMetrics());
Run Code Online (Sandbox Code Playgroud)

android locale right-to-left

70
推荐指数
5
解决办法
5万
查看次数

识别Android中的RTL语言

除了针对所有RTL语言测试语言代码之外,还有办法识别RTL(从右到左)语言吗?

由于API 17+为RTL和LTR提供了多种资源,我认为应该有一种方法,至少从API 17开始.

android right-to-left

54
推荐指数
8
解决办法
4万
查看次数

在UICollectionView上从右向左对齐

这是一个非常直截了当的问题,但是我无法在SO上找到明确的答案(如果我错过了,请纠正我).

基本上,我的问题是:是否可以UICollectionView从右到左而不是从左到右对齐行内容?

在我的研究中,我看到了建议子类化的答案UICollectionViewFlowLayout,但我还没有找到一个为右对齐创建一个例子的例子.

我的目标是设置2个集合视图,如下所示:

例

任何帮助是极大的赞赏!

objective-c right-to-left ios uicollectionview uicollectionviewlayout

53
推荐指数
10
解决办法
3万
查看次数

UITextView在iOS 7中错误地呈现自定义字体

我的应用程序使用UITextView输入Syriac文本(Estrangelo字体),但是UITextView会像这样错误地呈现一些字母:

在此输入图像描述

我用UILabel和UITextView测试了它.UILabel正确显示它,但UITextView错误地显示顶部点并将它们移动到底部(参见上面的结果).

此问题仅发生在iOS 7中,并且不会发生在iOS 6中.请告诉我是否有任何方法可以解决问题.

这是我的测试代码

UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 40)];
label.center = CGPointMake(self.view.center.x, self.view.center.y-40);
label.font = [UIFont fontWithName:@"East Syriac Adiabene" size:24];
label.text = @"?? ?? ?? ??";
[self.view addSubview:label];

UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(0, 0, 100, 40)];
textView.center = CGPointMake(self.view.center.x, self.view.center.y+40);
textView.font = [UIFont fontWithName:@"East Syriac Adiabene" size:24];
textView.text = @"?? ?? ?? ??";
[self.view addSubview:textView];
Run Code Online (Sandbox Code Playgroud)

multilingual uitextview custom-font right-to-left ios7

48
推荐指数
1
解决办法
1876
查看次数

如何从右到左制作文本方向

我想在TextView中用(从右到左的语言,即阿拉伯语)编写文本.但我想让文字从右到左书写方向.gravity:right将文本对齐.我想从右到左证明文本的合理性(使单词和数字出现在他按行输入的顺序中).怎么样 ?

android textview right-to-left

46
推荐指数
7
解决办法
6万
查看次数

Markdown中的RTL

是否有任何现有的降价规范,包括对RTL语言的支持?

我希望的是类似的东西

This paragraph is left to right
<- This paragraph is right to left
Run Code Online (Sandbox Code Playgroud)

或者某些东西......我可以调整我的解析器来处理这个但我想确保它已经不存在了.

markdown right-to-left

45
推荐指数
8
解决办法
8974
查看次数

支持RTL语言的Twitter Bootstrap CSS

我刚刚发现Twitter Bootstrap,我想知道它是否有从右到左(RTL)版本.有人知道吗?

css arabic persian right-to-left twitter-bootstrap

37
推荐指数
3
解决办法
2万
查看次数

为什么"[x] y"在RTL方向上显示不正确?

<div style="direction: rtl">
[x]y
</div>
Run Code Online (Sandbox Code Playgroud)

您可以看到HTML文本[x]y显示为x]y].

这个结果是什么原因?

PS:我在Chrome 56.0.2924.87(64位)中得到了这个结果.

html css right-to-left

34
推荐指数
3
解决办法
2391
查看次数