/**
         * print log on the screen
         */
        protected void AddLogFragment()
        {
            FragmentTransaction transaction = FragmentManager.BeginTransaction();
            LogFragment         fragment    = new LogFragment();

            transaction.Replace(Resource.Id.framelog, fragment);
            transaction.Commit();
        }
        /**
         * Initialize log info
         **/
        private void InitalizeLogging()
        {
            LogFragment   logFragment = (LogFragment)FragmentManager.FindFragmentById(Resource.Id.framelog);
            LogCatWrapper logCat      = new LogCatWrapper();

            logCat.SetNext(logFragment.GetLogView());
            Log.SetLogNode(logCat);
        }
示例#3
0
        /** Create a chain of targets that will receive log data */
        public override void InitializeLogging()
        {
            // Wraps Android's native log framework
            LogWrapper logWrapper = new LogWrapper();

            Log.LogNode = logWrapper;

            // Filter strips out everything except the message text
            MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();

            logWrapper.NextNode = msgFilter;

            // On screen logging via a fragment with a TextView
            LogFragment logFragment = (LogFragment)FragmentManager.FindFragmentById(Resource.Id.log_fragment);

            msgFilter.NextNode = logFragment.LogView;

            Log.Info(TAG, "Ready");
        }
示例#4
0
        // Create a chain of targets that will receive log data
        public override void InitializeLogging()
        {
            // Wraps Android's native log framework
            LogWrapper logWrapper = new LogWrapper();

            // Using Log, front-end to the logging chain, emulates android.util.log method signatures
            Log.LogNode = logWrapper;

            // Filter strips out everything except the message text.
            MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();

            logWrapper.NextNode = msgFilter;

            // On screen logging via a fragment with a TextView
            LogFragment logFragment = (LogFragment)SupportFragmentManager
                                      .FindFragmentById(Resource.Id.log_fragment);

            msgFilter.NextNode = logFragment.LogView;
            Log.Info(TAG, "Ready");
        }