Search in sources :

Example 61 with RelativeLayout

use of android.widget.RelativeLayout in project talk-android by nextcloud.

the class CallActivity method removeMediaStream.

private void removeMediaStream(String sessionId) {
    if (remoteRenderersLayout.getChildCount() > 0) {
        RelativeLayout relativeLayout = remoteRenderersLayout.findViewWithTag(sessionId);
        if (relativeLayout != null) {
            SurfaceViewRenderer surfaceViewRenderer = relativeLayout.findViewById(R.id.surface_view);
            surfaceViewRenderer.release();
            remoteRenderersLayout.removeView(relativeLayout);
            remoteRenderersLayout.invalidate();
        }
    }
    callControls.setZ(100.0f);
}
Also used : SurfaceViewRenderer(org.webrtc.SurfaceViewRenderer) RelativeLayout(android.widget.RelativeLayout)

Example 62 with RelativeLayout

use of android.widget.RelativeLayout in project talk-android by nextcloud.

the class CallActivity method gotNick.

private void gotNick(String sessionId, String nick) {
    RelativeLayout relativeLayout = remoteRenderersLayout.findViewWithTag(sessionId);
    if (relativeLayout != null) {
        TextView textView = relativeLayout.findViewById(R.id.peer_nick_text_view);
        textView.setText(nick);
    }
}
Also used : RelativeLayout(android.widget.RelativeLayout) TextView(android.widget.TextView)

Example 63 with RelativeLayout

use of android.widget.RelativeLayout in project pictureapp by EyeSeeTea.

the class LoginActivity method initProgressBar.

private void initProgressBar() {
    bar = (CircularProgressBar) findViewById(R.id.progress_bar_circular);
    float progressBarStrokeWidth = getResources().getDimensionPixelSize(R.dimen.progressbar_stroke_width);
    bar.setIndeterminateDrawable(new CircularProgressDrawable.Builder(this).color(ContextCompat.getColor(this, R.color.color_primary_default)).style(CircularProgressDrawable.STYLE_ROUNDED).strokeWidth(progressBarStrokeWidth).rotationSpeed(1f).sweepSpeed(1f).build());
    onPostAnimationListener = new OnPostAnimationListener();
    /* adding transition animations to root layout */
    if (isGreaterThanOrJellyBean()) {
        layoutTransition = new LayoutTransition();
        layoutTransition.enableTransitionType(LayoutTransition.CHANGING);
        layoutTransition.addTransitionListener(onPostAnimationListener);
        RelativeLayout loginLayoutContent = (RelativeLayout) findViewById(org.hisp.dhis.client.sdk.ui.R.id.layout_content);
        loginLayoutContent.setLayoutTransition(layoutTransition);
    } else {
        layoutTransitionSlideIn = AnimationUtils.loadAnimation(this, org.hisp.dhis.client.sdk.ui.R.anim.in_up);
        layoutTransitionSlideOut = AnimationUtils.loadAnimation(this, org.hisp.dhis.client.sdk.ui.R.anim.out_down);
        layoutTransitionSlideIn.setAnimationListener(onPostAnimationListener);
        layoutTransitionSlideOut.setAnimationListener(onPostAnimationListener);
    }
}
Also used : CircularProgressDrawable(fr.castorflex.android.circularprogressbar.CircularProgressDrawable) RelativeLayout(android.widget.RelativeLayout) LayoutTransition(android.animation.LayoutTransition)

Example 64 with RelativeLayout

use of android.widget.RelativeLayout in project AndroidStudy by tinggengyan.

the class MyPopupMenu method divisionTran.

/**
 * 分界线布局中的textView跟随选中标题移动位置的,设置为动画效果
 */
public void divisionTran(int position) {
    /**
     * 先移除了RelativeLayout中原有的textView
     */
    divisionLayout.removeAllViews();
    /**
     * 重新设置textView布局属性 动态改变控件位置 第一步
     */
    RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(screenWidth / 3, LayoutParams.MATCH_PARENT);
    /**
     * 设置动画效果
     */
    Animation translateTextView;
    translateTextView = new TranslateAnimation((preIndex - currentIndex) * screenWidth / 3, 0, 0, 0);
    /**
     * 根据选中的标题确定布局 动态改变控件位置 第二步
     */
    if (position == 0) {
        lp.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
    } else if (position == 1) {
        lp.addRule(RelativeLayout.CENTER_HORIZONTAL, RelativeLayout.TRUE);
    } else {
        lp.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, RelativeLayout.TRUE);
    }
    /**
     * 动态改变控件位置 第三步
     */
    TextView line = new TextView(context);
    line.setBackgroundColor(Color.WHITE);
    divisionLayout.addView(line, lp);
    /**
     * 设置动画执行时间
     */
    translateTextView.setDuration(200);
    /**
     * 启动动画
     */
    line.startAnimation(translateTextView);
}
Also used : LayoutParams(android.view.ViewGroup.LayoutParams) RelativeLayout(android.widget.RelativeLayout) TranslateAnimation(android.view.animation.TranslateAnimation) Animation(android.view.animation.Animation) TranslateAnimation(android.view.animation.TranslateAnimation) TextView(android.widget.TextView)

Example 65 with RelativeLayout

use of android.widget.RelativeLayout in project android_packages_apps_Gallery2 by LineageOS.

the class AlbumSetPage method setupCameraButton.

private boolean setupCameraButton() {
    if (!GalleryUtils.isCameraAvailable(mActivity))
        return false;
    RelativeLayout galleryRoot = (RelativeLayout) ((Activity) mActivity).findViewById(R.id.gallery_root);
    if (galleryRoot == null)
        return false;
    mCameraButton = new Button(mActivity);
    mCameraButton.setText(R.string.camera_label);
    mCameraButton.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.frame_overlay_gallery_camera, 0, 0);
    mCameraButton.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View arg0) {
            GalleryUtils.startCameraActivity(mActivity);
        }
    });
    RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
    if (tvEmptyAlbum != null && tvEmptyAlbum.getVisibility() == View.VISIBLE) {
        lp.addRule(RelativeLayout.BELOW, tvEmptyAlbum.getId());
        lp.addRule(RelativeLayout.CENTER_HORIZONTAL);
    } else {
        lp.addRule(RelativeLayout.CENTER_IN_PARENT);
    }
    galleryRoot.addView(mCameraButton, lp);
    return true;
}
Also used : Button(android.widget.Button) RelativeLayout(android.widget.RelativeLayout) OnClickListener(android.view.View.OnClickListener) SlotView(com.android.gallery3d.ui.SlotView) GLView(com.android.gallery3d.ui.GLView) View(android.view.View) TextView(android.widget.TextView)

Aggregations

RelativeLayout (android.widget.RelativeLayout)396 TextView (android.widget.TextView)180 View (android.view.View)164 ImageView (android.widget.ImageView)109 LinearLayout (android.widget.LinearLayout)67 ViewGroup (android.view.ViewGroup)61 Intent (android.content.Intent)31 AdapterView (android.widget.AdapterView)29 Button (android.widget.Button)29 FrameLayout (android.widget.FrameLayout)28 SuppressLint (android.annotation.SuppressLint)26 LayoutInflater (android.view.LayoutInflater)22 OnClickListener (android.view.View.OnClickListener)22 ScrollView (android.widget.ScrollView)22 Paint (android.graphics.Paint)20 CardView (android.support.v7.widget.CardView)19 Context (android.content.Context)18 Point (android.graphics.Point)18 ListView (android.widget.ListView)18 RadioButton (android.widget.RadioButton)17