List of usage examples for android.view View INVISIBLE
int INVISIBLE
To view the source code for android.view View INVISIBLE.
Click Source Link
From source file:ssui.project.GetItBackActivity.java
/** Called when the activity is first created. */ @Override//w w w .ja v a2 s . c o m public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (APP_ID == null) { Util.showAlert(this, "Warning", "Facebook Applicaton ID must be " + "specified before running this example: see Example.java"); } setContentView(R.layout.main); mLoginButton = (LoginButton) findViewById(R.id.login); mText = (TextView) GetItBackActivity.this.findViewById(R.id.txt); mRequestButton = (Button) findViewById(R.id.requestButton); mFacebook = new Facebook(APP_ID); mAsyncRunner = new AsyncFacebookRunner(mFacebook); SessionStore.restore(mFacebook, this); SessionEvents.addAuthListener(new SampleAuthListener()); SessionEvents.addLogoutListener(new SampleLogoutListener()); //check if mFacebook is logged in //if already logged in start pulling data //else show login in button if (mFacebook.isSessionValid()) Log.v("User", "Logged in"); mLoginButton.init(this, mFacebook); mRequestButton.setOnClickListener(new OnClickListener() { public void onClick(View v) { mAsyncRunner.request("me", new SampleRequestListener()); } }); mRequestButton.setVisibility(mFacebook.isSessionValid() ? View.VISIBLE : View.INVISIBLE); }
From source file:com.pixem.core.activity.Example.java
/** Called when the activity is first created. */ @Override/*from w w w . j a va 2 s .c om*/ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (APP_ID == null) { Util.showAlert(this, "Warning", "Facebook Applicaton ID must be " + "specified before running this example: see Example.java"); } setContentView(R.layout.facebook); mLoginButton = (LoginButton) findViewById(R.id.login); mText = (TextView) Example.this.findViewById(R.id.txt); mRequestButton = (Button) findViewById(R.id.requestButton); mPostButton = (Button) findViewById(R.id.postButton); mDeleteButton = (Button) findViewById(R.id.deletePostButton); mUploadButton = (Button) findViewById(R.id.uploadButton); mFacebook = new Facebook(APP_ID); mAsyncRunner = new AsyncFacebookRunner(mFacebook); SessionStore.restore(mFacebook, this); SessionEvents.addAuthListener(new SampleAuthListener()); SessionEvents.addLogoutListener(new SampleLogoutListener()); mLoginButton.init(this, mFacebook); mRequestButton.setOnClickListener(new OnClickListener() { public void onClick(View v) { mAsyncRunner.request("me", new SampleRequestListener()); } }); mRequestButton.setVisibility(mFacebook.isSessionValid() ? View.VISIBLE : View.INVISIBLE); mUploadButton.setOnClickListener(new OnClickListener() { public void onClick(View v) { Bundle params = new Bundle(); params.putString("method", "photos.upload"); URL uploadFileUrl = null; try { uploadFileUrl = new URL("http://www.facebook.com/images/devsite/iphone_connect_btn.jpg"); } catch (MalformedURLException e) { e.printStackTrace(); } try { HttpURLConnection conn = (HttpURLConnection) uploadFileUrl.openConnection(); conn.setDoInput(true); conn.connect(); int length = conn.getContentLength(); byte[] imgData = new byte[length]; InputStream is = conn.getInputStream(); is.read(imgData); params.putByteArray("picture", imgData); } catch (IOException e) { e.printStackTrace(); } mAsyncRunner.request(null, params, "POST", new SampleUploadListener(), null); } }); mUploadButton.setVisibility(mFacebook.isSessionValid() ? View.VISIBLE : View.INVISIBLE); mPostButton.setOnClickListener(new OnClickListener() { public void onClick(View v) { mFacebook.dialog(Example.this, "feed", new SampleDialogListener()); } }); mPostButton.setVisibility(mFacebook.isSessionValid() ? View.VISIBLE : View.INVISIBLE); }
From source file:com.hybris.mobile.app.commerce.fragment.OrderConfirmationFragment.java
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); mOrderConfirmNumber = (TextView) getView().findViewById(R.id.order_confirm_number_text); mOrderConfirmEmail = (TextView) getView().findViewById(R.id.order_confirm_email); // Product list ListView productList = (ListView) getActivity().findViewById(R.id.order_products_list); mOrderProductListAdapter = new OrderProductListAdapter(getActivity(), new ArrayList<OrderEntry>()); productList.setAdapter(mOrderProductListAdapter); getView().findViewById(R.id.order_confirm_continue_shopping_button) .setOnClickListener(orderConfirmContinueShoppingButtonListener); QueryOrder queryOrder = new QueryOrder(); queryOrder.setCode(getActivity().getIntent().getStringExtra(IntentConstants.ORDER_CODE)); // Getting the order CommerceApplication.getContentServiceHelper().getOrder(this, mOrderRequestId, queryOrder, null, false, null, new OnRequestListener() { @Override//from www .ja v a 2 s . c o m public void beforeRequest() { UIUtils.showLoadingActionBar(getActivity(), true); getView().setVisibility(View.INVISIBLE); } @Override public void afterRequestBeforeResponse() { } @Override public void afterRequest(boolean isDataSynced) { getView().setVisibility(View.VISIBLE); UIUtils.showLoadingActionBar(getActivity(), false); } }); }
From source file:com.familygraph.android.Example.java
/** Called when the activity is first created. */ @Override/* ww w. j a v a 2s .com*/ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (CLIENT_ID == null) { Util.showAlert(this, "Warning", "FamilyGraph Applicaton ID must be " + "specified before running this example: see Example.java"); } setContentView(R.layout.main); mLoginButton = (LoginButton) findViewById(R.id.loginButton); mText = (TextView) Example.this.findViewById(R.id.txt); mPersonalPhoto = (ImageView) Example.this.findViewById(R.id.personalPhoto); mRequestButton = (Button) findViewById(R.id.requestButton); mFamilyGraph = new FamilyGraph(CLIENT_ID); mAsyncRunner = new AsyncFamilyGraphRunner(mFamilyGraph); SessionStore.restore(mFamilyGraph, this); SessionEvents.addAuthListener(new SampleAuthListener()); SessionEvents.addLogoutListener(new SampleLogoutListener()); String[] permissions = { "basic", "offline_access" }; mLoginButton.init(this, mFamilyGraph, permissions); mRequestButton.setOnClickListener(new OnClickListener() { public void onClick(View v) { if (mFamilyGraph.isSessionValid()) { Bundle params = new Bundle(); params.putString("fields", "name,picture"); mAsyncRunner.request("me", params, new SampleRequestListener()); } } }); int visibility = mFamilyGraph.isSessionValid() ? View.VISIBLE : View.INVISIBLE; mRequestButton.setVisibility(visibility); mPersonalPhoto.setVisibility(View.INVISIBLE); }
From source file:com.wahyuadityanugraha.mvpexample.app.finditems.FeedActivity.java
@Override public void showProgress() { progressBar.setVisibility(View.VISIBLE); listView.setVisibility(View.INVISIBLE); }
From source file:com.scigames.registration.Registration4PhotoActivity.java
/** Called with the activity is first created. */ @Override// ww w .ja v a 2 s . c o m public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.d(TAG, "super.OnCreate"); requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE); Intent i = getIntent(); Log.d(TAG, "getIntent"); firstNameIn = i.getStringExtra("fName"); lastNameIn = i.getStringExtra("lName"); studentIdIn = i.getStringExtra("studentId"); visitIdIn = i.getStringExtra("visitId"); Log.d(TAG, "...getStringExtra"); // Inflate our UI from its XML layout description. setContentView(R.layout.registration4_photo); Log.d(TAG, "...setContentView"); avatarPhoto = (ImageView) this.findViewById(R.id.avatar_photo); Log.d(TAG, "...findViewById. avatar_photo"); or = (TextView) findViewById(R.id.or); or.setVisibility(View.INVISIBLE); retakeButton = (Button) findViewById(R.id.retake_pic); retakeButton.setVisibility(View.INVISIBLE); retakeButton.setOnClickListener(mTakePhotoListener); saveButton = (Button) findViewById(R.id.save_button); saveButton.setOnClickListener(mContinueButtonListener); saveButton.setVisibility(View.INVISIBLE); takePhotoButton = (Button) findViewById(R.id.take_pic); takePhotoButton.setOnClickListener(mTakePhotoListener); takePhotoButton.setVisibility(View.VISIBLE); //((Button) findViewById(R.id.take_pic)).setOnClickListener(mTakePhotoListener); Log.d(TAG, "...instantiateButtons"); //set listener task.setOnResultsListener(this); Typeface ExistenceLightOtf = Typeface.createFromAsset(getAssets(), "fonts/Existence-Light.ttf"); Typeface Museo300Regular = Typeface.createFromAsset(getAssets(), "fonts/Museo300-Regular.otf"); Typeface Museo500Regular = Typeface.createFromAsset(getAssets(), "fonts/Museo500-Regular.otf"); Typeface Museo700Regular = Typeface.createFromAsset(getAssets(), "fonts/Museo700-Regular.otf"); // TextView welcome = (TextView)findViewById(R.id.welcome); //instruction = (TextView)findViewById(R.id.instructions); // setTextViewFont(ExistenceLightOtf, welcome); setButtonFont(Museo500Regular, retakeButton); setTextViewFont(Museo300Regular, or); }
From source file:com.wahyuadityanugraha.mvpexample.app.finditems.FeedActivity.java
@Override public void hideProgress() { progressBar.setVisibility(View.INVISIBLE); listView.setVisibility(View.VISIBLE); }
From source file:com.pseudosudostudios.jdd.views.Grid.java
/** * Common code between the constructors/*w w w . jav a2 s . c o m*/ */ public void constructorCommon() { setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { gestureDetect.onTouchEvent(event); return true; } }); for (int i = 0; i < tiles.length; i++) { for (int c = 0; c < tiles[i].length; c++) { Tile t = new Tile(getContext()); t.setId(i * 10 + c); t.setVisibility(View.INVISIBLE); tiles[i][c] = t; } } divPaint.setColor(Color.TRANSPARENT); moves = 0; }
From source file:com.intel.xdk.display.Display.java
@JavascriptInterface public void startAR() { arView = CameraPreview.newInstance(activity.getApplicationContext()); arView.setVisibility(View.INVISIBLE); arView.height = 100;/* w w w . j a v a 2 s. c o m*/ arView.width = 100; //no way to get current background color? arView.setBackgroundColor(Color.TRANSPARENT); SurfaceHolder sfhTrackHolder = arView.getHolder(); sfhTrackHolder.setFormat(PixelFormat.TRANSPARENT); sfhTrackHolder.setKeepScreenOn(true); sfhTrackHolder.setFixedSize(100, 100); activity.runOnUiThread(new Runnable() { public void run() { //activity.addContentView(arView, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT, 0.0F)); //activity.addContentView(arView, new LinearLayout.LayoutParams(400, 500, 0.0F)); ViewGroup rootView = (ViewGroup) webView.getParent().getParent(); rootView.addView(arView, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT)); rootView.bringChildToFront((View) webView.getParent()); arView.setVisibility(View.VISIBLE); arView.showCamera(); webView.bringToFront(); webView.setBackgroundColor(0x00000000); LinearLayout ll = (LinearLayout) webView.getParent(); ll.setBackgroundColor(0x00000000); View activityView = activity.getCurrentFocus(); } }); }
From source file:cc.softwarefactory.lokki.android.fragments.AddContactsFragment.java
private void enableSearchFilter() { inputSearch.addTextChangedListener(new TextWatcher() { @Override//from w w w . j a v a2 s. co m public void onTextChanged(CharSequence cs, int arg1, int arg2, int arg3) { // When user changed the Text if (adapter != null) { adapter.getFilter().filter(cs); } clearFilter.setVisibility(cs.length() == 0 ? View.INVISIBLE : View.VISIBLE); } @Override public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { // TODO Auto-generated method stub } @Override public void afterTextChanged(Editable arg0) { // TODO Auto-generated method stub } }); clearFilter.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { inputSearch.setText(""); } }); }