我正在使用Python 2.7,并且尝试打印这样的阿拉伯字符串
print "??? ?????? ??? ???????"
Run Code Online (Sandbox Code Playgroud)
它给出以下输出:
?°?‡?¨ ?§?„?·?§?„?¨ ?§?„?‰ ?§?„?…?¯?±?³?©
Run Code Online (Sandbox Code Playgroud)
目的是正确打印文本,而不是如何打印每一行。那么,如何才能以原始格式正确打印文本文件的字符串或内容?喜欢:
??? ?????? ??? ???????
Run Code Online (Sandbox Code Playgroud) 我正在将RecyclerView与StaggeredGridLayoutManager和tabLayout一起使用,我使用tabLayout来刷新RecyclerView,但是问题是,每次刷新刷新图片时,RecyclerView中的刷新项越来越小时,请清除第一个图片:
第二张照片:
gaggeredGridLayoutManager = new StaggeredGridLayoutManager(3, 1);
mAdapter= new RecycleRowItemAdapter(list2);
mAdapter.setContext(getContext());
recyclermat.setLayoutManager(gaggeredGridLayoutManager);
recyclermat.setItemAnimator(new DefaultItemAnimator());
int spacingInPixels = getResources().getDimensionPixelSize(R.dimen.photos_list_spacing);
recyclermat.addItemDecoration(new SpacesItemDecoration(spacingInPixels));
recyclermat.setAdapter(mAdapter);
Run Code Online (Sandbox Code Playgroud)
这是我的布局:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/gold">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="4">
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/button"
android:text="Filter"
android:textColor="@android:color/white"
android:textSize="12sp" />
<AutoCompleteTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="center"
android:text="Enter Search Word"
android:textColor="@android:color/white"
android:textSize="12sp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/button"
android:text="Invite"
android:textColor="@android:color/white"
android:textSize="12sp" />
</LinearLayout>
</RelativeLayout>
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:tabBackground="@android:color/black"
android:background="@android:color/white"
app:tabMode="scrollable"
app:tabSelectedTextColor="@color/gold"
app:tabTextColor="@android:color/white" /> …Run Code Online (Sandbox Code Playgroud)