Quantcast
Channel: Ionic Forum - Latest posts
Viewing all 230074 articles
Browse latest View live

Last item in grid fit same space as others [CSS]

$
0
0

I am very poor in CSS knowledge, I am trying to format some pages to be more interesting in the browser layout. My goal on this specific page is to transform this grid into something like Google Drive’s folders when the user is using a tablet or using in browser:

All the items work like expected, but when there is only one or there is an item left at the end, it has this characteristic occupying the entire page. In short, when the screen is at its largest size, I would like the item to be presented in the smallest size, regardless of how many items there are.

I thank you in advance for this link, I will try these methodologies to see if I can solve the problem.


Ionic v3: Toggle Hide/Unhide Passwords works only after round-progress ends

$
0
0

I have no clue. If I remove it or set it to 0 the password disappears.–

Body empty sometimes in fetch .body with base64

$
0
0

Hi. im debuggin an APP in Chrome and all is working nice, but when i compile and i test the app, sometimes the fetch is sending the body empty and others the body its ok… in the body there are a base64 string, an image, i dont know if Android have any limitation with this… i have tried with 2 devices.

 const cameraPhoto = await getPhoto({
           
            resultType: CameraResultType.Uri,
            source: CameraSource.Camera,
            quality: 100
        });
      
      const base64 = await base64FromPath(cameraPhoto.webPath!);

       
       
        //Subo foto al W.S.
        const datos = { imagenBase64: base64, bastidor: "el basti" };
        const miInit = { method: 'POST',
        body:JSON.stringify(datos),
               headers:{'Content-Type': 'application/json', "Authorization": `Bearer ${token}` } ,
             };

      var response=  await fetch(process.env.REACT_APP_URLAPI+APISMARTCARSUBEFOTO,miInit).then(res => res.json())
      .catch(error =>  MuestraAlert(error, TipoAlert.error))
      .then(response =>  MuestraAlert("BIEN", TipoAlert.informacion));

The keyboard doesn't work done with inputs

$
0
0

I’ve been looking all over the internet for days I can’t find anything about it

Fit last item in grid to same space as others [CSS]

$
0
0

Ok, I couldn’t do with the CSS, but I “solved” the problem in another way. I’m pretty sure this isn’t the best approach, but worked for me:

html

<ion-grid>
	<ion-row>
		<ion-col *ngFor="let project of projects" [size]="columnSize">
			<ion-item lines="none" class="project-item">
				<ion-thumbnail slot="start">
					<img src="assets/images/project.png">
				</ion-thumbnail>
				<ion-label>
					<h2>{{project.name}}</h2>
					<p>{{project.user}} • {{project.date}}</p>
				</ion-label>	    
				<ion-button clear slot="end">Opções</ion-button>
			</ion-item>
		</ion-col>
	</ion-row>
</ion-grid>

ts

columnSize: string = "12";

ngOnInit() {
	this.adjustColumnSize();
	this.platform.resize.subscribe(() => {
		this.adjustColumnSize();
	});
}

adjustColumnSize() {
	this.platform.ready().then(() => {
		if (this.platform.width() < 576) {
			this.columnSize = "12";

		} else if (this.platform.width() > 576 && this.platform.width() < 768) {
			this.columnSize = "6";

		} else if (this.platform.width() > 768 && this.platform.width() < 1200) {
			this.columnSize = "4";

		} else if (this.platform.width() > 1200) {
			this.columnSize = "3";
		}
	});
}

Ionic v3: Toggle Hide/Unhide Passwords works only after round-progress ends

$
0
0

So you inherited this code? Can you ask whoever put it there why it’s there?

How can I change the webview's content?

$
0
0

I want to change where nx cap sync outputs the web content and where the native webview gets it from. Any help is appreciated!

Android App Bundle (aab) support

$
0
0

It’s still on our list, thought I will say it’s a top priority.

It’s not a matter of adding --packageType-bundle, otherwise we would have done that :smile:


Fit last item in grid to same space as others [CSS]

$
0
0

Now that I understand a bit better, I don’t think you really need grid, because you really have a one-dimensional layout. There is a companion guide to flexbox, and the crucial property here is flex-wrap. Something like this (you can play around with the width property of .basket to fit your situation, but I’m assuming you have a sense of how wide a single cell needs to be - this ordinarily is independent of the layout). I used 13 items here so as to have your problematic straggler in virtually all window widths:

 fruits = ["apple", "banana", "cherry", "durian",
    "elderberry", "fig", "grape", "honeydew",
    "jackfruit", "kiwi", "lemon", "mango",
    "nectarine"];
<ion-content>
  <div class="shelf">
    <div class="basket" *ngFor="let fruit of fruits">
      <div class="fruit">{{fruit}}</div>
    </div>
  </div>
</ion-content>
.shelf {
  display: flex;
  flex-wrap: wrap;
}

.basket {
  width: 200px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dotted green;
  margin: 12px;
}

.fruit {
  background-color: #f0afec;
  color: black;
}

The margin setting determines the spacing between cells - if you want, you can break it out into margin-left, margin-top, etc to give more or less horizontal versus vertical padding.

So with the values I gave here, I see four cells per row at >900px window width, dropping to three per row under that, two per row at around 670px, and finally one per row at around 470px.

How can I make the ripple only appear only in the div that has the image and not in the whole column item?

$
0
0

I’m trying to make the ripple effect appear as far as the div that the image has, but as you can see in the image, the ripple effect goes to the limit of the grid column, and there is not the limit of the div that the image has. background image.

