This file contains hidden or 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 MainActivity : AppCompatActivity() { | |
private var mediaServiceBinder: MediaService.PlayerServiceBinder? = null | |
private var mediaController: MediaControllerCompat? = null | |
private var callback: MediaControllerCompat.Callback? = null | |
private var serviceConnection: ServiceConnection? = null | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) |
This file contains hidden or 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
private fun startWork(path: String) { | |
Thread { | |
val reader: BufferedReader? = null | |
val buf = StringBuilder() | |
try { | |
val url = URL(path) | |
val c = url.openConnection() as HttpURLConnection | |
c.setRequestMethod("GET") | |
c.setReadTimeout(10000) | |
c.connect() |
This file contains hidden or 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 FirstFragment extends AbstractFragment { | |
public FirstFragment() { | |
super(R.layout.fragment_first, R.id.frame_first_fragment); | |
} | |
} |
This file contains hidden or 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 abstract class AbstractFragment extends Fragment { | |
private static final String KEY_COLOR = "color"; | |
private int color; | |
@LayoutRes | |
private int layout; | |
@IdRes | |
private int idColorView; | |
public AbstractFragment(int layout, int idColorView) { |
This file contains hidden or 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 someproject; | |
/** | |
* | |
* @author Alex Kisel | |
*/ | |
public class BinaryConverter { | |
public static void main(String[] args) { | |
for(int i = -5; i < 33; i++) { |
This file contains hidden or 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 io.github.ziginsider.ideographicapp; | |
/** | |
* Created by zigin on 26.10.2016. | |
*/ | |
import android.app.Activity; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.os.AsyncTask; |
This file contains hidden or 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:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical"> | |
<android.support.design.widget.AppBarLayout | |
android:id="@+id/appbar_layout_recycler" | |
android:layout_width="match_parent" |
This file contains hidden or 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 data; | |
import android.content.Context; | |
import android.support.design.widget.TabLayout; | |
import android.support.v4.app.Fragment; | |
import android.support.v4.app.FragmentManager; | |
import android.support.v4.app.FragmentPagerAdapter; | |
import android.support.v4.app.FragmentStatePagerAdapter; | |
import android.support.v4.app.FragmentTransaction; | |
import android.support.v4.view.ViewPager; |
This file contains hidden or 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
language: node_js | |
node_js: | |
- "7.0" | |
script: | |
- echo "Deploying!" | |
install: | |
- npm install -g firebase-tools | |
after_success: | |
- firebase deploy --project your_project_id --token $FIREBASE_TOKEN |
This file contains hidden or 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
before_deploy: "echo 'ready?'" | |
deploy: | |
provider: firebase | |
token: | |
secure: $FIREBASE_TOKEN | |
project: "myapp-staging" | |
message: "Deploying!!!" |