Example usage for android.view View VISIBLE

List of usage examples for android.view View VISIBLE

Introduction

In this page you can find the example usage for android.view View VISIBLE.

Prototype

int VISIBLE

To view the source code for android.view View VISIBLE.

Click Source Link

Document

This view is visible.

Usage

From source file:net.dewep.intranetepitech.ui.landing.LandingActivity.java

private void setConnectionInProgress() {
    this.setMessageState(Q.getString(R.string.landing_connection_in_progress));
    mLandingConnectionError.setVisibility(View.GONE);
    mLandingConnectionProgressbar.setVisibility(View.VISIBLE);
    mPager.setCurrentItem(0, true);/*from ww  w.j  av a 2  s .co m*/
}

From source file:com.yasiradnan.Schedule.ScheduleMainActivity.java

public void updatePageButtons(int pageNumber) {
    if (pageNumber == 0)
        ibLeft.setVisibility(View.INVISIBLE);
    else/*from  w  w  w  . j a  va2s  . c  o m*/
        ibLeft.setVisibility(View.VISIBLE);

    if (pageNumber + 1 == totalPages)
        ibRight.setVisibility(View.INVISIBLE);
    else
        ibRight.setVisibility(View.VISIBLE);
}

From source file:com.app.jdy.ui.MyFaceActivity.java

public void initView() {
    Calendar now = Calendar.getInstance();
    Constants.SELECT_YEAR = now.get(Calendar.YEAR) + "";
    mBackImg = (ImageView) findViewById(R.id.back_img);
    mBackImg.setVisibility(View.VISIBLE);
    title = (TextView) findViewById(R.id.title_tv);
    title.setText("??");
    my_face_sum = (TextView) findViewById(R.id.my_face_sum);
    select_year_click = (TextView) findViewById(R.id.select_year_click);
    select_year = (TextView) findViewById(R.id.select_year);

    SharedPreferences userPreferences = getSharedPreferences("umeng_general_config", Context.MODE_PRIVATE);
    ID = userPreferences.getString("ID", "").trim();

    handler = new Handler() {
        public void handleMessage(Message msg) {
            switch (msg.what) {
            case 0:
                Toast.makeText(MyFaceActivity.this, Constants.NO_INTENT_TIPS, Toast.LENGTH_SHORT).show();
                break;
            case 1:
                try {
                    JSONArray jsonArray = new JSONArray(dataJson);
                    for (int i = 0; i < lineValues[0].length; i++) {
                        lineValues[0][i] = 0;
                    }/*www  .  j  a  v a 2  s  . c o  m*/
                    for (int i = 0; i < jsonArray.length(); i++) {
                        lineValues[0][jsonArray.getJSONObject(i).getInt("month")] = (float) jsonArray
                                .getJSONObject(i).getDouble("totol");
                    }
                } catch (JSONException e) {
                    e.printStackTrace();
                }
                my_face_sum.setText(getSumValue() + "");
                select_year.setText(Constants.SELECT_YEAR + "");
                getMaxValue();
                updateLineChart();
                break;
            case 2:
                for (int i = 0; i < lineValues[0].length; i++) {
                    lineValues[0][i] = 0;
                }
                LINE_MAX = 20;
                my_face_sum.setText("0");
                select_year.setText(Constants.SELECT_YEAR + "");
                updateLineChart();
                Toast.makeText(MyFaceActivity.this, "?",
                        Toast.LENGTH_SHORT).show();
                break;

            default:
                break;
            }
        }
    };
}

