Skip to content

Instantly share code, notes, and snippets.

@LiewJunTung
Created January 28, 2018 15:53
Show Gist options
  • Save LiewJunTung/067a4d5d72570513d59d72d4ed021d1b to your computer and use it in GitHub Desktop.
Save LiewJunTung/067a4d5d72570513d59d72d4ed021d1b to your computer and use it in GitHub Desktop.
package org.gdgkl.androidapplication;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
import com.example.yourcompany.Calculator;
public class MainActivity extends AppCompatActivity {
// Used to load the 'native-lib' library on application startup.
static {
System.loadLibrary("calculator");
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Calculator calculator = Calculator.create();
TextView tv = (TextView) findViewById(R.id.sample_text);
tv.setText(calculator.summation(3, 3) + "");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment