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
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import android.view.View; | |
import android.widget.AdapterView; | |
import android.widget.ArrayAdapter; | |
import android.widget.Spinner; | |
public class MainActivity extends AppCompatActivity { | |
@Override |
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
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import android.view.View; | |
import android.widget.AdapterView; | |
import android.widget.ArrayAdapter; | |
import android.widget.Spinner; | |
public class MainActivity extends AppCompatActivity { | |
@Override |
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
String msg ="改行文字入りテキスト"; | |
String enc; | |
try { | |
//文字をエンコード | |
enc = URLEncoder.encode(msg, "utf-8"); //(エンコードしたい変数,"文字コード") | |
} catch (UnsupportedEncodingException e) { | |
//エンコード失敗時 | |
} |
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
<ListView | |
android:id="@+id/listView" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:drawSelectorOnTop="false" | |
android:layout_weight="1" > | |
</ListView> |
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 MainActivity extends AppCompatActivity { | |
DatabaseOpenHelper helper=new DatabaseOpenHelper(this); | |
SQLiteDatabase db; | |
Cursor cursor=null; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
db=helper.getWritableDatabase(); |
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
import android.os.Bundle; | |
import android.speech.tts.TextToSpeech; | |
import android.support.v7.app.AppCompatActivity; | |
import android.util.Log; | |
import android.view.View; | |
import android.widget.Button; | |
import java.util.Locale; | |
public class MainActivity extends AppCompatActivity implements TextToSpeech.OnInitListener { |
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"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" > | |
<TextView | |
android:id="@+id/texiView" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="Sample" /> | |
</LinearLayout> |
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
<!--省略--> | |
<PreferenceCategory | |
android:layout="@layout/sampleview"> | |
</PreferenceCategory> | |
<!--省略--> |
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 boolean setViewValue(View view, Cursor cursor, int columnIndex) { | |
switch (columnIndex) { | |
case 0: | |
TextView date = (TextView) view; | |
date.setText(cursor.getString(1) + "-" + cursor.getString(2) + "-" + cursor.getString(3)); | |
return true; | |
case 1: | |
TextView id = (TextView) view; | |
int time = 1; | |
int minute = 30; |
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"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
tools:context="com.example.hoge.buttontest.MainActivity"> | |
<LinearLayout | |
android:orientation="horizontal" |
OlderNewer