View SomeFragment.kt
override fun setUserVisibleHint(isVisibleToUser: Boolean) {
super.setUserVisibleHint(isVisibleToUser)
if (isVisibleToUser) {
someFunction()
}
}
View SomeFragment.kt
fun setStatusBarColor(color: Int) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
activity.window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
activity.window.statusBarColor = color
}
}
View MainActivity.java
public class MainActivity extends Activity {
ImageView maru_button,batsu_button,qbutton,rbutton;
private SoundPool mSoundPool;
private int maru_SoundId,batsu_SoundId,q_SoundId,r_SoundId;
InterstitialAd mInterstitialAd;
@Override
protected void onCreate(Bundle savedInstanceState) {
View gist:5f7bb3fd98d31c3a24ce56c48a493e25
http://www.reactnativeexpress.com/
https://facebook.github.io/react-native/docs/getting-started.html
View PostActivity.java
public class PostActivity extends AppCompatActivity{
private Button buttonPrefecture;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.post_activity);
View TabHostActivity.java
public class TabHostActivity extends AppCompatActivity {
TabHost tabHost;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.tab_host_activity);
TabHost host = (TabHost) findViewById(R.id.tabHost);
host.setup();