Android Studio随时都可以冻结.每次重新启动它再次冻结"初始化亚行......".只有重新启动PC才能解决问题.我有8GB内存.
我在studio64.exe.vmoptions中增加了4倍的内存大小,但它没有帮助:
-Xms512m
-Xmx2560m
-XX:MaxPermSize=1400m
-XX:ReservedCodeCacheSize=900m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Djna.nosys=true
-Djna.boot.library.path=
-Djna.debug_load=true
-Djna.debug_load.jna=true
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Didea.paths.selector=AndroidStudio1.3
-Didea.platform.prefix=AndroidStudio
Run Code Online (Sandbox Code Playgroud)
非常感谢你!
我制作WearableListView列表.问题是设置android:layout_height ="20dp"没有帮助

在这种情况下如何设置高度?在Android Wear示例项目Notifications and Timer中,他们也只设置了一个android:layout_height ="80dp".但我试图设置项目android:layout_height ="20dp",但它没有帮助!(下面是我的项目源代码):
list_item.xml:
<?xml version="1.0" encoding="utf-8"?>
<base.mobitee.com.mobiteewatch.adapter.HolesListItemLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="20dp"
android:gravity="center_vertical" >
<TextView
android:id="@+id/text_hole"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-light"
android:gravity="center"
android:textSize="@dimen/list_item_text_size" />
</base.mobitee.com.mobiteewatch.adapter.HolesListItemLayout>
Run Code Online (Sandbox Code Playgroud)
HolesListItemLayout.java:
公共类HolesListItemLayout扩展的LinearLayout实现WearableListView.OnCenterProximityListener {私人TextView的MNAME; private final int mFadedTextColor; private final int mChosenTextColor;
public HolesListItemLayout(Context context) {
this(context, null);
}
public HolesListItemLayout(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public HolesListItemLayout(Context context, AttributeSet attrs,
int defStyle) {
super(context, attrs, defStyle);
mFadedTextColor = getResources().getColor(R.color.grey);
mChosenTextColor = getResources().getColor(R.color.black);
}
// Get references to the icon and …Run Code Online (Sandbox Code Playgroud)