当前位置: 首页>>代码示例>>Java>>正文


Java TextView.getVisibility方法代码示例

本文整理汇总了Java中android.widget.TextView.getVisibility方法的典型用法代码示例。如果您正苦于以下问题:Java TextView.getVisibility方法的具体用法?Java TextView.getVisibility怎么用?Java TextView.getVisibility使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.widget.TextView的用法示例。


在下文中一共展示了TextView.getVisibility方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ant

import android.widget.TextView; //导入方法依赖的package包/类
public void ant(View view) {

        TextView texto1 = (TextView) findViewById(R.id.texto1);
        TextView texto2 = (TextView) findViewById(R.id.texto2);
        TextView texto3 = (TextView) findViewById(R.id.texto3);

        if (texto3.getVisibility() == View.VISIBLE) {
            findViewById(R.id.texto3).setVisibility(View.GONE);
            findViewById(R.id.texto2).setVisibility(View.VISIBLE);
        } else if (texto2.getVisibility() == View.VISIBLE) {
            findViewById(R.id.texto2).setVisibility(View.GONE);
            findViewById(R.id.texto1).setVisibility(View.VISIBLE);
            findViewById(R.id.ant).setVisibility(View.GONE);
            findViewById(R.id.prox).setVisibility(View.VISIBLE);

        }
    }
 
开发者ID:jvbeltra,项目名称:JavaIsFun,代码行数:18,代码来源:Classe.java

示例2: avancarTxt

import android.widget.TextView; //导入方法依赖的package包/类
public void avancarTxt(View view) {
    ImageView imageView44 = (ImageView) findViewById(R.id.imageView44);
    TextView exp2 = (TextView) findViewById(R.id.exp2);
    if(imageView44.getVisibility()==View.VISIBLE) {
        findViewById(R.id.voltar).setVisibility(View.VISIBLE);
        findViewById(R.id.proximo).setVisibility(View.GONE);
        findViewById(R.id.exp2).setVisibility(View.VISIBLE);
        findViewById(R.id.avancar).setVisibility(View.VISIBLE);
        findViewById(R.id.imageView44).setVisibility(View.GONE);
    }else
    if (exp2.getVisibility() == View.VISIBLE) {
        findViewById(R.id.voltar).setVisibility(View.VISIBLE);
        findViewById(R.id.proximo).setVisibility(View.VISIBLE);
        findViewById(R.id.exp3).setVisibility(View.VISIBLE);
        findViewById(R.id.exp2).setVisibility(View.GONE);
        findViewById(R.id.avancar).setVisibility(View.GONE);
        findViewById(R.id.imageView44).setVisibility(View.GONE);


    }
}
 
开发者ID:jvbeltra,项目名称:JavaIsFun,代码行数:22,代码来源:Condicao7.java

示例3: showDescriptionLine

import android.widget.TextView; //导入方法依赖的package包/类
/**
 * Sets a description line for the omnibox suggestion.
 *
 * @param str The description text.
 * @param isUrl Whether this text is a URL (as opposed to a normal string).
 */
