标签: right-to-left

使用DrawThemeBackground绘图时如何从右到左(RTL)方向绘制元素部分?

我试图以从右到左的方向绘制类ttGlyphClosed的元素(就像的时候一样)。我有一个问题,我不知道如何使我的屏幕外位图透明。位图的背景始终为白色。Explorer::TreeviewBiDiModebdLeftToRight

我使用以下代码来镜像图像:

procedure TForm5.FormPaint(Sender: TObject);
var
  bm: TBitmap;
  ARect: TRect;
  Details: TThemedElementDetails;
begin    
  if ExplorerTreeviewhTheme = 0 then
    ExplorerTreeviewhTheme := OpenThemeData(0, 'Explorer::Treeview');

  ARect := Rect(20, 20, 40, 40);
  Details := ThemeServices.GetElementDetails(ttGlyphClosed);
  DrawThemeBackground(ExplorerTreeviewhTheme, Canvas.Handle,
    Details.Part, Details.State, ARect, nil); //Ok

  bm := TBitmap.Create;
  try
    bm.Width := 20;
    bm.Height := 20;

    ARect := Rect(00, 00, 20, 20);
    DrawThemeBackground(ExplorerTreeviewhTheme, bm.Canvas.Handle,
      Details.Part, Details.State, ARect, nil);

    // rendered result has white background
    Canvas.Draw(60, 10, bm);    
    // rendered result is mirrored but …
Run Code Online (Sandbox Code Playgroud)

delphi winapi uxtheme windows-themes right-to-left

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

Android 支持Rtl 使负数视图在数字后面带有减号

添加到我的 androidManifest 时:android:supportsRtl="true" 我的TextView文本“-1390”显示为“1390-”

我该如何修复它?

(编辑)这是我当前有问题的textView:

 <TextView
                android:id="@+id/header_account_balance"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="left"
                android:inputType="numberSigned"
                android:text="\u200F -10,452"
                android:textAlignment="gravity"
                android:textColor="@color/black"
                android:textDirection="rtl"        *ltr did not work as well*
                android:textSize="26sp"
                android:textStyle="bold"/>
Run Code Online (Sandbox Code Playgroud)

android signed right-to-left

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

如何将 html 模板转换为从右到左 (RTL) 格式

如何将 html 模板转换为从右到左格式
现在我有一个普通的 html 模板。
将模板从右更改为左

html right-to-left

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

放弃从右到左在 iOS 中不起作用

我的应用程序支持从右到左的方向,但我想放弃手机语言,只根据用户偏好更改方向。

在从右到左的手机上,我使用强制从左到右

 UIView.appearance().semanticContentAttribute = .forceLeftToRight
Run Code Online (Sandbox Code Playgroud)

它解决了大多数问题,但不是全部。

检查文本字段占位符对齐情况;一些标签正确对齐!任何人都有解决方案如何解决这个问题?

在此输入图像描述

xcode right-to-left ios swift

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

有没有一种方法(没有明确编码)使用度量前缀显示数字?

这个问题与Delphi应用程序中自动使用某些Windows资源管理器功能的问题有关.

有没有办法在Delphi中自动使用metrix前缀格式化整数?不知何故自动获得像Windows资源管理器给出的结果?我的意思是自动将1024转换为1.0 K.

让我们说类似的话

FormatMetric('FileSize = %d', [26112], 1,'B')
// where the third parameter is the number of decimal digits
// and the fourth is the string that is appended
Run Code Online (Sandbox Code Playgroud)

将返回

25.5 KB
Run Code Online (Sandbox Code Playgroud)

当然我可以编写这个代码,但RTL中有这样的东西吗?

delphi string-formatting right-to-left

3
推荐指数
1
解决办法
199
查看次数

使用指南针为rtl和ltr最小化重复css的最佳实践

在使用rtl和ltr语言进行布局工作时,指南针/ sass是否有任何方法可以帮助减少重复的css代码量?

css right-to-left susy-compass compass-sass

3
推荐指数
1
解决办法
797
查看次数

对于阿拉伯文本,RTL不能使用itext 5.5生成pdf

我有java代码在itext 5.5和xmlworker jars的帮助下编写阿拉伯字符,但是即使在使用writer.setRunDirection(PdfWriter.RUN_DIRECTION_RTL)之后它也是从左到右编写的.

