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
File dir = Environment.getExternalStorageDirectory();//获取SD卡目录 | |
File file = new File(dir, "girl.jpg");//文件必须存在,自己放个同名的图片过去 | |
AQuery aq = new AQuery(TestActivity.this); | |
String url = APIAgent.URL_SERVER_IMPRESSION_UPLOAD; | |
Map<String, Object> params = new HashMap<String, Object>(); | |
params.put("message", "Message"); | |
params.put("file", file);//可以传二进制数据也可以传文件 | |
AjaxCallback<String> cb = new AjaxCallback<String>() { | |
@Override |
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
DaoMaster.DevOpenHelper helper = new DaoMaster.DevOpenHelper(this, "notes-db", null); | |
db = helper.getWritableDatabase(); | |
daoMaster = new DaoMaster(db); | |
daoSession = daoMaster.newSession(); | |
boxDao = daoSession.getBoxDao(); | |
Box box = new Box(null, "魔方", 1, "魔方描述"); | |
boxDao.insert(box); | |
Logger.d("Inserted new note, ID: " + box.getId()); |
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 void initToolBar() { | |
toolbar = (Toolbar) findViewById(R.id.my_awesome_toolbar); | |
// App Logo | |
//toolbar.setLogo(R.mipmap.ic_launcher); | |
// Title | |
toolbar.setTitle("Login"); | |
// Sub Title | |
//toolbar.setSubtitle("Sub title"); | |
//toolbar.setTitleTextColor(getResources().getColor(R.color.white)); |
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
getSupportActionBar().setDisplayHomeAsUpEnabled(true); | |
getSupportActionBar().setTitle("Login"); | |
getSupportActionBar().setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.bar_color))); | |
getSupportActionBar().hide(); |
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
// Bitmap bitmap; | |
// | |
// if (drawable instanceof BitmapDrawable) { | |
// BitmapDrawable bitmapDrawable = (BitmapDrawable) drawable; | |
// if (bitmapDrawable.getBitmap() != null) { | |
// return bitmapDrawable.getBitmap(); | |
// } | |
// } | |
// | |
// if (drawable.getIntrinsicWidth() <= 0 || drawable.getIntrinsicHeight() <= 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
nextBtn.setOnTouchListener(new View.OnTouchListener() { | |
@Override | |
public boolean onTouch(View v, MotionEvent event) { | |
if (event.getAction() == MotionEvent.ACTION_DOWN) { | |
nextBtn.setBackgroundResource(R.drawable.gender_next_btn_selected); | |
} else if (event.getAction() == MotionEvent.ACTION_UP) { | |
callback.nextBtnClick(); | |
} | |
return false; | |
} |
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
<com.rey.material.widget.Spinner | |
android:id="@+id/speciality" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_below="@+id/job_layout" | |
android:layout_marginLeft="@dimen/profile_detail_common_margin" | |
android:layout_marginRight="@dimen/profile_detail_common_margin" | |
android:layout_marginTop="20dp" | |
android:minWidth="128dp" | |
app:spn_arrowSize="0dp" /> |
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
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.test_activity_custom_ui_3); | |
addFragment(android.R.id.content, | |
DiamondsWalletFragment.newInstance(), | |
"DiamondsWalletFragment"); | |
} | |
protected void addFragment(int containerViewId, |
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
adb push /Users/dean/Documents/flirten2/flirten2-android/flirten/app/app-integration-release.apk /sdcard/Download |
OlderNewer