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
interface BTPrinter | |
{ | |
void printAt(int top, int left, String message); | |
//add more methods here | |
void selectFont(String font); | |
void cutThePaper(); | |
} | |
class ZebraPrinter implements BTPrinter |
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"?> | |
<resources> | |
<!-- Automatically generated file. DO NOT MODIFY --> | |
<!-- Values from the variant --> | |
<item name="colorAccent" type="color">#8CC63F</item> | |
<item name="colorAccentA10" type="color">#198CC63F</item> | |
<item name="colorAccentA20" type="color">#338CC63F</item> | |
<item name="colorAccentA30" type="color">#4c8CC63F</item> |
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"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item | |
android:bottom="-6dp" | |
android:right="-6dp" | |
android:top="-6dp"> | |
<shape> | |
<solid android:color="@android:color/black" /> | |
<stroke | |
android:width="5dp" |
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
package pl.selvin.android.broadcastkilled; | |
import android.app.Activity; | |
import android.app.Notification; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.IntentFilter; | |
import android.os.Bundle; | |
import android.util.Log; |
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.app.Activity; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.net.Uri; | |
import android.os.Bundle; | |
public class TestActivity extends Activity { | |
//well context is not valid yet, but we will use later so it is ok to use "this" | |
private Helper helper = new Helper(this); |
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
interface IMySuperInterface { | |
void setNumPlats(int numero); | |
} | |
class MyAtivity extends Activity implements IMySuperInterface { | |
//do the implentation and other stuff; | |
} | |
class MyFragment extends Fragment { | |
IMySuperInterface defaultInstance = new IMySuperInterface { |
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
<!-- values/attr.xml --> | |
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<attr name="my_image" format="reference" /> | |
</resources> | |
<!-- values/styles.xml --> | |
<style name="MyThemeBase" parent="@style/MyThemeBaseBase"> | |
<item name="my_image">@drawable/my_image_en</item> | |
</style> |
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
apply plugin: 'com.android.application' | |
android { | |
compileSdkVersion 22 | |
buildToolsVersion "22.0.1" | |
defaultConfig { | |
applicationId "pl.selvin.android.actionbar14" | |
minSdkVersion 14 | |
targetSdkVersion 22 |
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
class Service { | |
onStartCommand() { | |
enableGatheringOfSignalData(); | |
} | |
useSignalData(data) { | |
//do the stuff with signal data | |
} | |
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 xmlns:android="http://schemas.android.com/apk/res/android" | |
package="pl.selvin.android.sigletaskissingle"> | |
<application | |
android:allowBackup="true" | |
android:label="SingleTaskIsSingleTask"> | |
<activity | |
android:name=".Activities$ActivityA" | |
android:label="Activity A" | |
android:launchMode="singleTask"> |
OlderNewer