使用的代码是:

public class CreateArabic extends DefaultHandler {
    /** Paths to and encodings of fonts we're going to use in this example */
    public static String[][] FONTS = {
        {"C:/arialuni.ttf", BaseFont.IDENTITY_H},
        {"C:/abserif4_5.ttf", BaseFont.IDENTITY_H},
        {"C:/damase.ttf", BaseFont.IDENTITY_H},
        {"C:/fsex2p00_public.ttf", BaseFont.IDENTITY_H}

    };



    /** Holds he fonts that can be used for the peace message. */
    public FontSelector fs;

     public CreateArabic() {
            fs = new FontSelector();
            for (int i = 0; i < FONTS.length; i++) {
                fs.addFont(FontFactory.getFont(FONTS[i][0], FONTS[i][1], BaseFont.EMBEDDED));
            }
        } …
Run Code Online (Sandbox Code Playgroud)

java arabic itext right-to-left xmlworker

3
推荐指数
1
解决办法
3285
查看次数

Web Essentials的RTLCSS工具不起作用

我在Visual Studio 2013中使用Web Essentials扩展.

我想使用Web Essentials CSS RTL tool.但是当我在我的CSS文件上运行该工具时,没有任何反应.

Web Essentials不会生成任何RTL文件.我发现当css文件有css.map文件时,Web Essentials也可以生成RTL文件.

如何为每个CSS文件生成RTL文件?

html css visual-studio right-to-left web-essentials

3
推荐指数
1
解决办法
810
查看次数

从右到左导航抽屉菜单使用android设计支持库

我正在使用Android设计支持库,我想知道我怎么能有一个右到左导航抽屉,我将重力设置为右,但只有导航抽屉本身移动到右边,我想知道我怎么能把右侧的菜单项?导航视图:

    <android.support.design.widget.NavigationView
    android:id="@+id/navigation_view"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:layout_gravity="right"
    android:foregroundGravity="right"
    app:headerLayout="@layout/header"
    app:menu="@menu/drawer" />
Run Code Online (Sandbox Code Playgroud)

抽屉布局:

<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".MainActivity"
android:layout_gravity="right">
Run Code Online (Sandbox Code Playgroud)

菜单:

<menu xmlns:android="http://schemas.android.com/apk/res/android">
<group android:checkableBehavior="single">
    <item
        android:id="@+id/one"
        android:checked="false"
        android:icon="@drawable/account"
        android:title="First Item"></item>

    <item
        android:id="@+id/two"
        android:checked="false"
        android:icon="@drawable/filter"
        android:title="Second Item"></item>

    <item
        android:id="@+id/three"
        android:checked="false"
        android:icon="@drawable/human"
        android:title="Third Item"></item>
</group>
Run Code Online (Sandbox Code Playgroud)

这是我的抽屉: 抽屉

提前致谢

navigation android right-to-left

3
推荐指数
1
解决办法
8057
查看次数

Jupyter Notebook升级后成为RTL

我在miniconda中创建了python 3.6环境。Jupyter Notebook现在从右到左工作 在此处输入图片说明

我该如何解决?

已安装的软件包:

ipykernel                 4.7.0                    py36_0    conda-forge
ipython                   6.2.1                    py36_1    conda-forge
ipython_genutils          0.2.0                    py36_0    conda-forge
jsonschema                2.5.1                    py36_0    conda-forge
jupyter_client            5.2.1                    py36_0    conda-forge
jupyter_core              4.4.0                      py_0    conda-forge
notebook                  5.2.2                    py36_1    conda-forge
Run Code Online (Sandbox Code Playgroud)

笔记本元数据:

{
  "celltoolbar": "Edit Metadata",
  "kernelspec": {
    "name": "python3",
    "display_name": "Python 3",
    "language": "python"
  },
  "language_info": {
    "name": "python",
    "version": "3.6.4",
    "mimetype": "text/x-python",
    "codemirror_mode": {
      "name": "ipython",
      "version": 3
    },
    "pygments_lexer": "ipython3",
    "nbconvert_exporter": "python",
    "file_extension": ".py"
  }
}
Run Code Online (Sandbox Code Playgroud)

python right-to-left anaconda jupyter-notebook

3
推荐指数
1
解决办法
1047
查看次数