Created
January 28, 2018 15:53
-
-
Save LiewJunTung/067a4d5d72570513d59d72d4ed021d1b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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