| |
---|
| | import android.provider.Settings; |
---|
| | import android.util.Log; |
---|
| | import android.view.Menu; |
---|
| | import android.view.MenuItem; |
---|
| | import android.view.View; |
---|
| | import android.widget.ImageButton; |
---|
| | import android.widget.Toast; |
---|
| | |
---|
| | import com.google.android.material.bottomnavigation.BottomNavigationView; |
---|
| | |
---|
| |
---|
| | private ArrayList<LocationListener> listeners = new ArrayList<>(); |
---|
| | private HashMap<String ,Category> categories; |
---|
| | ArrayList<String> checkedList = new ArrayList<>(); |
---|
| | HashMap<Integer,String> menuItemMap = new HashMap<>(); |
---|
| | ImageButton playbutton; |
---|
| | ImageButton stopbutton; |
---|
| | ImageButton skipbutton; |
---|
| | |
---|
| | int playfrag=0; |
---|
| | int stopfrag=0; |
---|
| | |
---|
| | @Override |
---|
| | protected void onCreate(Bundle savedInstanceState) { |
---|
| | super.onCreate(savedInstanceState); |
---|
| |
---|
| | } |
---|
| | |
---|
| | }); |
---|
| | |
---|
| | //収音関係のボタンの処理 |
---|
| | playbutton = (ImageButton)findViewById(R.id.playbutton); |
---|
| | playbutton.setOnClickListener(new View.OnClickListener() { |
---|
| | public void onClick(View v) { |
---|
| | playfrag++; |
---|
| | if((playfrag%2)==0){ |
---|
| | //こっち側がオフ |
---|
| | }else{ |
---|
| | //こっち側がオン |
---|
| | } |
---|
| | } |
---|
| | }); |
---|
| | stopbutton = (ImageButton)findViewById(R.id.stopbutton); |
---|
| | stopbutton.setOnClickListener(new View.OnClickListener() { |
---|
| | public void onClick(View v) { |
---|
| | stopfrag++; |
---|
| | if((stopfrag%2)==0){ |
---|
| | //こっち側がオフ |
---|
| | }else{ |
---|
| | //こっち側がオン |
---|
| | } |
---|
| | } |
---|
| | }); |
---|
| | skipbutton = (ImageButton)findViewById(R.id.skipbutton); |
---|
| | skipbutton.setOnClickListener(new View.OnClickListener() { |
---|
| | public void onClick(View v) { |
---|
| | |
---|
| | } |
---|
| | }); |
---|
| | |
---|
| | |
---|
| | LocationManager manager = (LocationManager) getSystemService(LOCATION_SERVICE); |
---|
| | if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) { |
---|
| | return; |
---|
| |
---|
| | |