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
private void easeRegist(final String objectId) { | |
JSONObject object=new JSONObject(); | |
try { | |
object.put("username", objectId); | |
object.put("password", "abcd1234"); | |
object.put("nickname", objectId); | |
final MediaType JSON = MediaType.parse("application/json; charset=utf-8"); | |
OkHttpClient client = HttpUtils.getInstance().clone(); | |
RequestBody body = RequestBody.create(JSON, object.toString()); | |
Request request = new Request.Builder().addHeader("Content-Type", "application/json").url(ParamsUtil.HXUsers).post(body).build(); |
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
private void showNotification() { | |
NotificationCompat.Builder build=new NotificationCompat.Builder(this); | |
build.setSmallIcon(R.mipmap.ic_launcher); | |
build.setTicker("这是通知"); | |
build.setContentTitle("这是标题"); | |
//设置优先级 | |
build.setPriority(NotificationCompat.PRIORITY_MIN); | |
build.setContentText("这是内容"); | |
build.setContentIntent(getPendingIntent("普通文字", 0)); |
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
ViewPager vp=null; | |
RelativeLayout rel_layout=null; | |
ArrayList<Fragment> fragments=null; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); |
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 org.mariotaku.twidere.util; | |
import android.view.View; | |
import android.widget.AbsListView; | |
import android.widget.AbsListView.OnScrollListener; | |
/** | |
* Created by mariotaku on 14/10/22. | |
*/ | |
public class ListScrollDistanceCalculator implements OnScrollListener { |
OlderNewer