Skip to content

Instantly share code, notes, and snippets.

@coldyca
coldyca / MainActivity
Created June 6, 2017 13:37
MediaPlayer
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final MediaPlayer mp = MediaPlayer.create(this, R.raw.color_brown);
Button b = (Button) findViewById(R.id.play);
Button b2= (Button) findViewById(R.id.pause);
Button b3= (Button) findViewById(R.id.volumedown);
@coldyca
coldyca / layout_activity_all.xml
Created May 13, 2017 21:13
Calin Apostu music app
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
@coldyca
coldyca / activity_main.xml
Last active April 11, 2017 17:57
c++ quiz app
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background25">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"