我无法获得用于开发支持Google电子表格的Android应用程序的库.我需要连接,复制,编辑,从用户电子表格阅读,但我今天无法理解这是什么方式.
Google Drive Api : https://developers.google.com/drive/
Google Spreadsheet Api: https://developers.google.com/google-apps/spreadsheets/
Google APi java client: http://code.google.com/p/google-api-java-client/
Run Code Online (Sandbox Code Playgroud)
哪个是正确的?
我能够在现有的pdf文档中插入一个Image,但问题是,
我正在使用以下代码.
List<PDPage> pages = pdDoc.getDocumentCatalog().getAllPages();
if(pages.size() > 0){
PDJpeg img = new PDJpeg(pdDoc, in);
PDPageContentStream stream = new PDPageContentStream(pdDoc,pages.get(0));
stream.drawImage(img, 60, 60);
stream.close();
}
Run Code Online (Sandbox Code Playgroud)
我希望第一页上的图像.
我有一个由ImageViews制作的ViewPager实现如下:
@Override
public Object instantiateItem(View collection, int position) {
ImageView iv = new ImageView(ctx);
if (pageList.size() > position)
iv.setImageBitmap(pageList.get(position));
else
iv.setImageResource(R.drawable.loading);
iv.setOnTouchListener(this);
((ViewPager) collection).addView(iv, 0);
System.out.println("POS: " + position);
return iv;
}
Run Code Online (Sandbox Code Playgroud)
有机会我可以通过双击(并滑动图像)或缩放缩放来缩放ImageView吗?
我使用此代码为我的应用添加时钟:
<DigitalClock
android:id="@+id/digitalclock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:textSize = "30sp"
/>
Run Code Online (Sandbox Code Playgroud)
问题是,它还显示了几秒钟......有一种简单快捷的隐藏方式吗?我需要几小时和几分钟的hh:mm格式而不是hh:mm:ss!有什么建议?谢谢!
是否ViewPager
必须是活动布局中唯一存在的对象?我正在尝试实现这样的事情:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/reader_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<android.support.v4.view.ViewPager
android:id="@+id/page_viewer"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Gallery
android:id="@+id/miniatures_gallery"
android:layout_width="match_parent"
android:layout_height="wrap_content" /></LinearLayout>
Run Code Online (Sandbox Code Playgroud)
我应该在哪里有一个大的寻呼机滚动在顶部(我有它)和一个较小的画廊滚动下.这只显示了寻呼机,而不是画廊.有什么建议吗?
我需要一个EditText来填充窗口的高度.我正在使用这个:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true" >
<EditText
android:id="@+id/text_editor"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="#ff0000"
android:gravity="top|left"
android:inputType="textMultiLine"
android:textColor="@android:color/white" />
</ScrollView>
Run Code Online (Sandbox Code Playgroud)
但我得到的是一行EditText,一旦我在多行输入返回按钮上写东西,它将更长并可滚动.我知道我可以设置行号,但在这种情况下它应该在不同的设备上工作,每个设备(我猜)有不同的行数.
如何强制它填充设备的高度?
有小费吗?
我试图理解为什么我spring v.5.0.4-RELEASE
没有正确加载默认消息转换器。我从我的 servlet.xml 中删除了所有声明,我希望找到从AbstractMessageConverterMethodProcessor
spring 内部正确加载的所有默认转换器,但我只得到以下 4 个:
org.springframework.http.converter.ByteArrayHttpMessageConverter@35ca138b
org.springframework.http.converter.StringHttpMessageConverter@2b755f0d
org.springframework.http.converter.xml.SourceHttpMessageConverter@74f5d717
org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter@6982b849
Run Code Online (Sandbox Code Playgroud)
这有什么线索吗?
使用鼠标在ImageView..i上绘图的任何方法都不知道,例如使用画布?谢谢
有人可以解释一下为什么这个代码总是只给我一个蓝牙设备,即使我正在使用另一个旁边的两个星系吗?此代码在三星Galaxy Tab上运行,我正在使用三星Galaxy Gio进行正确的蓝牙激活测试.如果我检查默认研究它是否有效..但不是这个代码:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
out = new TextView(this);
setContentView(out);
// Getting the Bluetooth adapter
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
out.append("\nAdapter: " + adapter);
// Check for Bluetooth support in the first place
// Emulator doesn't support Bluetooth and will return null
if (adapter == null) {
out.append("\nBluetooth NOT supported. Aborting.");
return;
}
// Starting the device discovery
out.append("\nStarting discovery...");
adapter.startDiscovery();
out.append("\nDone with discovery...");
// Listing paired devices out.append("\nDevices Paired:");
Set<BluetoothDevice> devices = adapter.getBondedDevices();
for (BluetoothDevice device …
Run Code Online (Sandbox Code Playgroud) protected IplImage processImage(byte[] data, int width, int height) {
int f = 4;// SUBSAMPLING_FACTOR;
// First, downsample our image and convert it into a grayscale IplImage
IplImage grayImage = IplImage.create(width / f, height / f, IPL_DEPTH_8U, 1);
int imageWidth = grayImage.width();
int imageHeight = grayImage.height();
int dataStride = f * width;
int imageStride = grayImage.widthStep();
ByteBuffer imageBuffer = grayImage.getByteBuffer();
for (int y = 0; y < imageHeight; y++) {
int dataLine = y * dataStride;
int imageLine = y * …
Run Code Online (Sandbox Code Playgroud) android ×7
java ×5
api ×1
bluetooth ×1
canvas ×1
clock ×1
converters ×1
digital ×1
draw ×1
fill-parent ×1
galaxy ×1
image-zoom ×1
imageview ×1
javacv ×1
javafx ×1
json ×1
multiline ×1
opencv ×1
pdfbox ×1
scrollview ×1
spring ×1
spring-mvc ×1