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
module.exports = (robot) -> | |
robot.respond /ifttt ([^ ]+) ([^ ]+)$/i, (res) -> | |
eventType = res.match[1] | |
val1 = res.match[2] | |
handleIftttMaker(res, eventType, val1, null, null) | |
robot.respond /ifttt ([^ ]+) ([^ ]+) ([^ ]+)$/i, (res) -> | |
eventType = res.match[1] | |
val1 = res.match[2] |
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
public class NestedFragment extends Fragment { | |
static final int REQUEST_ACTIVITY = 100; | |
static final int REQUEST_FRAGMENT = 200; | |
@Override | |
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { | |
View view = inflater.inflate(R.layout.fragment_nested, null); | |
((Button) view.findViewById(R.id.button1)).setOnClickListener(new View.OnClickListener() { |
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
if(getActivity() instanceof OnClickListener){ | |
getActivity().findViewById(R.id.hogehoge).setOnClickListener((OnClickListener)getActivity()); | |
} |
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
Intent intent = new Intent(); | |
intent.setAction(Settings.ACTION_ACCESSIBILITY_SETTINGS); | |
startActivity(intent); |
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
<manifest > | |
<activity uiOptions="splitActionBarWhenNarrow" > | |
<meta-data android:name="android.support.UI_OPTIONS" | |
android:value="splitActionBarWhenNarrow" /> | |
</activity> | |
</manifest> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example.nein37.syncadaptersample" > | |
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> | |
<uses-permission android:name="android.permission.USE_CREDENTIALS" /> | |
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" /> | |
<application | |
android:icon="@drawable/ic_launcher" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example.nein37.authenticatorsample"> | |
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" /> | |
<application | |
android:icon="@drawable/ic_launcher" | |
android:label="@string/app_name"> |
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
<uses-permission android:name="android.permission.GET_ACCOUNTS"/> | |
<uses-permission android:name="android.permission.USE_CREDENTIALS"/> |
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
@Override | |
public boolean onCreateOptionsMenu(Menu menu) { | |
getMenuInflater().inflate(R.menu.menu, menu); | |
return true; | |
} | |
@Override | |
public boolean onOptionsItemSelected(MenuItem item) { | |
int id = item.getItemId(); | |
switch (id){ |
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
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity); | |
CompoundButton toggle = (CompoundButton)findViewById(R.id.compoundButton); | |
toggle.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { | |
@Override | |
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { | |
// 状態が変更された |
NewerOlder