技術情報

Google rolls out in-app browsers on Android

In-app browsers are generally not the best way to consume in-app content. In fact, the Android developer has been using Chrome’s Custom Tabs feature to tweak the experience. Now, Google is rolling out new features like partial custom tabs and password autofill to make in-app navigation smoother on mobile operating systems.

The partial custom tabs feature gives developers more control over the initial launch height of tabs. For example, you can open a tab in half the screen when a user clicks an article link. This allows the user to interact with the app and the in-app browser at the same time.

Image Credit : Google

They are also rolling out the feature for users to enter passwords and other stored details (such as addresses) without leaving the app. This is useful if your app’s browser has a login popup.

Image Credit : Google

Google is suggesting Chrome custom tabs over WebView, claiming it offers more functionality.

Google said “When adding a web experience to your Android app, simply launching a browser from your app forces users to leave your app, with the risk of abandonment for that session. WebViews allow you to build your own in-app browser, but can be a complex process with higher maintenance overhead,”

Yuuma



Flutter ListViewの高さを定義する方法

ListViewのアイテムの高さを定義するには、itemExtentを引数として使用します。

ListView(
itemExtent: //,
children : []
);

使用法例

return Scaffold(
      body: ListView(
        itemExtent: 150,
        children: [
          Card(
            color: Colors.blue,
            child: ListTile(
              title: Text('Item1'),
            ),
          ),
          Card(
            color: Colors.blue,
            child: ListTile(
              title: Text('Item2'),
            ),
          ),
          Card(
            color: Colors.blue,
            child: ListTile(
              title: Text('Item3'),
            ),
          ),
        ],
      ),
    );

金曜担当 – Ami



Making a simple request to APIs in python

Today, I would like to share about making a API request using ‘requests’ library in Python. Let’s take a look.

First of all, install the ‘requests’ library by the following command.

pip install requests

or

pip3 install requests

Here is the code to make a GET request to a public API.

import requests

api = 'https://catfact.ninja/fact'

response_data = requests.get(api)

response_data_json = response_data.json()

print(response_data_json)

The result is as follows.

{'fact': 'Lions are the only cats that live in groups, called prides. Every female within the pride is usually related.', 'length': 109}

This is the example request to a public API. You can learn more HERE for advanced usage.

Hope you enjoy that.

By Asahi



Github will change their working style to fully remote and 10% lays off

Microsoft-owned GitHub announced today that it will lay off 10% of its workforce by the end of the company’s fiscal year. Prior to this announcement, GitHub had approximately 3,000 employees. The company will also close all offices at the end of leases and move to a remote-first culture, partly due to low utilization.

Making GitHub’s new homepage fast and performant
Image Credit : Github Blog

GitHub will also continue the hiring freeze it first announced in January and will also make a number of other internal changes to “protect the short-term health” of its business.

“We announced a number of difficult but necessary decisions and budgetary realignments to both protect the health of our business in the short term and grant us the capacity to invest in our long-term strategy moving forward. You can view our CEO’s full message to employees with additional details on these changes below,” a company spokesperson told to techcrunch.

In a slightly unusual move for a company that prides itself on being independent of its corporate owners, GitHub will also be moving to Teams for its video conferencing needs. And in another sign of cost savings, we’re changing our laptop upgrade cycle from 3 to 4 years.

Yuuma



Resizing the image to a specific width and height with opencv in Python

Today, I would like to share a program for resizing the images to a specific width and height with opencv library in Python. Let’s take a look.

Opencv has resize method cv2.resize() to resize the images.

We can resize the images simply as follows.

import cv2

# read the input
img = cv2.imread('input.jpeg')
height, width, channel = img.shape
print(f"Height and width of original image: {height}, {width}")

# resize the image
new_size = (450, 340) # (width, height)
print(f"New height and width: {new_size[1]}, {new_size[0]}")
resize_img = cv2.resize(img, new_size)

cv2.imshow('Original img', img)
cv2.imshow('Resized img', resize_img)

cv2.waitKey(0)

The program above will resize the input image and show original and resized images.

Actually, cv2.resize() has other functionalities. Please study more about this. It is interesting.

This is all for now. Hope you enjoy that.

By Asahi




アプリ関連ニュース

お問い合わせはこちら

お問い合わせ・ご相談はお電話、またはお問い合わせフォームよりお受け付けいたしております。

tel. 06-6454-8833(平日 10:00~17:00)

お問い合わせフォーム