private void showDescriptionLine(Spannable str, boolean isUrl) {
    TextView textLine = mContentsView.mTextLine2;
    if (textLine.getVisibility() != VISIBLE) {
        textLine.setVisibility(VISIBLE);
    }
    textLine.setText(str, BufferType.SPANNABLE);

    // Force left-to-right rendering for URLs. See UrlBar constructor for details.
    if (isUrl) {
        textLine.setTextColor(URL_COLOR);
        ApiCompatibilityUtils.setTextDirection(textLine, TEXT_DIRECTION_LTR);
    } else {
        textLine.setTextColor(getStandardFontColor());
        ApiCompatibilityUtils.setTextDirection(textLine, TEXT_DIRECTION_INHERIT);
    }
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:23,代码来源:SuggestionView.java

示例4: prox

import android.widget.TextView; //导入方法依赖的package包/类
public void prox(View view) {
    TextView texto1 = (TextView) findViewById(R.id.texto1);
    TextView texto2 = (TextView) findViewById(R.id.texto2);
    TextView texto3 = (TextView) findViewById(R.id.texto3);

    if (texto1.getVisibility() == View.VISIBLE) {
        findViewById(R.id.texto1).setVisibility(View.GONE);
        findViewById(R.id.texto2).setVisibility(View.VISIBLE);
        findViewById(R.id.ant).setVisibility(View.VISIBLE);
    } else if (texto2.getVisibility() == View.VISIBLE) {
        findViewById(R.id.texto2).setVisibility(View.GONE);
        findViewById(R.id.texto3).setVisibility(View.VISIBLE);
        findViewById(R.id.imageButton46).setVisibility(View.VISIBLE);
        findViewById(R.id.prox).setVisibility(View.GONE);
    }
}
 
开发者ID:jvbeltra,项目名称:JavaIsFun,代码行数:17,代码来源:Classe.java

示例5: voltarTxt

import android.widget.TextView; //导入方法依赖的package包/类
public void voltarTxt(View view) {
    findViewById(R.id.voltar).setVisibility(View.GONE);
    findViewById(R.id.avancar).setVisibility(View.VISIBLE);
    findViewById(R.id.imageView44).setVisibility(View.VISIBLE);
    TextView exp3 = (TextView) findViewById(R.id.exp3);
    if (exp3.getVisibility() == View.VISIBLE) {
        findViewById(R.id.voltar).setVisibility(View.VISIBLE);
        findViewById(R.id.proximo).setVisibility(View.VISIBLE);
        findViewById(R.id.exp3).setVisibility(View.GONE);
        findViewById(R.id.exp2).setVisibility(View.VISIBLE);
        findViewById(R.id.avancar).setVisibility(View.VISIBLE);
        findViewById(R.id.imageView44).setVisibility(View.GONE);


    }
}
 
开发者ID:jvbeltra,项目名称:JavaIsFun,代码行数:17,代码来源:Condicao7.java

示例6: prox

import android.widget.TextView; //导入方法依赖的package包/类
public void prox(View view) {
    ImageView imageViewtop = (ImageView) findViewById(R.id.corretoerrado);
    ImageView classpeixe = (ImageView) findViewById(R.id.classpeixe);
    ImageView classcachorro = (ImageView) findViewById(R.id.classcachorro);
    ImageView classgato = (ImageView) findViewById(R.id.classgato);
    ImageView classabelha = (ImageView) findViewById(R.id.classabelha);
    TextView erradoabelha = (TextView) findViewById(R.id.erradoAbelha);
    TextView erradocachorro = (TextView) findViewById(R.id.erradoCachorro);
    TextView erradogato = (TextView) findViewById(R.id.erradoGato);
    imageViewtop.setVisibility(View.GONE);
    if (classabelha.getVisibility() == View.VISIBLE || erradoabelha.getVisibility() == View.VISIBLE) {
        findViewById(R.id.classabelha).setVisibility(View.GONE);
        findViewById(R.id.classgato).setVisibility(View.VISIBLE);
        findViewById(R.id.antP).setVisibility(View.VISIBLE);
        findViewById(R.id.erradoAbelha).setVisibility(View.GONE);
        imageViewtop.setVisibility(View.GONE);
    } else if (classgato.getVisibility() == View.VISIBLE || erradogato.getVisibility() == View.VISIBLE) {
        findViewById(R.id.classgato).setVisibility(View.GONE);
        findViewById(R.id.classcachorro).setVisibility(View.VISIBLE);
        findViewById(R.id.antP).setVisibility(View.VISIBLE);
        findViewById(R.id.erradoGato).setVisibility(View.GONE);
        imageViewtop.setVisibility(View.GONE);
    } else if (classcachorro.getVisibility() == View.VISIBLE || erradocachorro.getVisibility() == View.VISIBLE) {
        findViewById(R.id.classcachorro).setVisibility(View.GONE);
        findViewById(R.id.classpeixe).setVisibility(View.VISIBLE);
        findViewById(R.id.proxP).setVisibility(View.GONE);
        findViewById(R.id.antP).setVisibility(View.VISIBLE);
        findViewById(R.id.erradoCachorro).setVisibility(View.GONE);
        imageViewtop.setVisibility(View.GONE);
    }
}
 
开发者ID:jvbeltra,项目名称:JavaIsFun,代码行数:32,代码来源:Classe4.java

示例7: getLabelVisibility

import android.widget.TextView; //导入方法依赖的package包/类
public int getLabelVisibility() {
    TextView labelView = getLabelView();
    if (labelView != null) {
        return labelView.getVisibility();
    }

    return -1;
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:9,代码来源:FloatingActionButton.java

示例8: onSearchViewQueryChange

import android.widget.TextView; //导入方法依赖的package包/类
private void onSearchViewQueryChange(final String query, final ImageButton navigateBack,
                               final TextView results) {
    final boolean isDarkThemeSelected = ThemeUtils.isDarkThemeSelected(this);
    final Drawable drawable;

    if (!TextUtils.isEmpty(query)) {
        if (isDarkThemeSelected) {
            drawable = getDrawable(R.drawable.ic_clear_white_24dp);
        } else {
            drawable = getDrawable(R.drawable.ic_clear_black_24dp);
        }
    } else {
        if (results.getVisibility() != View.INVISIBLE) {
            results.setVisibility(View.INVISIBLE);
        }

        if (isDarkThemeSelected) {
            drawable = getDrawable(R.drawable.ic_arrow_back_white_24dp);
        } else {
            drawable = getDrawable(R.drawable.ic_arrow_back_black_24dp);
        }
    }

    if (navigateBack.getDrawable() != drawable) {
        navigateBack.setImageDrawable(drawable);
    }

    if (mSearchResultsCursor != null && !mSearchResultsCursor.isEmpty()) {
        resetCardViewBackground(mSearchResultsCursor.getAll(), List.class);
        mSearchResultsCursor = null;
    }
}
 
开发者ID:Applications-Development,项目名称:SimpleRssReader,代码行数:33,代码来源:MainActivity.java

示例9: showSearchViewCursorPosition

import android.widget.TextView; //导入方法依赖的package包/类
private void showSearchViewCursorPosition(final TextView results) {
    if (mSearchResultsCursor != null) {
        final String currentPosition = mSearchResultsCursor.toString();

        if (!TextUtils.isEmpty(currentPosition)) {
            if (results.getVisibility() != View.VISIBLE) {
                results.setVisibility(View.VISIBLE);
            }
            results.setText(currentPosition);
        }
    }
}
 
开发者ID:Applications-Development,项目名称:SimpleRssReader,代码行数:13,代码来源:MainActivity.java

示例10: setTextView

import android.widget.TextView; //导入方法依赖的package包/类
private void setTextView(TextView textView, String value) {
    if(textView == null || TextUtils.isEmpty(value)) {
        return;
    }
    if(textView.getVisibility() != View.VISIBLE) {
        textView.setVisibility(View.VISIBLE);
    }
    textView.setText(value);
}
 
开发者ID:newDeepLearing,项目名称:decoy,代码行数:10,代码来源:SettingsAdapter.java

示例11: ant

import android.widget.TextView; //导入方法依赖的package包/类
public void ant(View view) {
    ImageView imageViewtop = (ImageView) findViewById(R.id.corretoerrado);

    TextView textocorreto = (TextView) findViewById(R.id.textCorreto);
    TextView erradocachorro = (TextView) findViewById(R.id.erradoCachorro);
    TextView erradogato = (TextView) findViewById(R.id.erradoGato);
    ImageView classpeixe = (ImageView) findViewById(R.id.classpeixe);
    ImageView classcachorro = (ImageView) findViewById(R.id.classcachorro);
    ImageView classgato = (ImageView) findViewById(R.id.classgato);
    ImageView classabelha = (ImageView) findViewById(R.id.classabelha);


    if (classgato.getVisibility() == View.VISIBLE || erradogato.getVisibility() == View.VISIBLE) {
        findViewById(R.id.classgato).setVisibility(View.GONE);
        findViewById(R.id.classabelha).setVisibility(View.VISIBLE);
        findViewById(R.id.antP).setVisibility(View.GONE);
        findViewById(R.id.proxP).setVisibility(View.VISIBLE);
        findViewById(R.id.erradoGato).setVisibility(View.GONE);
        findViewById(R.id.erradoCachorro).setVisibility(View.GONE);
        findViewById(R.id.textCorreto).setVisibility(View.GONE);
        findViewById(R.id.erradoAbelha).setVisibility(View.GONE);
        imageViewtop.setVisibility(View.GONE);
    } else if (classcachorro.getVisibility() == View.VISIBLE || erradocachorro.getVisibility() == View.VISIBLE) {
        findViewById(R.id.classcachorro).setVisibility(View.GONE);
        findViewById(R.id.classgato).setVisibility(View.VISIBLE);
        findViewById(R.id.proxP).setVisibility(View.VISIBLE);
        findViewById(R.id.erradoGato).setVisibility(View.GONE);
        findViewById(R.id.erradoCachorro).setVisibility(View.GONE);
        findViewById(R.id.textCorreto).setVisibility(View.GONE);
        findViewById(R.id.erradoAbelha).setVisibility(View.GONE);
        imageViewtop.setVisibility(View.GONE);
    } else if (classpeixe.getVisibility() == View.VISIBLE || textocorreto.getVisibility() == View.VISIBLE) {
        findViewById(R.id.classpeixe).setVisibility(View.GONE);
        findViewById(R.id.classcachorro).setVisibility(View.VISIBLE);
        findViewById(R.id.proxP).setVisibility(View.VISIBLE);
        findViewById(R.id.erradoGato).setVisibility(View.GONE);
        findViewById(R.id.erradoCachorro).setVisibility(View.GONE);
        findViewById(R.id.textCorreto).setVisibility(View.GONE);
        findViewById(R.id.erradoAbelha).setVisibility(View.GONE);
        imageViewtop.setVisibility(View.GONE);

    }

}
 
开发者ID:jvbeltra,项目名称:JavaIsFun,代码行数:45,代码来源:Classe4.java

示例12: prox

import android.widget.TextView; //导入方法依赖的package包/类
public void prox(View view) {
    TextView texto1 = (TextView) findViewById(R.id.texto1);
    TextView texto2 = (TextView) findViewById(R.id.texto2);
    TextView texto3 = (TextView) findViewById(R.id.texto3);
    TextView texto4 = (TextView) findViewById(R.id.texto4);
    TextView texto5 = (TextView) findViewById(R.id.texto5);
    TextView texto6 = (TextView) findViewById(R.id.texto6);
    TextView texto7 = (TextView) findViewById(R.id.texto7);

    if (texto1.getVisibility() == View.VISIBLE) {
        findViewById(R.id.texto1).setVisibility(View.GONE);
        findViewById(R.id.texto2).setVisibility(View.VISIBLE);
        findViewById(R.id.ant).setVisibility(View.VISIBLE);
    } else if (texto2.getVisibility() == View.VISIBLE) {
        findViewById(R.id.texto2).setVisibility(View.GONE);
        findViewById(R.id.texto3).setVisibility(View.VISIBLE);
    } else if (texto3.getVisibility() == View.VISIBLE) {
        findViewById(R.id.texto3).setVisibility(View.GONE);
        findViewById(R.id.texto4).setVisibility(View.VISIBLE);
    } else if (texto4.getVisibility() == View.VISIBLE) {
        findViewById(R.id.texto4).setVisibility(View.GONE);
        findViewById(R.id.texto5).setVisibility(View.VISIBLE);
    } else if (texto5.getVisibility() == View.VISIBLE) {
        findViewById(R.id.texto5).setVisibility(View.GONE);
        findViewById(R.id.texto6).setVisibility(View.VISIBLE);
    }else if (texto6.getVisibility() == View.VISIBLE) {
        findViewById(R.id.texto6).setVisibility(View.GONE);
        findViewById(R.id.texto7).setVisibility(View.VISIBLE);
        findViewById(R.id.prox).setVisibility(View.GONE);
    }
}
 
开发者ID:jvbeltra,项目名称:JavaIsFun,代码行数:32,代码来源:Classe2.java

示例13: ant

import android.widget.TextView; //导入方法依赖的package包/类
public void ant(View view) {

        TextView texto1 = (TextView) findViewById(R.id.texto1);
        TextView texto2 = (TextView) findViewById(R.id.texto2);
        TextView texto3 = (TextView) findViewById(R.id.texto3);
        TextView texto4 = (TextView) findViewById(R.id.texto4);
        TextView texto5 = (TextView) findViewById(R.id.texto5);
        TextView texto6 = (TextView) findViewById(R.id.texto6);
        TextView texto7 = (TextView) findViewById(R.id.texto7);

        if (texto2.getVisibility() == View.VISIBLE) {
            findViewById(R.id.texto2).setVisibility(View.GONE);
            findViewById(R.id.texto1).setVisibility(View.VISIBLE);
            findViewById(R.id.ant).setVisibility(View.GONE);
            findViewById(R.id.prox).setVisibility(View.VISIBLE);
        } else if (texto3.getVisibility() == View.VISIBLE) {
            findViewById(R.id.texto3).setVisibility(View.GONE);
            findViewById(R.id.texto2).setVisibility(View.VISIBLE);
        } else if (texto4.getVisibility() == View.VISIBLE) {
            findViewById(R.id.texto4).setVisibility(View.GONE);
            findViewById(R.id.texto3).setVisibility(View.VISIBLE);
        } else if (texto5.getVisibility() == View.VISIBLE) {
            findViewById(R.id.texto5).setVisibility(View.GONE);
            findViewById(R.id.texto4).setVisibility(View.VISIBLE);
        } else if (texto6.getVisibility() == View.VISIBLE) {
            findViewById(R.id.texto6).setVisibility(View.GONE);
            findViewById(R.id.texto5).setVisibility(View.VISIBLE);
            findViewById(R.id.prox).setVisibility(View.GONE);
        } else if (texto7.getVisibility() == View.VISIBLE) {
            findViewById(R.id.texto7).setVisibility(View.GONE);
            findViewById(R.id.texto6).setVisibility(View.VISIBLE);
        }
    }
 
开发者ID:jvbeltra,项目名称:JavaIsFun,代码行数:34,代码来源:Classe2.java

示例14: handleMessage

import android.widget.TextView; //导入方法依赖的package包/类
@Override
public void handleMessage(Message msg) {
    ContinuousCaptureActivity activity = mWeakActivity.get();
    if (activity == null) {
        Log.d(TAG, "Got message for dead activity");
        return;
    }

    switch (msg.what) {
        case MSG_BLINK_TEXT: {
            TextView tv = (TextView) activity.findViewById(R.id.recording_text);

            // Attempting to make it blink by using setEnabled() doesn't work --
            // it just changes the color.  We want to change the visibility.
            int visibility = tv.getVisibility();
            if (visibility == View.VISIBLE) {
                visibility = View.INVISIBLE;
            } else {
                visibility = View.VISIBLE;
            }
            tv.setVisibility(visibility);

            int delay = (visibility == View.VISIBLE) ? 1000 : 200;
            sendEmptyMessageDelayed(MSG_BLINK_TEXT, delay);
            break;
        }
        case MSG_FRAME_AVAILABLE: {
            activity.drawFrame();
            break;
        }
        case MSG_FILE_SAVE_COMPLETE: {
            activity.fileSaveComplete(msg.arg1);
            break;
        }
        case MSG_BUFFER_STATUS: {
            long duration = (((long) msg.arg1) << 32) |
                            (((long) msg.arg2) & 0xffffffffL);
            activity.updateBufferStatus(duration);
            break;
        }
        default:
            throw new RuntimeException("Unknown message " + msg.what);
    }
}
 
开发者ID:AndyZhu1991,项目名称:grafika,代码行数:45,代码来源:ContinuousCaptureActivity.java


注:本文中的android.widget.TextView.getVisibility方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。