Skip to content

Instantly share code, notes, and snippets.

View sakibguy's full-sized avatar
🎯
p.java

sakibguy

🎯
p.java
View GitHub Profile
@sakibguy
sakibguy / writable-avd.md
Created October 15, 2021 14:13 — forked from interference-security/writable-avd.md
How to make AVD system and file-system writable?
/**
* This method displays the given text on the screen.
*/
private void displayMessage(String message) {
TextView priceTextView = (TextView) findViewById(R.id.price_text_view);
priceTextView.setText(message);
}
@sakibguy
sakibguy / AdbCommands
Created October 21, 2021 15:58 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@sakibguy
sakibguy / Method 1
Created October 25, 2021 10:24 — forked from udacityandroid/Method 1
Android Development for Beginners : Define a Method
/**
* Get the email account name.
*
* @return the name of the account.
*/
private String getAccountName() {
return "android@gmail.com";
return "droid@gmail.com";
}
@sakibguy
sakibguy / TextView.java
Created October 27, 2021 05:25 — forked from udacityandroid/TextView.java
Android for Beginners : Simplified TextView class
/**
* Displays text to the user.
*/
public class TextView extends View {
// String value
private String mText;
// Text color of the text
private int mTextColor;
@sakibguy
sakibguy / ImageView.java
Created October 27, 2021 05:26 — forked from udacityandroid/ImageView.java
Android for Beginners : Simplified ImageView class
/**
* Displays an image, such as an icon.
*/
public class ImageView extends View {
// Resource ID for the source image that should be displayed in the ImageView.
private int mImageId;
// Context of the app
private Context mContext;
@sakibguy
sakibguy / MainActivity.java
Created October 29, 2021 07:03 — forked from udacityandroid/MainActivity.java
Android for Beginners : Menu Starter Code
package com.example.android.menu;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
public class MainActivity extends AppCompatActivity {
@Override
@sakibguy
sakibguy / activity_main.xml
Created October 31, 2021 13:00 — forked from udacityandroid/activity_main.xml
Android for Beginners : Add the Chocolate Topping Checkbox Solution XML
<ScrollView 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"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
@sakibguy
sakibguy / strings.xml
Created November 3, 2021 10:38 — forked from udacityandroid/strings.xml
Android for Beginners : Spanish Localization Solution. This would be saved in the res/values-es/strings.xml file.
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Title for the application. [CHAR LIMIT=12] -->
<string name="app_name">Sólo Java</string>
<!-- Hint text display in the empty field for the user's name [CHAR LIMIT=20] -->
<string name="name">Nombre</string>
<!-- Hint text display in the empty field for the user's name [CHAR LIMIT=20] -->
<string name="toppings">Ingredientes</string>
@sakibguy
sakibguy / Helper Method - releaseMediaPlayer()
Created December 3, 2021 15:41 — forked from udacityandroid/Helper Method - releaseMediaPlayer()
Miwok app: Cleaning up MediaPlayer resources
/**
* Clean up the media player by releasing its resources.
*/
private void releaseMediaPlayer() {
// If the media player is not null, then it may be currently playing a sound.
if (mMediaPlayer != null) {
// Regardless of the current state of the media player, release its resources
// because we no longer need it.
mMediaPlayer.release();