Android Open Source - Android-Universal-Notifier Log Fragment Tab






From Project

Back to project page Android-Universal-Notifier.

License

The source code is released under:

Apache License

If you think the Android project Android-Universal-Notifier listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.mairos.universalnotifier.UI;
/*from   w  w  w .  j a  v  a  2  s  .  c  o m*/
import com.mairos.universalnotifier.R;
import com.mairos.universalnotifier.model.NotificationService;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.ScrollView;

public class LogFragmentTab extends Fragment {
  private View m_rootView = null;
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
        m_rootView = inflater.inflate(R.layout.log_layout, container, false);
        EditText et = (EditText) m_rootView.findViewById(R.id.editText);
    et.setKeyListener(null);
        setLogText(NotificationService.getCurrentLog());
        return m_rootView;
    }
    @Override
  public void onResume() {
      setLogText(NotificationService.getCurrentLog());
    super.onResume();
  }
  public void setLogText(String f_txt){
    if (m_rootView != null){
      final EditText et = (EditText) m_rootView.findViewById(R.id.editText);
      et.setText(f_txt);
      final ScrollView scroller = (ScrollView) m_rootView.findViewById(R.id.logScroll);
      scroller.post(new Runnable() { 
                public void run() { 
                    scroller.smoothScrollTo(0, et.getBottom());
                } 
            });
    }
  }
}




Java Source Code List

com.mairos.universalnotifier.UI.LogFragmentTab.java
com.mairos.universalnotifier.UI.MainActivity.java
com.mairos.universalnotifier.UI.SettingsActivity.java
com.mairos.universalnotifier.UI.TabListener.java
com.mairos.universalnotifier.UI.TaskInfoActivity.java
com.mairos.universalnotifier.UI.TasksFragmentTab.java
com.mairos.universalnotifier.model.AlarmManagerBroadcastReceiver.java
com.mairos.universalnotifier.model.AttachmentData.java
com.mairos.universalnotifier.model.Const.java
com.mairos.universalnotifier.model.JSInterpreter.java
com.mairos.universalnotifier.model.LauncherBroadcastReceiver.java
com.mairos.universalnotifier.model.Logger.java
com.mairos.universalnotifier.model.NotificationService.java
com.mairos.universalnotifier.model.NotificationTask.java
com.mairos.universalnotifier.model.TasksQueue.java
com.mairos.universalnotifier.model.TasksXMLLoader.java
com.mairos.universalnotifier.network.GMailSender.java
com.mairos.universalnotifier.network.JSSEProvider.java
com.mairos.universalnotifier.network.NetworkOperations.java
com.mairos.universalnotifier.network.SMSSender.java