package com.weikou.beibeivideo.ui.discover;
|
|
import android.os.Build;
|
import android.os.Bundle;
|
import android.view.View;
|
import android.view.Window;
|
import android.view.WindowManager;
|
import android.widget.LinearLayout;
|
import android.widget.TextView;
|
|
import com.weikou.beibeivideo.ui.BaseActivity;
|
import com.yeshi.buwanshequ.R;
|
|
/**
|
* Created by weikou2015 on 2017/1/3.
|
*/
|
|
public class ReleaseGoodsActivity extends BaseActivity implements View.OnClickListener {
|
TextView tv_top_left;
|
TextView tv_top_middle;
|
|
@Override
|
protected void onCreate(Bundle arg0) {
|
super.onCreate(arg0);
|
setContentView(R.layout.activity_release_goods);
|
/*
|
* 计算状态栏高度并设置
|
*/
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
Window window = getWindow();
|
window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,
|
WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
int result = 0;
|
int resourceId = getResources().getIdentifier("status_bar_height",
|
"dimen", "android");
|
if (resourceId > 0) {
|
result = getResources().getDimensionPixelSize(resourceId);
|
}
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
|
result);
|
findViewById(R.id.v_status_bar).setLayoutParams(params);
|
} else {
|
findViewById(R.id.v_status_bar).setVisibility(View.GONE);
|
}
|
tv_top_left = (TextView) findViewById(R.id.tv_top_bar_left);
|
tv_top_middle = (TextView) findViewById(R.id.tv_top_bar_middle);
|
tv_top_middle.setText("发布");
|
tv_top_left.setOnClickListener(this);
|
findViewById(R.id.tv_relsease_confirm).setOnClickListener(this);
|
}
|
|
@Override
|
public void onClick(View v) {
|
switch (v.getId()) {
|
case R.id.tv_top_bar_left:
|
finish();
|
break;
|
case R.id.tv_relsease_confirm:
|
uploadGoods();
|
break;
|
}
|
}
|
|
/**
|
* 上传商品信息
|
*/
|
private void uploadGoods() {
|
|
}
|
|
}
|