无法在android中实现GridView

时间:2015-10-20 16:49:30

标签: android gridview

我正在创建一个有

的应用
  1. 协调员布局。
  2. AppBar布局(协调员布局的子项)。
  3. 折叠工具栏布局(AppBar布局的子项)
  4. NestedScroll View(协调员布局的子项)。
  5. GridView(NestedScrollView的子项)。
  6. 我的问题:当我向其添加GridView时,应用会崩溃。否则它完美无缺。

    我想要的内容GridViewNestedScrollView内实施,以便用户可以浏览GridView中的所有项目。

    我的 MainActivity.java 文件:

    package com.defcomdevs.invento16;
    
    import android.content.Context;
    import android.content.Intent;
    import android.content.res.Resources;
    import android.os.Bundle;
    import android.support.design.widget.CollapsingToolbarLayout;
    import android.support.design.widget.CoordinatorLayout;
    import android.support.design.widget.FloatingActionButton;
    import android.support.design.widget.NavigationView;
    import android.support.design.widget.Snackbar;
    import android.support.v4.view.GravityCompat;
    import android.support.v4.widget.DrawerLayout;
    import android.support.v4.widget.NestedScrollView;
    import android.support.v7.app.ActionBarDrawerToggle;
    import android.support.v7.app.AppCompatActivity;
    import android.support.v7.widget.Toolbar;
    import android.view.LayoutInflater;
    import android.view.Menu;
    import android.view.MenuItem;
    import android.view.View;
    import android.view.ViewGroup;
    import android.widget.BaseAdapter;
    import android.widget.Button;
    import android.widget.GridView;
    import android.widget.ImageButton;
    import android.widget.Toast;
    
    import java.util.ArrayList;
    
    public class MainActivity extends AppCompatActivity
        implements NavigationView.OnNavigationItemSelectedListener {
    private CollapsingToolbarLayout mcollapsingToolbar;
    private NestedScrollView mnestedScrollView;
    private CoordinatorLayout coordinatorLayout;
    private DrawerLayout drawerLayout;
    int backButtonCount = 0;
    private Button button;
    GridView mygrid;
    private ImageButton imageButton;
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
        coordinatorLayout = (CoordinatorLayout)    findViewById(R.id.coordinator);
        coordinatorLayout.setBackground(getResources().getDrawable(R.drawable.oppo));
        // drawerLayout.setBackground(getResources().getDrawable(R.drawable.oppo));
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        //button= (Button) findViewById(R.id.setalarm);
        mcollapsingToolbar = (CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar);
        //mnestedScrollView= (NestedScrollView) findViewById(R.id.rvToDoList);
        mcollapsingToolbar.setTitle("INVENTO '16");
        FloatingActionButton fab = (FloatingActionButton)   findViewById(R.id.fab);
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                        .setAction("Action", null).show();
                callRegister();
            }
        });
        mygrid= (GridView) findViewById(R.id.gridView);
        mygrid.setAdapter(new MizAdapter(this));
        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
        ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
                this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
        drawer.setDrawerListener(toggle);
        toggle.syncState();
    
        NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
        navigationView.setNavigationItemSelectedListener(this);
    }
    
    public void callRegister() {
        Intent intent = new Intent(this, Registration.class);
        startActivity(intent);
    }
    
    @Override
    public void onBackPressed() {
        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
        if (drawer.isDrawerOpen(GravityCompat.START)) {
            drawer.closeDrawer(GravityCompat.START);
        }
        if (backButtonCount >= 1) {
            Intent intent = new Intent(Intent.ACTION_MAIN);
            intent.addCategory(Intent.CATEGORY_HOME);
            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity(intent);
        } else {
            Toast.makeText(this, "Press the back button once again to close the application.", Toast.LENGTH_SHORT).show();
            backButtonCount++;
        }
    
    }
      /* public void setalarm(View view){
        if(view.getId()==R.id.setalarm){
            Intent intent=new Intent(this,AlarmActivity.class);
            startActivity(intent);
        }
    }*/
    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
    
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();
    
        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            Intent intent = new Intent(this, Settings.class);
            startActivity(intent);
        }
    
        return super.onOptionsItemSelected(item);
    }
    
    @SuppressWarnings("StatementWithEmptyBody")
    @Override
    public boolean onNavigationItemSelected(MenuItem item) {
        // Handle navigation view item clicks here.
        int id = item.getItemId();
    
        if (id == R.id.about_college) {
            // Handle the camera action
        } else if (id == R.id.cse) {
    
        } else if (id == R.id.it) {
    
        } else if (id == R.id.ece) {
    
        } else if (id == R.id.mech) {
    
        } else if (id == R.id.Coding) {
            Intent intent = new Intent(this, Coding.class);
            startActivity(intent);
        } else if (id == R.id.Hacking) {
    
        } else if (id == R.id.printing) {
    
        } else if (id == R.id.Big) {
    
        } else if (id == R.id.nand) {
    
        } else if (id == R.id.cryo) {
    
        }
        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
        drawer.closeDrawer(GravityCompat.START);
        return true;
    }
    class itemName{     //Since we have to bounr the image to the item with the name and the subtitle
                        //we keep all information inside the class and deal with the class entirely
        String Iname;
        int ImageId;
        itemName(String name,int imageId){
            Iname=name;
            ImageId=imageId;
        }
    }
    
    class MizAdapter extends BaseAdapter{
    
        ArrayList<itemName> items;
        Context context;
    
        MizAdapter(Context context){
            this.context=context;
            items=new ArrayList<itemName>();    //initialize each item with the type itemName.
            Resources res=context.getResources();
            String[] itemnames=res.getStringArray(R.array.Items);
            int[] itempics={R.drawable.hackbttn,R.drawable.hackbttn,R.drawable.hackbttn,R.drawable.hackbttn,R.drawable.hackbttn,R.drawable.hackbttn,R.drawable.hackbttn,R.drawable.hackbttn,R.drawable.hackbttn,R.drawable.hackbttn};
            for(int i=0;i<10;i++){
                itemName names=new itemName(itemnames[i],itempics[i]);
                items.add(names);
            }
        }
        @Override
        public int getCount() {
            return items.size();
        }
    
        @Override
        public Object getItem(int position) {
            return items.get(position);
        }
    
        @Override
        public long getItemId(int position) {
            return position;
        }
    
        class ViewHolder{
            ImageButton myImage;
            ViewHolder(View v){
                myImage= (ImageButton) v.findViewById(R.id.imageButton);
            }
        }
    
        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
    
            View row=convertView;
            ViewHolder viewHolder=null;
            if (row==null){
                LayoutInflater inflater= (LayoutInflater) context.getSystemService(LAYOUT_INFLATER_SERVICE);
                row=inflater.inflate(R.layout.singleitem, parent, false);
                viewHolder=new ViewHolder(row);
                row.setTag(viewHolder);
            }
            else {
                row.getTag();
            }
            itemName temp=items.get(position);
            viewHolder.myImage.setImageResource(temp.ImageId);
            return row;
        }
    }
    }
    

    MainActivty.xml 文件:

    <?xml version="1.0" encoding="utf-8"?>
    <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/coordinator"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true"
        tools:context=".MainActivity">
    
        <android.support.design.widget.AppBarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:theme="@style/AppTheme.AppBarOverlay">
    
            <android.support.design.widget.CollapsingToolbarLayout
                android:id="@+id/collapsing_toolbar"
                android:layout_width="match_parent"
                android:layout_height="196dp"
                android:background="#3f51b5"
                app:contentScrim="@color/colorPrimary"
                app:expandedTitleMarginEnd="64dp"
                app:expandedTitleMarginStart="48dp"
                app:layout_scrollFlags="scroll|exitUntilCollapsed">
    
    
                <ImageView
                    android:id="@+id/imageview"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:scaleType="centerCrop"
                    android:src="@drawable/index"
                    app:layout_collapseMode="parallax" />
    
                <android.support.v7.widget.Toolbar
                    android:id="@+id/toolbar"
                    android:layout_width="match_parent"
                    android:layout_height="?attr/actionBarSize"
                    app:layout_collapseMode="pin"
                    app:layout_scrollFlags="scroll|enterAlways"
                    app:popupTheme="@style/AppTheme.PopupOverlay" />
            </android.support.design.widget.CollapsingToolbarLayout>
        </android.support.design.widget.AppBarLayout>
    
        <android.support.v4.widget.NestedScrollView
            android:id="@+id/rvToDoList"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior">
            <GridView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/gridView"
                android:layout_alignParentTop="true"
                android:layout_alignParentLeft="true"
                android:numColumns="auto_fit"
                android:horizontalSpacing="10dp"
                android:verticalSpacing="10dp"
                android:columnWidth="120dp"
                android:stretchMode="spacingWidth">
    
            </GridView>
        </android.support.v4.widget.NestedScrollView>
    
        <android.support.design.widget.FloatingActionButton
            android:id="@+id/fab"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="right|bottom"
            android:layout_margin="@dimen/fab_margin"
            android:src="@android:drawable/ic_dialog_email" />
    </android.support.design.widget.CoordinatorLayout>
    

    我已经在单独的xml文件中指定了GridView中的imageButton。

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent" android:layout_height="match_parent">
    
        <ImageButton
            android:src="@drawable/hackbttn100"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/imageButton"
            android:layout_centerVertical="true"
            android:layout_centerHorizontal="true" />
    
    </RelativeLayout>
    

    我是Android新手。我已经参考了Slidenerd的Android开发系列教程。 请帮忙!!

    logcat显示以下错误报告:

    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime: FATAL EXCEPTION: main
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime: Process: com.defcomdevs.invento16, PID: 31038
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime: java.lang.NullPointerException
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at com.defcomdevs.invento16.MainActivity$MizAdapter.getView(MainActivity.java:226)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.widget.AbsListView.obtainView(AbsListView.java:2283)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.widget.GridView.onMeasure(GridView.java:1044)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.View.measure(View.java:16540)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.support.v4.widget.NestedScrollView.measureChildWithMargins(NestedScrollView.java:1335)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.support.v4.widget.NestedScrollView.onMeasure(NestedScrollView.java:434)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.View.measure(View.java:16540)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5140)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.support.design.widget.CoordinatorLayout.onMeasureChild(CoordinatorLayout.java:607)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.support.design.widget.CoordinatorLayout.onMeasure(CoordinatorLayout.java:674)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.View.measure(View.java:16540)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.support.v4.widget.DrawerLayout.onMeasure(DrawerLayout.java:940)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.View.measure(View.java:16540)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5140)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.support.v7.internal.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:124)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.View.measure(View.java:16540)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5140)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1406)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.widget.LinearLayout.measureVertical(LinearLayout.java:697)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.widget.LinearLayout.onMeasure(LinearLayout.java:590)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.View.measure(View.java:16540)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5140)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.View.measure(View.java:16540)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5140)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1406)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.widget.LinearLayout.measureVertical(LinearLayout.java:697)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.widget.LinearLayout.onMeasure(LinearLayout.java:590)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.View.measure(View.java:16540)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5140)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2421)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.View.measure(View.java:16540)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1959)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1155)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1394)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1042)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5892)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.Choreographer.doCallbacks(Choreographer.java:574)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.Choreographer.doFrame(Choreographer.java:544)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.os.Handler.handleCallback(Handler.java:733)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:95)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:136)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5103)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at java.lang.reflect.Method.invokeNative(Native Method)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:515)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
    10-20 22:23:24.677 31038-31038/? E/AndroidRuntime:     at dalvik.system.NativeStart.main(Native Method)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx: ** ERROR: PROCESS CRASHED
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx: processName: com.defcomdevs.invento16
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx: processPid: 31038
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx: shortMsg: java.lang.NullPointerException
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx: longMsg: java.lang.NullPointerException
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx: timeMillis: 1445360004687
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx: stack:
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx: java.lang.NullPointerException
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at com.defcomdevs.invento16.MainActivity$MizAdapter.getView(MainActivity.java:226)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.widget.AbsListView.obtainView(AbsListView.java:2283)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.widget.GridView.onMeasure(GridView.java:1044)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.View.measure(View.java:16540)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.support.v4.widget.NestedScrollView.measureChildWithMargins(NestedScrollView.java:1335)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.support.v4.widget.NestedScrollView.onMeasure(NestedScrollView.java:434)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.View.measure(View.java:16540)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5140)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.support.design.widget.CoordinatorLayout.onMeasureChild(CoordinatorLayout.java:607)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.support.design.widget.CoordinatorLayout.onMeasure(CoordinatorLayout.java:674)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.View.measure(View.java:16540)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.support.v4.widget.DrawerLayout.onMeasure(DrawerLayout.java:940)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.View.measure(View.java:16540)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5140)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.support.v7.internal.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:124)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.View.measure(View.java:16540)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5140)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1406)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.widget.LinearLayout.measureVertical(LinearLayout.java:697)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.widget.LinearLayout.onMeasure(LinearLayout.java:590)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.View.measure(View.java:16540)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5140)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.View.measure(View.java:16540)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5140)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1406)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.widget.LinearLayout.measureVertical(LinearLayout.java:697)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.widget.LinearLayout.onMeasure(LinearLayout.java:590)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.View.measure(View.java:16540)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5140)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2421)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.View.measure(View.java:16540)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1959)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1155)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1394)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1042)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5892)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.Choreographer.doCallbacks(Choreographer.java:574)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.Choreographer.doFrame(Choreographer.java:544)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.os.Handler.handleCallback(Handler.java:733)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.os.Handler.dispatchMessage(Handler.java:95)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.os.Looper.loop(Looper.java:136)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at android.app.ActivityThread.main(ActivityThread.java:5103)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at java.lang.reflect.Method.invokeNative(Native Method)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at java.lang.reflect.Method.invoke(Method.java:515)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx:     at dalvik.system.NativeStart.main(Native Method)
    10-20 22:23:24.677 888-1437/? E/ActivityManagerServiceEx: #
    

0 个答案:

没有答案