Android Open Source - NXTControl Activity About






From Project

Back to project page NXTControl.

License

The source code is released under:

GNU General Public License

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

//
//    NXT Control
//    Copyright (c) 2013 Carlos Rafael Gimenes das Neves
///*  w w w . j a va2 s. c  o  m*/
//    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/}.
//
//    https://github.com/BandTec/NXTControl
//
package br.com.bandtec.nxtcontrol;

import android.content.pm.PackageInfo;
import android.text.util.Linkify;
import android.util.TypedValue;
import android.view.View;
import android.widget.TextView;
import br.com.bandtec.nxtcontrol.activity.ClientActivity;
import br.com.bandtec.nxtcontrol.ui.BgButton;
import br.com.bandtec.nxtcontrol.ui.UI;
import br.com.bandtec.nxtcontrol.ui.drawable.BorderDrawable;

public final class ActivityAbout extends ClientActivity implements View.OnClickListener {
  private BgButton btnGoBack;
  
  @SuppressWarnings("deprecation")
  @Override
  protected void onCreateLayout(boolean firstCreation) {
    setContentView(R.layout.activity_about);
    btnGoBack = (BgButton)findViewById(R.id.btnGoBack);
    btnGoBack.setOnClickListener(this);
    btnGoBack.setIcon(UI.ICON_GOBACK);
    findViewById(R.id.list).setBackgroundDrawable(new BorderDrawable(false));
    ((TextView)findViewById(R.id.lblTitle)).setText("NXT Control");
    try {
      final PackageInfo inf = getApplication().getPackageManager().getPackageInfo(getApplication().getPackageName(), 0);
      ((TextView)findViewById(R.id.lblVersion)).setText("v" + inf.versionName);
    } catch (Throwable e) {
    }
    final TextView lblMsg = (TextView)findViewById(R.id.lblMsg);
    lblMsg.setAutoLinkMask(Linkify.ALL);
    lblMsg.setLinksClickable(true);
    lblMsg.setText(getText(R.string.app_more_info));
    lblMsg.setLinkTextColor(UI.color_selected_grad_dk);
    lblMsg.setTextSize(TypedValue.COMPLEX_UNIT_PX, UI._14sp);
    if (UI.isLowDpiScreen) {
      findViewById(R.id.panelControls).setPadding(0, 0, 0, 0);
      findViewById(R.id.panelMsg).setPadding(UI._8dp, UI._8dp, UI._8dp, UI._8dp);
    } else if (UI.isLargeScreen) {
      lblMsg.setTextSize(TypedValue.COMPLEX_UNIT_PX, UI._18sp);
    }
  }
  
  @Override
  protected void onCleanupLayout() {
    btnGoBack = null;
  }
  
  @Override
  public void onClick(View view) {
    if (view == btnGoBack) {
      finish();
    }
  }
}




Java Source Code List

br.com.bandtec.nxtcontrol.ActivityAbout.java
br.com.bandtec.nxtcontrol.ActivityDeviceList.java
br.com.bandtec.nxtcontrol.ActivityMain.java
br.com.bandtec.nxtcontrol.BTCommunicator.java
br.com.bandtec.nxtcontrol.BTConnectable.java
br.com.bandtec.nxtcontrol.LCPMessage.java
br.com.bandtec.nxtcontrol.activity.ActivityHost.java
br.com.bandtec.nxtcontrol.activity.ClientActivity.java
br.com.bandtec.nxtcontrol.activity.MainHandler.java
br.com.bandtec.nxtcontrol.list.BaseItem.java
br.com.bandtec.nxtcontrol.list.BaseList.java
br.com.bandtec.nxtcontrol.list.DeviceItem.java
br.com.bandtec.nxtcontrol.ui.BaseItemView.java
br.com.bandtec.nxtcontrol.ui.BgButton.java
br.com.bandtec.nxtcontrol.ui.BgCheckBox.java
br.com.bandtec.nxtcontrol.ui.BgDirControl.java
br.com.bandtec.nxtcontrol.ui.BgImageButton.java
br.com.bandtec.nxtcontrol.ui.BgListView.java
br.com.bandtec.nxtcontrol.ui.BgTextView.java
br.com.bandtec.nxtcontrol.ui.CustomContextMenu.java
br.com.bandtec.nxtcontrol.ui.UI.java
br.com.bandtec.nxtcontrol.ui.drawable.BorderDrawable.java
br.com.bandtec.nxtcontrol.ui.drawable.ColorDrawable.java
br.com.bandtec.nxtcontrol.ui.drawable.NullDrawable.java
br.com.bandtec.nxtcontrol.ui.drawable.StateDrawable.java
br.com.bandtec.nxtcontrol.ui.drawable.TextIconDrawable.java
br.com.bandtec.nxtcontrol.util.ArraySorter.java
br.com.bandtec.nxtcontrol.util.SerializableMap.java
br.com.bandtec.nxtcontrol.util.Serializer.java
br.com.bandtec.nxtcontrol.util.Timer.java