This is my code:

    <ion-row>
      <ion-col *ngFor="let categorie of categoriesMarket" size="6">
        <div
          class="category ion-activatable ripple-parent"
          [defaultImage]="'../../../../../assets/auth/backgrounds/main.jpg'"
          [lazyLoad]="categorie.background"
        >
          <ion-ripple-effect></ion-ripple-effect>
          <div class="overlay">
            <p [ngClass]="{'title': categorie.id == 3}">{{ categorie.name }}</p>
          </div>
        </div>
      </ion-col>
    </ion-row>

These are my style classes:

.category {
  width: 100%;
  height: 9.375rem;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 0.9375rem;

  .overlay {
    display: flex;
    flex-direction: column;
    justify-content: left;
    text-align: left;
    width: 100%;
    height: 100%;
    background-color: rgb(0000, 0000, 0000, 0.2);
    padding: 10px;
    border-radius: 0.9375rem;

    P {
      color: #fff;
    }

    .title {
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }
  }
}

The effect I have right now that you don’t want it to be like this:

2020-09-10 14_34_58-Window

Dynamic news feed charged from different data sources in ionic mobille app with firebase

$
0
0

It’s important to keep in mind that this forum is a collection of volunteers who are trying to help one another.

So what I’m seeing here is basically what a client might typically come to me with: an idea for an app and a rough description of what some screens and data structures should look like. If that’s what you’re looking for, then I would suggest moving your thread to the “jobs” subforum, where I’m sure you will get lots of offers from people willing to work for you and build the app out.

Yes, that’s going to cost you money.

Ordinary forum question threads tend to look more like this:

I’m trying to achieve X. To that end, I’ve written this code here:

code goes here

When I do Y, then I’m expecting to see Z. However, I’m actually encountering W. Any assistance would be appreciated.

How can I make the ripple only appear only in the div that has the image and not in the whole column item?

$
0
0

Fixed, just add style attribute position: relative; to the parent div and it works, but it doesn’t have the same borders as the parent div, what can I do in that case?

List isn't clickable in menu even after adding button tag

$
0
0

What happens if you hoist the contents of this component directly into the app-component.html markup? IOW, can we eliminate the possibility that this is caused by attempting to encapsulate stuff into SideMenuComponent?

White screen while using a v4/Angular application

$
0
0

We have an Ionic v4/Angular app.

A number of users have reported that during a particular operation (selecting and then uploading a video), the app screen will suddenly “go white” and reloading the app is the only way to do anything again.

  • The app is not crashing. If left open, the background operation continues and appears to finish.
  • Absolutely nothing is visible on the screen. It is just plain white.
  • Have not been able to reproduce this issue in a dev build of the app.
  • Our error reporting system (Rollbar, JS within the app) doesn’t report anything.
  • Historically, when we had issues with WebKit, the app would crash. Therefore, I question that WebKit has a major issue.

Any ideas on how to continue forward to debug the issue? Our next idea is to add additional debugging within the app and see where things are going, but how do we figure out what’s going on if Rollbar already isn’t giving us anything.

White screen while using a v4/Angular application

$
0
0

All "crash"es are not created equal.

Specifically, an uncaught exception in JavaScript code that is triggered during ordinary event loop processing (which, in practice, is just about everything in your app code) can short-circuit the rendering of the UI. This is IMHO far and away the most common cause of “white screen of death”.

This is different from a “crash” as seen by the underlying OS. The OS doesn’t know or care that your JavaScript house of cards has come tumbling down. This would be consistent with what you are seeing in terms of background uploading continuing to happen.

I would suggest carefully auditing all asynchronous code in your app, to make certain that you are not inadvertently relying on order of execution, as that often changes in the field.


Bug in ionic 5's "stack-controller.ts"

$
0
0

Error: Uncaught (in promise): TypeError: Cannot read property ‘appendChild’ of undefined
TypeError: Cannot read property ‘appendChild’ of undefined
at StackController.transition (stack-controller.ts:274)
at stack-controller.ts:145
at StackController._callee2$ (stack-controller.ts:296)
at tryCatch (runtime.js:45)
at Generator.invoke [as _invoke] (runtime.js:274)
at Generator.prototype. [as next] (runtime.js:97)
at fulfilled (tslib.es6.js:71)
at ZoneDelegate.invoke (zone.js:386)
at Zone.run (zone.js:143)
at zone.js:891
at resolvePromise (zone.js:832)
at resolvePromise (zone.js:784)
at zone.js:894
at ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:27428)
at ZoneDelegate.invokeTask (zone.js:420)
at Zone.runTask (zone.js:188)
at drainMicroTaskQueue (zone.js:601)
at ZoneTask.invokeTask (zone.js:507)
at ZoneTask.invoke (zone.js:492)

Install Cordova Plugin when using Capacitor

$
0
0

Hello, I have an Ionic project that uses Capacitor. Now I want use an Cordova Plugin. After I run the following command, the things in the picture apprear:

ionic cordova plugin add cordova-plugin-tts

If I click on continue, will I be still able to use capacitor?

Bug in ionic 5's "stack-controller.ts"

$
0
0

That’s deep within routing animation. Something is amiss with your routing setup, or how you’re transitioning between pages.

Install Cordova Plugin when using Capacitor

$
0
0

I have no idea what’s in your image, or what you’re talking about “clicking” on, so here is the documentation about using Cordova plugins with Capacitor. Near it should be a list of known incompatible plugins.

Install Cordova Plugin when using Capacitor

$
0
0

I run this command, afterwards the things in my image appeared:

ionic cordova plugin add cordova-plugin-tts
Viewing all 230074 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>