From source file:fr.bde_eseo.eseomega.plans.PlansActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_room_list);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);

    // UI/*ww  w .java 2s .  com*/
    swipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.plans_refresh);
    swipeRefreshLayout.setColorSchemeColors(R.color.md_blue_800);
    progCircle = (ProgressBar) findViewById(R.id.progressPlans);
    tv1 = (TextView) findViewById(R.id.tvListNothing);
    tv2 = (TextView) findViewById(R.id.tvListNothing2);
    imgA = (ImageView) findViewById(R.id.imgNoPlans_A);
    imgB = (ImageView) findViewById(R.id.imgNoPlans_B);
    progCircle.setVisibility(View.GONE);
    progCircle.getIndeterminateDrawable().setColorFilter(getResources().getColor(R.color.md_grey_500),
            PorterDuff.Mode.SRC_IN);
    tv1.setVisibility(View.GONE);
    tv2.setVisibility(View.GONE);
    imgA.setVisibility(View.GONE);
    imgB.setVisibility(View.GONE);
    disabler = new RecyclerViewDisabler();

    // I/O cache data
    cachePath = getCacheDir() + "/";
    cacheFileEseo = new File(cachePath + "salles.json");

    // Model / objects
    roomItems = new ArrayList<>();
    roomItemsDisplay = new ArrayList<>();
    mAdapter = new MyRoomAdapter(this, roomItemsDisplay);
    recList = (RecyclerView) findViewById(R.id.recyList);
    recList.setAdapter(mAdapter);
    recList.setHasFixedSize(true);
    recList.setVisibility(View.VISIBLE);

    LinearLayoutManager llm = new LinearLayoutManager(this);
    llm.setOrientation(LinearLayoutManager.VERTICAL);
    recList.setLayoutManager(llm);

    //recList.setLayoutManager(llm);
    mAdapter.notifyDataSetChanged();

    // Start download of data
    AsyncJSON asyncJSON = new AsyncJSON(true); // circle needed for first call
    asyncJSON.execute(Constants.URL_JSON_PLANS);

    // Hidden trick
    imgA.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            imgA.setVisibility(View.INVISIBLE);
            imgB.setVisibility(View.VISIBLE);
        }
    });

    imgB.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            imgB.setVisibility(View.INVISIBLE);
            imgA.setVisibility(View.VISIBLE);
        }
    });

    // Swipe-to-refresh implementations
    timestamp = 0;
    swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
        @Override
        public void onRefresh() {
            //Toast.makeText(getActivity(), "Refreshing ...", Toast.LENGTH_SHORT).show();
            long t = System.currentTimeMillis() / 1000;
            if (t - timestamp > LATENCY_REFRESH) { // timestamp in seconds)
                timestamp = t;
                AsyncJSON asyncJSON = new AsyncJSON(false); // no circle here (already in SwipeLayout)
                asyncJSON.execute(Constants.URL_JSON_PLANS);
            } else {
                swipeRefreshLayout.setRefreshing(false);
            }
        }
    });
}

From source file:com.secupwn.aimsicd.ui.fragments.DeviceFragment.java

