当我实施
WindowManager wm = ((WindowManager)context.getSystemService(context.WINDOW_SERVICE));
Display display = wm.getDefaultDisplay();
m_nDisplayWidth = display.getWidth();
m_nDisplayHeight = display.getHeight();
Run Code Online (Sandbox Code Playgroud)
我可以正常运行,但是当我实现getSize时,我得到了runtimeError
Point size = new Point();
display.getSize(size); //Error right here
m_nDisplayWidth = size.x;
m_nDisplayHeight = size.y;
Run Code Online (Sandbox Code Playgroud)
logcat的:
03-11 01:45:25.865: E/AndroidRuntime(18835): FATAL EXCEPTION: main
03-11 01:45:25.865: E/AndroidRuntime(18835): android.view.InflateException: Binary XML file line #7: Error inflating class com.brain.development.GameRun
03-11 01:45:25.865: E/AndroidRuntime(18835): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
03-11 01:45:25.865: E/AndroidRuntime(18835): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
03-11 01:45:25.865: E/AndroidRuntime(18835): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
03-11 01:45:25.865: E/AndroidRuntime(18835): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
03-11 01:45:25.865: E/AndroidRuntime(18835): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
03-11 01:45:25.865: E/AndroidRuntime(18835): at …
Run Code Online (Sandbox Code Playgroud) 我能够通过excel查询和查看表,但我想知道是否有一种方法可以通过修改excel中的数据来直接更新或插入.
类似于Microsoft Access Linked表,也许?
我正在尝试创建一个简单的存储过程,将查询结果存储到一个字符串中.
v_string1 varchar2(100);
Select column1
From dual;
Run Code Online (Sandbox Code Playgroud)
将返回
column 1
--------
aaaa
bbbb
cccc
Run Code Online (Sandbox Code Playgroud)
我想将"aaaa,bbbb,cccc"存储到v_string1中.我能想到的只是一个Cursor ......有没有更好的方法来处理它?
我有一个很大的列表并将其放入树形图中.
然后我想把"ALL"放在列表的最顶端,但是在"ALL"之前有"AAA"的东西
编辑:我想要对所有其他输入进行排序
List -> List
----- -----
AAA AAA
BBB ALL
CCC BBB
CCC
Run Code Online (Sandbox Code Playgroud)
我可以使用arrayList或其他东西,但我想知道是否有办法控制这种情况.
在列表中,我设置了“ ID”列和“标题”列。
我在列表中添加了10个项目,然后尝试将第10个项目放在1到2之间。研究之后,许多人说我无法手动更改ID号...是否可以重新排序项目?删除每个项目是唯一的答案?
请帮忙!
我有一张看起来像这样的桌子
Group Recipe Priority
0 A 400
0 A 200
0 B 500
0 B 100
1 C 300
1 C 300
1 D 600
Run Code Online (Sandbox Code Playgroud)
重要性是"群组">"优先级">"食谱"
第0组必须先行.在第0组中,优先级500必须先行(因为它具有更高的优先级),但为了提高效率,所有配方必须先行.
排序后,它应该是这样的
Group Recipe Priority
0 B 500
0 B 100
0 A 400
0 A 200
1 D 600
1 C 300
1 C 300
Run Code Online (Sandbox Code Playgroud)
我已经尝试了所有不同的方式来做'顺序',但找不到正确的方法.
感谢您的帮助
您知道如果我在布局中设置ViewFlipper,它始终从第一个项目开始到底部.
但有没有办法从"onCreate"上的ViewFlipper的第2或第3项开始?
假设如果counter == 2,页面将显示< - 2 - > item onCreate.
这是我的onCreate和鳍状肢.
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.playlist);}
Run Code Online (Sandbox Code Playgroud)
XML
<ViewFlipper
android:id="@+id/flipper"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:inAnimation="@anim/flipin"
android:outAnimation="@anim/flipout" >
<!-- 1 -->
<LinearLayout
android:id="@+id/one"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/airongbg"/>
</LinearLayout>
<!-- 2 -->
<LinearLayout
android:id="@+id/two"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/hopefalls"/>
</LinearLayout>
<!-- 3 -->
<LinearLayout
android:id="@+id/three"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/moon"/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud) android ×2
oracle ×2
sql ×2
collections ×1
excel ×1
java ×1
odbc ×1
plsql ×1
sharepoint ×1
sql-order-by ×1
string ×1
treemap ×1