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
| compile 'com.android.support:appcompat-v7:23.4.0' | |
| compile 'com.android.support:design:23.4.0' | |
| compile 'com.android.support:recyclerview-v7:23.1.1' | |
| compile 'com.squareup.picasso:picasso:2.5.2' | |
| compile 'com.squareup.retrofit2:retrofit:2.1.0' | |
| compile 'com.squareup.retrofit2:converter-gson:2.1.0' | |
| compile 'com.google.code.gson:gson:2.8.0' | |
| compile 'com.squareup.okhttp:okhttp:2.4.0' |
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 void pdfcreates() | |
| { | |
| page = new AbstractViewRenderer(getApplicationContext(), R.layout.viewpd) { | |
| private String _text; | |
| public void setText(String text) { | |
| _text = text; | |
| } |
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
| try { | |
| FileInputStream fis= new FileInputStream(Stringpath); | |
| ByteArrayOutputStream bos = new ByteArrayOutputStream(); | |
| byte[] buf = new byte[1024]; | |
| try {for (int readNum; (readNum = fis.read(buf)) != -1; ) { | |
| bos.write(buf, 0, readNum); //no doubt here is 0 | |
| //Writes len bytes from the specified byte array starting at offset off to this byte array output stream. | |
| //System.out.println("read " + readNum + " bytes,"); | |
| } | |
| byte[] bufzz = bos.toByteArray(); |
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 void showsnackbar(String message){ | |
| Snackbar snackbar = Snackbar | |
| .make(findViewById(R.id.update_relative(parentlayout id)), message, Snackbar.LENGTH_SHORT); | |
| View sbView = snackbar.getView(); | |
| sbView.setBackgroundColor(Color.parseColor("#A981CA")); | |
| TextView textView = (TextView) sbView.findViewById(android.support.design.R.id.snackbar_text); | |
| textView.setTextColor(Color.BLACK); | |
| snackbar.show(); |
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 student.napt.com.napt2.Activity; | |
| import android.Manifest; | |
| import android.content.DialogInterface; | |
| import android.content.Intent; | |
| import android.content.pm.PackageManager; | |
| import android.net.Uri; | |
| import android.os.Build; | |
| import android.os.Bundle; | |
| import android.os.Handler; |
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
| //change | |
| apply plugin:'com.android.library' | |
| //delete application id,version code ,version name | |
| task deleteOldJar(type: Delete) | |
| { | |
| delete 'release/AndroidPlugin.jar' | |
| } | |
| task exportJar(type: Copy) |
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
| <de.hdodenhof.circleimageview.CircleImageView | |
| android:id="@+id/avatar" | |
| android:layout_width="@dimen/list_item_avatar_size" | |
| android:layout_height="@dimen/list_item_avatar_size" | |
| android:layout_marginRight="16dp"/> | |
| library: | |
| compile 'de.hdodenhof:circleimageview:1.3.0' | |
| Imagecall |
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
| Activity: | |
| /* | |
| * Copyright (C) 2015 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 |
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
| //gradle gson | |
| compile 'com.google.code.gson:gson:2.8.0' | |
| //convet listview to string | |
| String save_ = new Gson().toJson(itemsList); | |
| //reverse process |
OlderNewer