private void updateUI() {
    HighlightTextView content;//from  w  w  w  .  j  av a  2  s  .c o  m
    TableRow tr;
    if (mBound) {
        final AnimationManager ani = new AnimationManager();

        mAimsicdService.getCellTracker().refreshDevice();
        Device mDevice = mAimsicdService.getCellTracker().getDevice();
        switch (mDevice.getPhoneId()) {

        case TelephonyManager.PHONE_TYPE_NONE: // Maybe bad!
        case TelephonyManager.PHONE_TYPE_SIP: // Maybe bad!
        case TelephonyManager.PHONE_TYPE_GSM: {
            content = (HighlightTextView) getView().findViewById(R.id.network_lac);
            content.updateText(String.valueOf(mAimsicdService.getCell().getLocationAreaCode()), ani);
            tr = (TableRow) getView().findViewById(R.id.gsm_cellid);
            tr.setVisibility(View.VISIBLE);
            content = (HighlightTextView) getView().findViewById(R.id.network_cellid);
            content.updateText(String.valueOf(mAimsicdService.getCell().getCellId()), ani);
            break;
        }

        case TelephonyManager.PHONE_TYPE_CDMA: {
            tr = (TableRow) getView().findViewById(R.id.cdma_netid);
            tr.setVisibility(View.VISIBLE);
            content = (HighlightTextView) getView().findViewById(R.id.network_netid);
            content.updateText(String.valueOf(mAimsicdService.getCell().getLocationAreaCode()), ani);
            tr = (TableRow) getView().findViewById(R.id.cdma_sysid);
            tr.setVisibility(View.VISIBLE);
            content = (HighlightTextView) getView().findViewById(R.id.network_sysid);
            content.updateText(String.valueOf(mAimsicdService.getCell().getSid()), ani);
            tr = (TableRow) getView().findViewById(R.id.cdma_baseid);
            tr.setVisibility(View.VISIBLE);
            content = (HighlightTextView) getView().findViewById(R.id.network_baseid);
            content.updateText(String.valueOf(mAimsicdService.getCell().getCellId()), ani);
            break;
        }
        }

        if (mAimsicdService.getCell().getTimingAdvance() != Integer.MAX_VALUE) {
            tr = (TableRow) getView().findViewById(R.id.lte_timing_advance);
            tr.setVisibility(View.VISIBLE);
            content = (HighlightTextView) getView().findViewById(R.id.network_lte_timing_advance);
            content.updateText(String.valueOf(mAimsicdService.getCell().getTimingAdvance()), ani);
        } else {
            tr = (TableRow) getView().findViewById(R.id.lte_timing_advance);
            tr.setVisibility(View.GONE);
        }

        if (mAimsicdService.getCell().getPrimaryScramblingCode() != Integer.MAX_VALUE) {
            content = (HighlightTextView) getView().findViewById(R.id.network_psc);
            content.updateText(String.valueOf(mAimsicdService.getCell().getPrimaryScramblingCode()), ani);
            tr = (TableRow) getView().findViewById(R.id.primary_scrambling_code);
            tr.setVisibility(View.VISIBLE);
        }

        String notAvailable = getString(R.string.n_a);

        content = (HighlightTextView) getView().findViewById(R.id.sim_country);
        content.updateText(mDevice.getSimCountry().orElse(notAvailable), ani);
        content = (HighlightTextView) getView().findViewById(R.id.sim_operator_id);
        content.updateText(mDevice.getSimOperator().orElse(notAvailable), ani);
        content = (HighlightTextView) getView().findViewById(R.id.sim_operator_name);
        content.updateText(mDevice.getSimOperatorName().orElse(notAvailable), ani);
        content = (HighlightTextView) getView().findViewById(R.id.sim_imsi);
        content.updateText(mDevice.getSimSubs().orElse(notAvailable), ani);
        content = (HighlightTextView) getView().findViewById(R.id.sim_serial);
        content.updateText(mDevice.getSimSerial().orElse(notAvailable), ani);

        content = (HighlightTextView) getView().findViewById(R.id.device_type);
        content.updateText(mDevice.getPhoneType(), ani);
        content = (HighlightTextView) getView().findViewById(R.id.device_imei);
        content.updateText(mDevice.getIMEI(), ani);
        content = (HighlightTextView) getView().findViewById(R.id.device_version);
        content.updateText(mDevice.getIMEIv(), ani);
        content = (HighlightTextView) getView().findViewById(R.id.network_name);
        content.updateText(mDevice.getNetworkName(), ani);
        content = (HighlightTextView) getView().findViewById(R.id.network_code);
        content.updateText(mDevice.getMncMcc(), ani);
        content = (HighlightTextView) getView().findViewById(R.id.network_type);
        content.updateText(mDevice.getNetworkTypeName(), ani);

        content = (HighlightTextView) getView().findViewById(R.id.data_activity);
        content.updateText(mDevice.getDataActivityType(), ani);
        content = (HighlightTextView) getView().findViewById(R.id.data_status);
        content.updateText(mDevice.getDataState(), ani);
        content = (HighlightTextView) getView().findViewById(R.id.network_roaming);
        content.updateText(String.valueOf(mDevice.isRoaming()), ani);

        ani.startAnimation(5000);
    }
}

From source file:de.lebenshilfe_muenster.uk_gebaerden_muensterland.sign_trainer.SignTrainerActiveFragment.java

@Override
protected void handleClickOnSolveQuestionButton() {
    setVisibility(this.questionViews, View.GONE);
    setVisibility(this.answerViews, View.VISIBLE);
    try {/*from  ww w. j a v  a2  s.c o m*/
        setupVideoView(this.currentSign, SOUND.ON, CONTROLS.SHOW);
    } catch (VideoSetupException ex) {
        handleVideoCouldNotBeLoaded(ex);
    }
    setAnswerTextViews();
}

From source file:com.gammalabs.wifianalyzer.wifi.AccessPointDetail.java

