Mac android studio 加入ProgressBar组件后笔记本迅速发烫

Mac android studio 加入ProgressBar组件后笔记本迅速发烫

Mac android studio 加入ProgressBar组件后笔记本迅速发烫

(1)在不加入ProgressBar时,风扇不开启,整个键盘没有明显温度;键盘顶部最高温度微微发热;

(2)加入ProgressBar时,风扇狂飙,且笔记本在1分钟内烫到无法下手摸;


<!--<ProgressBar-->
   <!--android:id="@+id/progressbar1"-->
   <!--android:layout_width="200dp"-->
   <!--android:layout_height="15dp"-->
   <!--android:layout_alignParentBottom="true"-->
   <!--android:layout_alignParentLeft="true"-->
   <!--android:max="100"-->
   <!---->
   <!--/>-->
<!--<ProgressBar-->
   <!--android:id="@+id/progressbar2"-->
   <!--android:layout_width="200dp"-->
   <!--android:layout_height="15dp"-->
   <!--android:layout_alignParentBottom="true"-->
   <!--android:layout_alignParentRight="true"-->

   <!--/>-->


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/linearLayout2"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#ffffff">

    <RelativeLayout
        android:id="@+id/find_top"
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:padding="5dp"
        >
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:text="发现"
            android:textSize="36dp"
            android:textColor="#8f8f8f"
            />
        <ImageView
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:src="@mipmap/find_news"
            android:layout_alignParentRight="true"

            />
        <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:background="#cccccc"
            android:layout_alignParentBottom="true"
            ></View>
    </RelativeLayout>
    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/find_top"
        android:layout_marginTop="5dp"
        >
        <LinearLayout
            android:id="@+id/find_menus"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            >

            <android.support.v7.widget.RecyclerView
                android:id="@+id/recycleview_find_menus"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
            </android.support.v7.widget.RecyclerView>
            <View
                android:id="@+id/find_1dp"
                android:layout_width="wrap_content"
                android:layout_height="1dp"
                android:background="#cccccc"
                android:layout_marginLeft="5dp"
                android:layout_marginRight="5dp"
                >
            </View>
            <android.support.v7.widget.RecyclerView
                android:id="@+id/recycleview_find_menus_second"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
            </android.support.v7.widget.RecyclerView>
            <View
                android:id="@+id/find_1dp2"
                android:layout_width="wrap_content"
                android:layout_height="1dp"
                android:background="#cccccc"
                android:layout_marginLeft="5dp"
                android:layout_marginRight="5dp"
                >
            </View>
            <!--旅游PK标题-->
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">
                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="5"
                    android:text="旅游PK"
                    android:textColor="#8f8f8f"
                    android:gravity="center"
                    android:textSize="28dp"/>
                <ImageView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:src="@mipmap/find_hot_eye"
                    android:layout_gravity="center"
                    />

            </LinearLayout>
            <!--旅游PK内容-->
            <RelativeLayout
                android:id="@+id/lvyoupk"
                android:layout_width="match_parent"
                android:layout_height="120dp"
                android:padding="5dp">
                <ImageView
                    android:id="@+id/pk1"
                    android:layout_width="200dp"
                    android:layout_height="100dp"
                    android:background="@mipmap/find_pk1"
                    android:layout_alignParentStart="true"
                    />
                <ImageView
                    android:id="@+id/pk2"
                    android:layout_width="200dp"
                    android:layout_height="100dp"
                    android:background="@mipmap/find_pk2"
                    android:layout_alignParentRight="true"
                    android:layout_alignParentTop="true"
                    />

                <!--<ProgressBar-->
                    <!--android:id="@+id/progressbar1"-->
                    <!--android:layout_width="200dp"-->
                    <!--android:layout_height="15dp"-->
                    <!--android:layout_alignParentBottom="true"-->
                    <!--android:layout_alignParentLeft="true"-->
                    <!--android:max="100"-->
                    <!---->
                    <!--/>-->
                <!--<ProgressBar-->
                    <!--android:id="@+id/progressbar2"-->
                    <!--android:layout_width="200dp"-->
                    <!--android:layout_height="15dp"-->
                    <!--android:layout_alignParentBottom="true"-->
                    <!--android:layout_alignParentRight="true"-->

                    <!--/>-->
                <ImageView
                    android:layout_width="60dp"
                    android:layout_height="60dp"
                    android:src="@mipmap/find_vs"
                    android:layout_alignParentBottom="true"
                    android:layout_centerHorizontal="true"
                    />
            </RelativeLayout>
            <!--喜欢TA-->
            <RelativeLayout
                android:id="@+id/lvyoupk2"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:padding="5dp"
                >
                <LinearLayout
                    android:layout_alignParentLeft="true"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:layout_centerInParent="true"
                    >
                    <ImageView
                        android:layout_width="38dp"
                        android:layout_height="38dp"
                        android:src="@mipmap/hobby_red"
                        />
                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        >
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="喜欢TA"
                            android:textSize="28sp"
                            android:textColor="#ff00ff"
                            />
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="51人喜欢"
                            android:textSize="24sp"
                            android:textColor="#8f8f8f"
                            />
                    </LinearLayout>


                </LinearLayout>
                <LinearLayout
                    android:layout_alignParentRight="true"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:layout_centerInParent="true"
                    >
                    <ImageView
                        android:layout_width="38dp"
                        android:layout_height="38dp"
                        android:src="@mipmap/hobby_blue"
                        />
                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        >

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="喜欢TA"
                            android:textSize="28sp"
                            android:textColor="#0000ff"
                            />
                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="51人喜欢"
                            android:textSize="24sp"
                            android:textColor="#8f8f8f"
                            />
                    </LinearLayout>


                </LinearLayout>
            </RelativeLayout>
            <!--热门头条标题-->
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center">
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textColor="#8f8f8f"
                    android:text="热门头条"
                    android:textSize="30sp"

                    />

            </LinearLayout>
            <!--热门详细内容-->
            <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="120dp"
            android:orientation="horizontal"
                android:gravity="center_vertical"
                android:padding="5dp"
            >
            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="2"
                android:orientation="vertical"
                >
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="从东莞去广州仅需要半小时"
                    android:textColor="#8f8f8f"
                    android:textSize="20sp"
                    android:layout_marginBottom="5dp"
                    />
                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal">
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="来源:羊城晚报"
                        android:textSize="19sp"
                        android:textColor="#8f8f8f"
                        />
                    <ImageView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:src="@mipmap/find_hot_eye"
                        />
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="10526"
                        android:textSize="19sp"
                        android:textColor="#8f8f8f"
                        />
                    <ImageView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:src="@mipmap/find_hot_yes"
                        />
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="23"
                        android:textSize="19sp"
                        android:textColor="#8f8f8f"
                        />


                </LinearLayout>

            </LinearLayout>
            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1">
                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@mipmap/find_hot_home"/>
            </LinearLayout>



        </LinearLayout>


        </LinearLayout>
    </ScrollView>

</RelativeLayout>


正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

1回答
Tender10 2018-07-05 16:13:24

程序是否能够运行成功呢?如果运行失败,是否有报错信息呢?

  • 提问者 飞翔吧吧 #1
    程序运行成功,没有报错。
    2018-07-05 17:17:38
  • irista23 回复 提问者 飞翔吧吧 #2
    你可以在Android Studio菜单栏Android的Memory Monitor中查看一下当前程序内存使用的情况辅助了解具体原因
    2018-07-05 18:03:30
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师