- 浏览: 930363 次
- 性别:
- 来自: 山西
文章分类
最新评论
-
白小默:
你好 可以提供下源码DEMO吗,不知为何,我导出来的excel ...
jxls 使用模板文件导出生成excel -
zkzqzzz:
博主威武!
让微信二维码扫描您的APK -
zkzqzzz:
感谢博主 原来那些类都不是必须的 或者自己写!!博主真棒 ...
抢红包插件实现原理浅析 -
zkzqzzz:
博主 请问你的其他类在哪里呢?
抢红包插件实现原理浅析 -
zkzqzzz:
其他类在哪呢?
抢红包插件实现原理浅析
如果是自己的微博,可以干掉它
下面三幅图是转播,对话以及点评界面
- public class WeiboDetailActivity extends Activity {
- private DataHelper dataHelper;
- private UserInfo user;
- private MyWeiboSync weibo;
- private Handler handler;
- private AsyncImageLoader asyncImageLoader;
- private GetDetailThread thread;
- private String weiboid;
- private String returnJsonStr;
- private JSONObject dataObj ;
- private ImageView show_headicon;
- private ImageView show_image;
- private TextView show_count_mcount;
- private ImageView show_delete;
- private TextView show_nick;
- private TextView show_email;
- private TextView show_origtext;
- private TextView show_time;
- private TextView show_from;
- private Button to_userinfo_btn;
- private Button show_star_btn;
- private Button show_back_btn;
- private TextView show_rebroad_btn;
- private TextView show_dialog_btn;
- private TextView show_remark_btn;
- private Button show_tohome_btn;
- private RelativeLayout show_top;
- private View weibodetail_bottom3_bar;
- private JSONObject source = null;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.weibo_detail);
- setUpViews();//设置view
- setUpListeners();//设置listenter
- asyncImageLoader = new AsyncImageLoader();
- Intent intent = getIntent();
- weiboid = intent.getStringExtra("weiboid");
- dataHelper = new DataHelper(WeiboDetailActivity.this);
- weibo = new MyWeiboSync();
- List<UserInfo> userList = dataHelper.GetUserList(false);
- SharedPreferences preferences = getSharedPreferences("default_user",Activity.MODE_PRIVATE);
- String nick = preferences.getString("user_default_nick", "");
- if (nick != "") {
- user = dataHelper.getUserByName(nick,userList);
- }
- weibo.setAccessTokenKey(user.getToken());
- weibo.setAccessTokenSecrect(user.getTokenSecret());
- handler = new DealHandler();
- thread = new GetDetailThread();
- thread.start();//开启一个线程获取数据
- }
- private void setUpViews(){
- show_headicon = (ImageView) findViewById(R.id.show_headicon);
- show_delete = (ImageView) findViewById(R.id.show_delete);
- show_nick = (TextView) findViewById(R.id.show_nick);
- show_email = (TextView) findViewById(R.id.show_email);
- show_origtext = (TextView) findViewById(R.id.show_origtext);
- show_image = (ImageView) findViewById(R.id.show_image);
- show_count_mcount = (TextView)findViewById(R.id.show_count_mcount);
- show_time = (TextView) findViewById(R.id.show_time);
- show_from = (TextView) findViewById(R.id.show_from);
- to_userinfo_btn = (Button) findViewById(R.id.to_userinfo_btn);
- show_star_btn = (Button) findViewById(R.id.show_star_btn);
- show_back_btn = (Button) findViewById(R.id.show_back_btn);
- weibodetail_bottom3_bar = (View)findViewById(R.id.weibo_detail_bottom_bar);
- show_rebroad_btn = (TextView)weibodetail_bottom3_bar.findViewById(R.id.show_rebroad_btn);
- show_dialog_btn = (TextView)weibodetail_bottom3_bar.findViewById(R.id.show_dialog_btn);
- show_remark_btn = (TextView)weibodetail_bottom3_bar.findViewById(R.id.show_remark_btn);
- show_tohome_btn = (Button) findViewById(R.id.show_tohome_btn);
- show_top = (RelativeLayout)findViewById(R.id.show_top);
- }
- private void setUpListeners(){
- show_top.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- Intent intent = new Intent(WeiboDetailActivity.this,UserInfoActivity.class);
- try {
- intent.putExtra("name", dataObj.getString("name"));
- intent.putExtra("nick", dataObj.getString("nick"));
- intent.putExtra("origtext", dataObj.getString("origtext"));
- intent.putExtra("timestamp", TimeUtil.getStandardTime(dataObj.getLong("timestamp")));
- } catch (JSONException e) {
- e.printStackTrace();
- }
- startActivity(intent);//跳转到用户信息界面
- }
- });
- to_userinfo_btn.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- Intent intent = new Intent(WeiboDetailActivity.this,UserInfoActivity.class);
- try {
- intent.putExtra("name", dataObj.getString("name"));
- intent.putExtra("nick", dataObj.getString("nick"));
- intent.putExtra("origtext", dataObj.getString("origtext"));
- intent.putExtra("timestamp", TimeUtil.getStandardTime(dataObj.getLong("timestamp")));
- } catch (JSONException e) {
- e.printStackTrace();
- }
- startActivity(intent);//跳转到用户信息界面
- }
- });
- show_image.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View arg0) {
- //跳到大图浏览界面.
- }
- });
- show_count_mcount.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View arg0) {
- //此微博的转播和点评
- Toast.makeText(WeiboDetailActivity.this, "将显示此微博的转播和点评列表", Toast.LENGTH_SHORT).show();
- }
- });
- show_rebroad_btn.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View arg0) {//转播此条微博
- Intent intent = new Intent(WeiboDetailActivity.this,AddWeiboActivity.class);
- try {
- if(source!=null){
- intent.putExtra("tip", "转播 "+source.getString("nick"));
- }else{
- intent.putExtra("tip", "转播 "+dataObj.getString("nick"));
- }
- if(dataObj.getString("origtext")!=null&&!"".equals(dataObj.getString("origtext"))){
- intent.putExtra("content", "|| @"+dataObj.getString("nick")+": "+dataObj.getString("origtext"));
- intent.putExtra("reid", dataObj.getString("id"));
- }else{
- intent.putExtra("content", "|| @"+source.getString("nick")+": ");
- intent.putExtra("reid", source.getString("id"));
- }
- intent.putExtra("from_flag", "rebroad");
- } catch (JSONException e) {
- e.printStackTrace();
- }
- startActivity(intent);
- }
- });
- show_dialog_btn.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View arg0) {//对话此条微博所有者
- Intent intent = new Intent(WeiboDetailActivity.this,AddWeiboActivity.class);
- try {
- intent.putExtra("tip", "对话 "+dataObj.getString("nick"));
- intent.putExtra("to",dataObj.getString("name"));//对话人的name
- intent.putExtra("from_flag", "private");
- intent.putExtra("content", "");
- } catch (JSONException e) {
- e.printStackTrace();
- }
- startActivity(intent);
- }
- });
- show_remark_btn.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View arg0) {//点评此条微博
- Intent intent = new Intent(WeiboDetailActivity.this,AddWeiboActivity.class);
- try {
- if(source!=null){
- intent.putExtra("tip", "点评 "+source.getString("nick"));
- }else{
- intent.putExtra("tip", "点评 "+dataObj.getString("nick"));
- }
- if(dataObj.getString("origtext")!=null&&!"".equals(dataObj.getString("origtext"))){
- intent.putExtra("content", "|| @"+dataObj.getString("nick")+": "+dataObj.getString("origtext"));
- intent.putExtra("reid", dataObj.getString("id"));
- }else{
- intent.putExtra("content", "|| @"+source.getString("nick")+": ");
- intent.putExtra("reid", source.getString("id"));
- }
- intent.putExtra("from_flag", "comment");
- } catch (JSONException e) {
- e.printStackTrace();
- }
- startActivity(intent);
- }
- });
- }
- class GetDetailThread extends Thread {
- @Override
- public void run() {
- returnJsonStr = weibo.getWeiboDetail(weibo.getAccessTokenKey(), weibo.getAccessTokenSecrect(), weiboid);
- Message msg = handler.obtainMessage();
- handler.sendMessage(msg);
- }
- }
- class DealHandler extends Handler {
- @Override
- public void handleMessage(Message msg){
- Drawable cachedImage;
- try {
- dataObj = new JSONObject(returnJsonStr).getJSONObject("data");
- cachedImage = asyncImageLoader.loadDrawable(dataObj.getString("head")+"/100",show_headicon, new ImageCallback(){
- @Override
- public void imageLoaded(Drawable imageDrawable,ImageView imageView, String imageUrl) {
- imageView.setImageDrawable(imageDrawable);
- }
- });
- if (cachedImage == null) {
- show_headicon.setImageResource(R.drawable.icon);
- } else {
- show_headicon.setImageDrawable(cachedImage);
- }
- String count_mcount_text = "转播和点评("+(dataObj.getInt("count")+dataObj.getInt("mcount"))+")";//加下划线
- SpannableStringBuilder underlineSpannable=new SpannableStringBuilder(count_mcount_text);
- CharacterStyle span=new UnderlineSpan();
- underlineSpannable.setSpan(span, 0, count_mcount_text.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
- show_count_mcount.setText(underlineSpannable);
- show_nick.setText(dataObj.getString("nick"));
- show_email.setText("@"+dataObj.getString("name"));
- show_origtext.setText(dataObj.getString("origtext"));
- show_time.setText(TimeUtil.getStandardTime(dataObj.getLong("timestamp")));
- show_from.setText("来自"+dataObj.getString("from"));
- if(dataObj.getString("nick").equals(user.getUserName())){
- show_delete.setVisibility(View.VISIBLE);
- }
- JSONArray imageArray = dataObj.optJSONArray("image");//如果此微博有图片内容,就显示出来
- if(imageArray!=null&&imageArray.length()>0){
- String imageUrl = imageArray.optString(0)+"/460";//为什么加/460,腾讯规定的,支持160,2000,460还有一些,记不住了
- Drawable drawable = asyncImageLoader.loadDrawable(imageUrl,show_image, new ImageCallback(){
- @Override
- public void imageLoaded(Drawable imageDrawable,ImageView imageView, String imageUrl) {
- imageView.setImageDrawable(imageDrawable);
- }
- });
- show_image.setVisibility(View.VISIBLE);
- }
- if(!"null".equals(dataObj.getString("source"))){
- source = dataObj.getJSONObject("source");
- }
- } catch (JSONException e) {
- e.printStackTrace();
- }
- }
- }
- }
public class WeiboDetailActivity extends Activity { private DataHelper dataHelper; private UserInfo user; private MyWeiboSync weibo; private Handler handler; private AsyncImageLoader asyncImageLoader; private GetDetailThread thread; private String weiboid; private String returnJsonStr; private JSONObject dataObj ; private ImageView show_headicon; private ImageView show_image; private TextView show_count_mcount; private ImageView show_delete; private TextView show_nick; private TextView show_email; private TextView show_origtext; private TextView show_time; private TextView show_from; private Button to_userinfo_btn; private Button show_star_btn; private Button show_back_btn; private TextView show_rebroad_btn; private TextView show_dialog_btn; private TextView show_remark_btn; private Button show_tohome_btn; private RelativeLayout show_top; private View weibodetail_bottom3_bar; private JSONObject source = null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.weibo_detail); setUpViews();//设置view setUpListeners();//设置listenter asyncImageLoader = new AsyncImageLoader(); Intent intent = getIntent(); weiboid = intent.getStringExtra("weiboid"); dataHelper = new DataHelper(WeiboDetailActivity.this); weibo = new MyWeiboSync(); List<UserInfo> userList = dataHelper.GetUserList(false); SharedPreferences preferences = getSharedPreferences("default_user",Activity.MODE_PRIVATE); String nick = preferences.getString("user_default_nick", ""); if (nick != "") { user = dataHelper.getUserByName(nick,userList); } weibo.setAccessTokenKey(user.getToken()); weibo.setAccessTokenSecrect(user.getTokenSecret()); handler = new DealHandler(); thread = new GetDetailThread(); thread.start();//开启一个线程获取数据 } private void setUpViews(){ show_headicon = (ImageView) findViewById(R.id.show_headicon); show_delete = (ImageView) findViewById(R.id.show_delete); show_nick = (TextView) findViewById(R.id.show_nick); show_email = (TextView) findViewById(R.id.show_email); show_origtext = (TextView) findViewById(R.id.show_origtext); show_image = (ImageView) findViewById(R.id.show_image); show_count_mcount = (TextView)findViewById(R.id.show_count_mcount); show_time = (TextView) findViewById(R.id.show_time); show_from = (TextView) findViewById(R.id.show_from); to_userinfo_btn = (Button) findViewById(R.id.to_userinfo_btn); show_star_btn = (Button) findViewById(R.id.show_star_btn); show_back_btn = (Button) findViewById(R.id.show_back_btn); weibodetail_bottom3_bar = (View)findViewById(R.id.weibo_detail_bottom_bar); show_rebroad_btn = (TextView)weibodetail_bottom3_bar.findViewById(R.id.show_rebroad_btn); show_dialog_btn = (TextView)weibodetail_bottom3_bar.findViewById(R.id.show_dialog_btn); show_remark_btn = (TextView)weibodetail_bottom3_bar.findViewById(R.id.show_remark_btn); show_tohome_btn = (Button) findViewById(R.id.show_tohome_btn); show_top = (RelativeLayout)findViewById(R.id.show_top); } private void setUpListeners(){ show_top.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(WeiboDetailActivity.this,UserInfoActivity.class); try { intent.putExtra("name", dataObj.getString("name")); intent.putExtra("nick", dataObj.getString("nick")); intent.putExtra("origtext", dataObj.getString("origtext")); intent.putExtra("timestamp", TimeUtil.getStandardTime(dataObj.getLong("timestamp"))); } catch (JSONException e) { e.printStackTrace(); } startActivity(intent);//跳转到用户信息界面 } }); to_userinfo_btn.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(WeiboDetailActivity.this,UserInfoActivity.class); try { intent.putExtra("name", dataObj.getString("name")); intent.putExtra("nick", dataObj.getString("nick")); intent.putExtra("origtext", dataObj.getString("origtext")); intent.putExtra("timestamp", TimeUtil.getStandardTime(dataObj.getLong("timestamp"))); } catch (JSONException e) { e.printStackTrace(); } startActivity(intent);//跳转到用户信息界面 } }); show_image.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { //跳到大图浏览界面. } }); show_count_mcount.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { //此微博的转播和点评 Toast.makeText(WeiboDetailActivity.this, "将显示此微博的转播和点评列表", Toast.LENGTH_SHORT).show(); } }); show_rebroad_btn.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) {//转播此条微博 Intent intent = new Intent(WeiboDetailActivity.this,AddWeiboActivity.class); try { if(source!=null){ intent.putExtra("tip", "转播 "+source.getString("nick")); }else{ intent.putExtra("tip", "转播 "+dataObj.getString("nick")); } if(dataObj.getString("origtext")!=null&&!"".equals(dataObj.getString("origtext"))){ intent.putExtra("content", "|| @"+dataObj.getString("nick")+": "+dataObj.getString("origtext")); intent.putExtra("reid", dataObj.getString("id")); }else{ intent.putExtra("content", "|| @"+source.getString("nick")+": "); intent.putExtra("reid", source.getString("id")); } intent.putExtra("from_flag", "rebroad"); } catch (JSONException e) { e.printStackTrace(); } startActivity(intent); } }); show_dialog_btn.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) {//对话此条微博所有者 Intent intent = new Intent(WeiboDetailActivity.this,AddWeiboActivity.class); try { intent.putExtra("tip", "对话 "+dataObj.getString("nick")); intent.putExtra("to",dataObj.getString("name"));//对话人的name intent.putExtra("from_flag", "private"); intent.putExtra("content", ""); } catch (JSONException e) { e.printStackTrace(); } startActivity(intent); } }); show_remark_btn.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) {//点评此条微博 Intent intent = new Intent(WeiboDetailActivity.this,AddWeiboActivity.class); try { if(source!=null){ intent.putExtra("tip", "点评 "+source.getString("nick")); }else{ intent.putExtra("tip", "点评 "+dataObj.getString("nick")); } if(dataObj.getString("origtext")!=null&&!"".equals(dataObj.getString("origtext"))){ intent.putExtra("content", "|| @"+dataObj.getString("nick")+": "+dataObj.getString("origtext")); intent.putExtra("reid", dataObj.getString("id")); }else{ intent.putExtra("content", "|| @"+source.getString("nick")+": "); intent.putExtra("reid", source.getString("id")); } intent.putExtra("from_flag", "comment"); } catch (JSONException e) { e.printStackTrace(); } startActivity(intent); } }); } class GetDetailThread extends Thread { @Override public void run() { returnJsonStr = weibo.getWeiboDetail(weibo.getAccessTokenKey(), weibo.getAccessTokenSecrect(), weiboid); Message msg = handler.obtainMessage(); handler.sendMessage(msg); } } class DealHandler extends Handler { @Override public void handleMessage(Message msg){ Drawable cachedImage; try { dataObj = new JSONObject(returnJsonStr).getJSONObject("data"); cachedImage = asyncImageLoader.loadDrawable(dataObj.getString("head")+"/100",show_headicon, new ImageCallback(){ @Override public void imageLoaded(Drawable imageDrawable,ImageView imageView, String imageUrl) { imageView.setImageDrawable(imageDrawable); } }); if (cachedImage == null) { show_headicon.setImageResource(R.drawable.icon); } else { show_headicon.setImageDrawable(cachedImage); } String count_mcount_text = "转播和点评("+(dataObj.getInt("count")+dataObj.getInt("mcount"))+")";//加下划线 SpannableStringBuilder underlineSpannable=new SpannableStringBuilder(count_mcount_text); CharacterStyle span=new UnderlineSpan(); underlineSpannable.setSpan(span, 0, count_mcount_text.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); show_count_mcount.setText(underlineSpannable); show_nick.setText(dataObj.getString("nick")); show_email.setText("@"+dataObj.getString("name")); show_origtext.setText(dataObj.getString("origtext")); show_time.setText(TimeUtil.getStandardTime(dataObj.getLong("timestamp"))); show_from.setText("来自"+dataObj.getString("from")); if(dataObj.getString("nick").equals(user.getUserName())){ show_delete.setVisibility(View.VISIBLE); } JSONArray imageArray = dataObj.optJSONArray("image");//如果此微博有图片内容,就显示出来 if(imageArray!=null&&imageArray.length()>0){ String imageUrl = imageArray.optString(0)+"/460";//为什么加/460,腾讯规定的,支持160,2000,460还有一些,记不住了 Drawable drawable = asyncImageLoader.loadDrawable(imageUrl,show_image, new ImageCallback(){ @Override public void imageLoaded(Drawable imageDrawable,ImageView imageView, String imageUrl) { imageView.setImageDrawable(imageDrawable); } }); show_image.setVisibility(View.VISIBLE); } if(!"null".equals(dataObj.getString("source"))){ source = dataObj.getJSONObject("source"); } } catch (JSONException e) { e.printStackTrace(); } } } }
- <?xml version="1.0" encoding="utf-8"?>
- <RelativeLayout android:id="@+id/widget28"
- android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ffffffff"
- xmlns:android="http://schemas.android.com/apk/res/android">
- <RelativeLayout android:id="@+id/show_top" android:paddingTop="5.0dip" android:layout_width="fill_parent" android:layout_height="60.0dip" android:background="#c7cbd6" android:layout_alignParentTop="true" android:layout_centerHorizontal="true">
- <ImageView android:id="@+id/show_headicon" android:layout_marginLeft="8.0dip" android:layout_width="45.0dip" android:layout_height="45.0dip" android:layout_alignParentLeft="true"/>
- <TextView android:id="@+id/show_nick" android:layout_marginLeft="5.0dip" android:layout_width="wrap_content" android:layout_toRightOf="@id/show_headicon" android:textColor="#384050"
- android:layout_height="wrap_content"/>
- <TextView android:id="@+id/show_email" android:layout_width="wrap_content" android:layout_marginLeft="10.0dip" android:layout_toRightOf="@id/show_headicon" android:textColor="#687888"
- android:layout_height="wrap_content" android:layout_below="@id/show_nick"/>
- <Button android:id="@+id/to_userinfo_btn" android:layout_width="wrap_content" android:background="@drawable/arrow_more_info_selector"
- android:layout_height="wrap_content" android:layout_alignParentRight="true"/>
- </RelativeLayout>
- <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@id/show_top" android:paddingTop="5.0dip">
- <TextView android:id="@+id/show_origtext" android:layout_width="fill_parent" android:layout_marginLeft="5.0dip" android:textSize="16.0sp" android:textColor="#707878"
- android:layout_height="wrap_content"/>
- <ImageView android:id="@+id/show_image" android:visibility="gone" android:layout_centerInParent="true" android:layout_below="@id/show_origtext" android:layout_width="fill_parent" android:layout_height="120.0dip"/>
- <TextView android:id="@+id/show_count_mcount" android:layout_below="@id/show_image" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="18.0sp" android:textColor="#1d5884"/>
- <TextView android:id="@+id/show_time" android:layout_width="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginTop="10.0dip" android:textSize="12.0sp"
- android:layout_height="wrap_content" android:layout_below="@id/show_count_mcount"/>
- <TextView android:id="@+id/show_from" android:layout_width="wrap_content" android:layout_marginLeft="3.0dip" android:layout_marginTop="10.0dip" android:textSize="12.0sp"
- android:layout_height="wrap_content" android:layout_below="@id/show_count_mcount" android:layout_toRightOf="@id/show_time"/>
- <Button android:id="@+id/show_star_btn" android:layout_width="wrap_content" android:layout_marginRight="5.0dip" android:layout_marginTop="10.0dip"
- android:layout_height="wrap_content" android:background="@drawable/btn_fav" android:layout_below="@id/show_count_mcount" android:layout_alignParentRight="true"/>
- <ImageView android:id="@+id/show_delete" android:src="@drawable/delete" android:layout_width="wrap_content" android:layout_marginRight="3.0dip" android:layout_marginTop="10.0dip" android:visibility="invisible" android:layout_height="wrap_content" android:layout_below="@id/show_count_mcount" android:layout_toLeftOf="@id/show_star_btn"/>
- </RelativeLayout>
- <RelativeLayout android:layout_width="fill_parent" android:layout_height="40.0dip" android:layout_alignParentBottom="true">
- <Button android:id="@+id/show_back_btn" android:layout_width="40.0dip" android:drawableTop="@drawable/btn_back_selector" android:background="@drawable/bottom_back_bg"
- android:layout_height="40.0dip" android:layout_alignParentLeft="true"/>
- <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="70.0dip">
- <include android:id="@+id/weibo_detail_bottom_bar" layout="@layout/weibodetail_bottombar_3"/>
- </LinearLayout>
- <Button android:id="@+id/show_tohome_btn" android:layout_width="40.0dip"
- android:layout_height="40.0dip" android:drawableTop="@drawable/btn_home_selector" android:background="@drawable/bottom_home_bg" android:layout_alignParentRight="true"/>
- </RelativeLayout>
- </RelativeLayout>
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout android:id="@+id/widget28" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ffffffff" xmlns:android="http://schemas.android.com/apk/res/android"> <RelativeLayout android:id="@+id/show_top" android:paddingTop="5.0dip" android:layout_width="fill_parent" android:layout_height="60.0dip" android:background="#c7cbd6" android:layout_alignParentTop="true" android:layout_centerHorizontal="true"> <ImageView android:id="@+id/show_headicon" android:layout_marginLeft="8.0dip" android:layout_width="45.0dip" android:layout_height="45.0dip" android:layout_alignParentLeft="true"/> <TextView android:id="@+id/show_nick" android:layout_marginLeft="5.0dip" android:layout_width="wrap_content" android:layout_toRightOf="@id/show_headicon" android:textColor="#384050" android:layout_height="wrap_content"/> <TextView android:id="@+id/show_email" android:layout_width="wrap_content" android:layout_marginLeft="10.0dip" android:layout_toRightOf="@id/show_headicon" android:textColor="#687888" android:layout_height="wrap_content" android:layout_below="@id/show_nick"/> <Button android:id="@+id/to_userinfo_btn" android:layout_width="wrap_content" android:background="@drawable/arrow_more_info_selector" android:layout_height="wrap_content" android:layout_alignParentRight="true"/> </RelativeLayout> <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@id/show_top" android:paddingTop="5.0dip"> <TextView android:id="@+id/show_origtext" android:layout_width="fill_parent" android:layout_marginLeft="5.0dip" android:textSize="16.0sp" android:textColor="#707878" android:layout_height="wrap_content"/> <ImageView android:id="@+id/show_image" android:visibility="gone" android:layout_centerInParent="true" android:layout_below="@id/show_origtext" android:layout_width="fill_parent" android:layout_height="120.0dip"/> <TextView android:id="@+id/show_count_mcount" android:layout_below="@id/show_image" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="18.0sp" android:textColor="#1d5884"/> <TextView android:id="@+id/show_time" android:layout_width="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginTop="10.0dip" android:textSize="12.0sp" android:layout_height="wrap_content" android:layout_below="@id/show_count_mcount"/> <TextView android:id="@+id/show_from" android:layout_width="wrap_content" android:layout_marginLeft="3.0dip" android:layout_marginTop="10.0dip" android:textSize="12.0sp" android:layout_height="wrap_content" android:layout_below="@id/show_count_mcount" android:layout_toRightOf="@id/show_time"/> <Button android:id="@+id/show_star_btn" android:layout_width="wrap_content" android:layout_marginRight="5.0dip" android:layout_marginTop="10.0dip" android:layout_height="wrap_content" android:background="@drawable/btn_fav" android:layout_below="@id/show_count_mcount" android:layout_alignParentRight="true"/> <ImageView android:id="@+id/show_delete" android:src="@drawable/delete" android:layout_width="wrap_content" android:layout_marginRight="3.0dip" android:layout_marginTop="10.0dip" android:visibility="invisible" android:layout_height="wrap_content" android:layout_below="@id/show_count_mcount" android:layout_toLeftOf="@id/show_star_btn"/> </RelativeLayout> <RelativeLayout android:layout_width="fill_parent" android:layout_height="40.0dip" android:layout_alignParentBottom="true"> <Button android:id="@+id/show_back_btn" android:layout_width="40.0dip" android:drawableTop="@drawable/btn_back_selector" android:background="@drawable/bottom_back_bg" android:layout_height="40.0dip" android:layout_alignParentLeft="true"/> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="70.0dip"> <include android:id="@+id/weibo_detail_bottom_bar" layout="@layout/weibodetail_bottombar_3"/> </LinearLayout> <Button android:id="@+id/show_tohome_btn" android:layout_width="40.0dip" android:layout_height="40.0dip" android:drawableTop="@drawable/btn_home_selector" android:background="@drawable/bottom_home_bg" android:layout_alignParentRight="true"/> </RelativeLayout> </RelativeLayout>
- <?xml version="1.0" encoding="UTF-8"?>
- <LinearLayout android:orientation="horizontal" android:id="@id/bottom_bar" android:layout_width="fill_parent" android:layout_height="fill_parent"
- xmlns:android="http://schemas.android.com/apk/res/android">
- <TextView android:textSize="16.0dip" android:text="转播" android:textColor="@color/bottom_button_text_selector" android:gravity="center" android:id="@+id/show_rebroad_btn" android:background="@drawable/bottom_3btn_l_selector" android:focusable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" />
- <TextView android:textSize="16.0dip" android:text="对话" android:textColor="@color/bottom_button_text_selector" android:gravity="center" android:id="@+id/show_dialog_btn" android:background="@drawable/bottom_3btn_m_selector" android:focusable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" />
- <TextView android:textSize="16.0dip" android:text="点评" android:textColor="@color/bottom_button_text_selector" android:gravity="center" android:id="@+id/show_remark_btn" android:background="@drawable/bottom_3btn_r_selector" android:focusable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" />
- </LinearLayout>
- http://helloandroid.iteye.com/blog/1136741
发表评论
-
Android客户端代码保护技术-完整性校验
2018-01-08 17:10 1240由于Android系统固有的缺陷、Android应用分发 ... -
android开发中手动v2签名实现方法
2018-01-08 10:31 991用v2签名前要进行v1签名或zipalign。 1. z ... -
webview支持LocalStorage本地存储
2017-03-31 10:30 1353//允许JavaScript执行 ... -
七步配置phonegap+cordova+ionic开发环境
2016-12-19 16:21 687本文讲的是Android混合 ... -
梆梆加固破解
2016-10-13 09:01 1488本文假设你已经使用过梆梆加固,手头至少有个一个通过梆梆加固后 ... -
android zxing 扫描二维码 横屏转竖屏
2016-09-14 15:41 0Zxing 竖屏切换 Android 在google上下 ... -
封装Volley使Volley的每个请求都自动保存和发送Cookie
2016-09-14 10:57 0思路很简单,每次请求获取到服务器返回的response就解 ... -
Android二维码ZXing扫描区域大小的调整,提高扫描速度
2016-09-14 10:48 2631Zxing本身默认的扫图区域最大只有 360*480 ... -
解决Android二维码扫描ZXing竖屏拉伸变长闪退扫描区域小等问题
2016-09-14 10:42 1215Android 基于google Zxing实现二维码、条形 ... -
Android平台下利用zxing实现二维码开发
2016-09-14 09:25 471现在走在大街小巷都能看到二维码,而且最近由于项目需要,所以研 ... -
Zxing扫描二维码
2016-09-14 09:24 649摘要 android Zxing扫描二维码 横竖屏 ... -
Android 基于google Zxing实现二维码、条形码扫描,仿微信二维码扫描效果
2016-09-14 09:18 493转载请注明出处:http://blog.csdn.net/x ... -
React Native应用部署/热更新-CodePush最新集成总结
2016-08-02 11:06 559本文出自《React Native学习笔记》系列文章。 ... -
让微信二维码扫描您的APK
2016-07-27 11:26 1486二维码深入人心,很多App都在官网挂出了可以扫描下载apk的 ... -
Activity类的runOnUiThread方法
2016-07-22 10:40 760[javascript] view plain c ... -
Can't create handler inside thread that has not called Looper.prepare()
2016-07-22 10:24 620错误信息:在Android开发中,如果在一个Thread中启 ... -
Android编程之解决android-support-v4打包问题
2016-07-21 09:27 542如果工程引入了android-support-v4的jar类 ... -
Android 编程下的代码混淆之(android-support-v4.jar)
2016-07-21 09:24 385项目在代码混淆过程中如果引用了第三方 Jar 包,需要在混淆 ... -
phoneGap可行性分析
2016-07-20 16:25 5081 移动应用现状 移动应用产品往往常 ... -
梆梆SDKs详细分析(1) - 防界面劫持SDK
2016-07-20 10:23 736前言 前段时间,国外知名的安全公司fireeye发 ...
相关推荐
腾讯人脸识别多版本接口文档,需要的下载,本文只负责转摘,不做商业用途,需要的可以下载,里面涵盖腾讯人脸的多个文档,这个是我之前做的腾讯人脸项目所用到的,腾讯官方只给到在线版的,我就自己弄了个PDF
Eclipse中用SWT和JFace开发入门-转摘 .doc
android 布局参数中文注释说明 两张图片截图,仅对linerlayout 及RelativeLayout参数说明! 网络转摘!仅供学习!
有很多的朋友给自己硬盘新建分区都喜欢用第三方软件,我想原因是在XP系统下只能在安装系统时才能进行分区,一旦系统做好之后要想新建分区就必须...本文转摘自『蓝派网』http://www.lan27.com/Article/201101/10965.htm
公司控制权之争及公司股权设计模式转摘.doc
一、开发环境:pb11.2 8669 二、pb的webservice程序必须置于英文目录下,含中文路径时部署会出错; 三、代码只要改一个地方: n_webservice对象的of_retrieve函数中 sqlca.logpass设置为你测试数据库的sa对应密码即可 四...
新零售时代,小卖家如何迅速做出销量(转摘).zip
完全平方公式变形的应用练习题_2(转摘).doc
新零售时代,小卖家如何迅速做出销量(转摘).doc
新零售时代,小卖家如何迅速做出销量(转摘)-知识杂货店.doc
华为从事通信网络技术与产品的研究、开发、生产与销售,是中国电信市场的主要供应商之一,并已成功进入全球电信市场。每年华为都要在各大高校招聘大批的应界生,特别是华中科技大学。 下面据说是华为公司的笔试题...
很多可能在转摘过程中失真或未经验证就被转摘,真正使用时却不行,也由此决定自己全方位试验一下,努力还是没有白费,虽然最终得出的结果是很简单的,但其过程对于一个新学AJAX的人来说,真是挺累。欢迎您在使用过程...
这个是我从网上找到的资料,现在共享给大家,希望能帮助到大家。
除非特别声明,原文版权归作者所有,如有转摘请注明原作者以及译者(FPGA技术网)信息。本译文会不断更新,要获得本译文的最新版本请查看本文的在线版本SystemVerilog 3.1a 语言参考手册。 由于时间及译者水平所限,...
在当今快速的开发环境中,应用程序的测试总是处于次要地位。DataFactory是一种强的的数据产生器,它允许开发人员和QA很容易产生百万行有意义的正确的测试数据库, DataFactory 首先读取一个数据库方案,用户随后点击...
转摘:Microsoft Office Access(前名 Microsoft Access)是由微软发布的关联式数据库管理系统。它结合了 Microsoft Jet Database Engine 和 图形用户界面两项特点,是 Microsoft Office的成员之一。 Access能够...
本文为转摘!!!!!!!!!!
本站声明:此文章来源于网络,如果未署名,可能因为此文被转摘多次,原作者不详。本站转载时稍作整理。如果原作者认为侵权,请联系我。我将在第一时间按其要求做出处理,并消除影响。
移动端开发(转摘jtyjty99999/mobileTech) ECMA-262,第 5 版 外链(即ES5) ECMAScript5.1中文版 外链(很详细教程) 前端技能汇总 外链(朴灵git) 在线预览word文档 颜色互转 MIME 类型 常用算法 async和defer...
说明:本书籍转摘自互联网,为广大ASP.NET爱好者提供更好的资源。