private void setViewExtra(@NonNull Context context, @NonNull View view, @NonNull WiFiDetail wiFiDetail) {
    ImageView configuredImage = (ImageView) view.findViewById(R.id.configuredImage);
    WiFiAdditional wiFiAdditional = wiFiDetail.getWiFiAdditional();
    if (wiFiAdditional.isConfiguredNetwork()) {
        configuredImage.setVisibility(View.VISIBLE);
        configuredImage.setColorFilter(ContextCompat.getColor(context, R.color.connected));
    } else {/*from  w w w .  ja  va 2  s  . c  o m*/
        configuredImage.setVisibility(View.GONE);
    }

    WiFiSignal wiFiSignal = wiFiDetail.getWiFiSignal();
    Strength strength = wiFiSignal.getStrength();
    ImageView imageView = (ImageView) view.findViewById(R.id.levelImage);
    imageView.setImageResource(strength.imageResource());
    imageView.setColorFilter(ContextCompat.getColor(context, strength.colorResource()));

    ((TextView) view.findViewById(R.id.channel_frequency_range))
            .setText(wiFiSignal.getFrequencyStart() + " - " + wiFiSignal.getFrequencyEnd());
    ((TextView) view.findViewById(R.id.width))
            .setText("(" + wiFiSignal.getWiFiWidth().getFrequencyWidth() + WiFiSignal.FREQUENCY_UNITS + ")");
    ((TextView) view.findViewById(R.id.capabilities)).setText(wiFiDetail.getCapabilities());
}

From source file:com.pentacog.mctracker.ServerListAdapter.java

@Override
public View getView(int position, View convertView, ViewGroup parent) {

    RelativeLayout serverView = null;//from  ww w  .ja  v a2 s .c o m
    ServerViewHolder holder = null;
    Server server = serverList.get(position);
    server.id = position;
    if (convertView == null) {
        serverView = (RelativeLayout) LayoutInflater.from(parent.getContext()).inflate(R.layout.list_item,
                parent, false);
        holder = new ServerViewHolder((int) getItemId(position), serverView);
        serverView.setTag(holder);
    } else {
        serverView = (RelativeLayout) convertView;
        holder = (ServerViewHolder) serverView.getTag();
        holder.id = (int) getItemId(position);
    }

    //set server name
    holder.serverTitle.setText(server.name);
    //set server IP
    String serverName = server.address.toString();
    if (!serverName.startsWith("/")) {
        int index = serverName.lastIndexOf('/');
        if (index != -1) {
            String tempString;
            tempString = serverName.substring(index + 1);
            serverName = serverName.substring(0, index);
            serverName += " " + tempString;
        }
    } else {
        serverName = serverName.replace("/", "");
    }
    if (server.port != 25565)
        serverName += ":" + server.port;
    holder.serverIp.setText(serverName);

    //set fav icon
    if (server.favorite) {
        holder.favStar.setVisibility(View.VISIBLE);
    } else {
        holder.favStar.setVisibility(View.INVISIBLE);
    }

    if (!server.queried) {
        AlphaAnimation a = new AlphaAnimation(1.0f, 0.2f);
        a.setRepeatCount(Animation.INFINITE);
        a.setRepeatMode(Animation.REVERSE);
        a.setDuration(300);
        holder.statusBar.setBackgroundColor(Color.BLUE);
        holder.statusBar.startAnimation(a);

        //         holder.loading.setVisibility(View.VISIBLE);
        holder.playerCount.setText("" + server.playerCount + "/" + server.maxPlayers);
        holder.serverData.setText(R.string.loading);
        holder.playerCount.setVisibility(View.INVISIBLE);
        holder.ping.setVisibility(View.INVISIBLE);
        new ServerViewUpdater(serverView, server);
    } else {
        setupServerCell(server, holder);
    }

    return serverView;
}

From source file:com.app.jdy.ui.FaceValueActivity.java

public void initView() {
    mBackImg = (ImageView) findViewById(R.id.back_img);
    mBackImg.setVisibility(View.VISIBLE);
    title = (TextView) findViewById(R.id.title_tv);
    title.setText("?");

    SharedPreferences userPreferences = getSharedPreferences("umeng_general_config", Context.MODE_PRIVATE);
    ID = userPreferences.getString("ID", "").trim();

    face_value_list = (ListView) findViewById(R.id.face_value_list);
    face_vale_sum = (TextView) findViewById(R.id.face_vale_sum);
    face_vale_sum_yuan = (TextView) findViewById(R.id.face_vale_sum_yuan);

}