Android Open Source - myglob About Fragment






From Project

Back to project page myglob.

License

The source code is released under:

GNU General Public License

If you think the Android project myglob 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

/*
 * MyGlob Android Application/*ww w.j a va 2s  . c om*/
 * 
 * Copyright (C) 2013 Petar Petrov
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
package net.vexelon.myglob.fragments;

import net.vexelon.myglob.R;
import net.vexelon.myglob.configuration.Defs;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.text.util.Linkify;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

public class AboutFragment extends BaseFragment implements OnClickListener {
  // unique ID  
  public static final int TAB_ID = 2;

  public static AboutFragment newInstance() {
    AboutFragment fragment = new AboutFragment();

        Bundle args = new Bundle();
        fragment.setArguments(args);
        
        return fragment;    
  }
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      if (Defs.LOG_ENABLED)
        Log.v(Defs.LOG_TAG, "onCreate()");
      
    super.onCreate(savedInstanceState);
//    setHasOptionsMenu(false);
//    setMenuVisibility(false);
  }
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
      if (Defs.LOG_ENABLED)
        Log.v(Defs.LOG_TAG, "onCreateView()");
      
    View v = inflater.inflate(R.layout.about, container, false);
    
    ImageView icLogo = (ImageView) v.findViewById(R.id.about_logo);
    icLogo.setImageResource(R.drawable.about_icon);

    PackageInfo pinfo = null;
    try {
      pinfo = getActivity().getPackageManager().getPackageInfo(
          getActivity().getPackageName(), PackageManager.GET_GIDS);
    } catch(Exception e) {
      if (Defs.LOG_ENABLED)
        Log.e(Defs.LOG_TAG, "Failed to get version info!", e);
    }

    StringBuilder sb = new StringBuilder(500);
    sb.append(getResString(R.string.app_name));
    sb.append("\n");
    if ( pinfo != null ) {
      sb.append(getResString(R.string.about_version));
      sb.append(" ");
      sb.append(pinfo.versionName);
      sb.append("\n");
    }
    sb.append("\n")
    .append(getResString(R.string.about_tagline))
    .append("\n")
    .append("\n")
    .append(getResString(R.string.about_author))
    .append("\n")
    .append("http://code.google.com/p/myglob")
    .append("\n")
    .append("\n")
    .append(getResString(R.string.about_thanks))
    .append("\n").append("Kristian Iliev (Testing)")
    .append("\n").append("Atanas Atanasow (Testing)")
    .append("\n").append("???? ?????? (Bug reports)")
    .append("\n").append("Svetlana Velkova (Bug reports)")
    .append("\n").append("P.Zabukovsek (Suggestions)")
    .append("\n").append("STL ENCH (Bug reports)")
    
    .append("\n");

    this.setText(v, R.id.about_apptitle, sb.toString());
    Linkify.addLinks((TextView) v.findViewById(R.id.about_apptitle), Linkify.ALL);

    return v;    
  }
  
  public void onActivityCreated(Bundle savedInstanceState) {
       if (Defs.LOG_ENABLED)
        Log.v(Defs.LOG_TAG, "onActivityCreated()");
       
    super.onActivityCreated(savedInstanceState);
    
    //TODO showLoading
  }
  
  @Override
  public void onClick(View v) {
    // TODO Auto-generated method stub
    
  }
}




Java Source Code List

net.vexelon.mobileops.GLBClient.java
net.vexelon.mobileops.GLBInvoiceXMLParser.java
net.vexelon.mobileops.GLBRequestType.java
net.vexelon.mobileops.HttpClientException.java
net.vexelon.mobileops.IClient.java
net.vexelon.mobileops.InvalidCredentialsException.java
net.vexelon.mobileops.InvoiceException.java
net.vexelon.mobileops.MTLClient.java
net.vexelon.mobileops.SecureCodeRequiredException.java
net.vexelon.myglob.AccountsArrayAdapter.java
net.vexelon.myglob.MainActivity.java
net.vexelon.myglob.OperationsArrayAdapter.java
net.vexelon.myglob.Operations.java
net.vexelon.myglob.UpdateWidgetService.java
net.vexelon.myglob.WidgetProvider4x2.java
net.vexelon.myglob.WidgetProvider.java
net.vexelon.myglob.actions.AccountStatusAction.java
net.vexelon.myglob.actions.ActionExecuteException.java
net.vexelon.myglob.actions.ActionResult.java
net.vexelon.myglob.actions.Action.java
net.vexelon.myglob.actions.BaseAction.java
net.vexelon.myglob.actions.InvoiceLoadCachedAction.java
net.vexelon.myglob.actions.InvoiceUpdateAction.java
net.vexelon.myglob.configuration.AccountPreferencesActivity.java
net.vexelon.myglob.configuration.Defs.java
net.vexelon.myglob.configuration.GlobalSettings.java
net.vexelon.myglob.configuration.LegacySettings.java
net.vexelon.myglob.crypto.CryptoAES.java
net.vexelon.myglob.crypto.Crypto.java
net.vexelon.myglob.crypto.PasswordEngineImpl1.java
net.vexelon.myglob.crypto.PasswordEngineImpl2.java
net.vexelon.myglob.crypto.PasswordEngine.java
net.vexelon.myglob.fragments.AboutFragment.java
net.vexelon.myglob.fragments.BaseFragment.java
net.vexelon.myglob.fragments.HomeFragment.java
net.vexelon.myglob.fragments.IFragmentEvents.java
net.vexelon.myglob.fragments.InvoiceFragment.java
net.vexelon.myglob.users.AccountType.java
net.vexelon.myglob.users.User.java
net.vexelon.myglob.users.UsersManager.java
net.vexelon.myglob.utils.Base64.java
net.vexelon.myglob.utils.DateUtils.java
net.vexelon.myglob.utils.TrustAllSocketFactory.java
net.vexelon.myglob.utils.UserAgentHelper.java
net.vexelon.myglob.utils.Utils.java